CasperSecurity

Current Path : /var/www/hrms.uiet.co.in/node_modules/collect.js/src/methods/
Upload File :
Current File : /var/www/hrms.uiet.co.in/node_modules/collect.js/src/methods/toArray.js

'use strict';

module.exports = function toArray() {
  const collectionInstance = this.constructor;

  function iterate(list, collection) {
    const childCollection = [];

    if (list instanceof collectionInstance) {
      list.items.forEach(i => iterate(i, childCollection));
      collection.push(childCollection);
    } else if (Array.isArray(list)) {
      list.forEach(i => iterate(i, childCollection));
      collection.push(childCollection);
    } else {
      collection.push(list);
    }
  }

  if (Array.isArray(this.items)) {
    const collection = [];

    this.items.forEach((items) => {
      iterate(items, collection);
    });

    return collection;
  }

  return this.values().all();
};
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY