403Webshell
Server IP : 107.13.46.68  /  Your IP : 216.73.216.232
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/node_modules/has-own-deep/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/node_modules/has-own-deep/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;
};

Youez - 2016 - github.com/yon3zu
LinuXploit