⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
nodejs
/
has-own-deep
/
View File Name :
index.js
/*! * has-own-deep <https://github.com/jonschlinkert/has-own-deep> * * Copyright (c) 2015-2018, Jon Schlinkert. * Released under the MIT License. */ 'use strict'; const hasOwn = Object.prototype.hasOwnProperty; const isObject = require('isobject'); module.exports = function(target, path) { if (!isObject(target) && !Array.isArray(target)) { throw new TypeError('expected the first argument to be an object or array'); } if (typeof path !== 'string') { throw new TypeError('expected object path to be a string'); } if (hasOwn.call(target, path)) { return true; } let segs = Array.isArray(path) ? path : path.split(/\\?\./); let obj = target; while ((isObject(obj) || Array.isArray(obj)) && segs.length) { if (hasOwn.call(obj, segs[0])) { obj = obj[segs.shift()]; continue; } let rest = segs.slice(); let has = false; do { const prop = rest.join('.'); if ((has = hasOwn.call(obj, prop))) { segs = segs.slice(rest.length); obj = obj[prop]; break; } rest.pop(); } while (rest.length); if (!has) { return false; } } return true; };