Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/list.js/src/utils/ drwxrwxr-x | |
| Viewing file: Select action/file-type: /**
* Source: https://github.com/timoxley/to-array
*
* Convert an array-like object into an `Array`.
* If `collection` is already an `Array`, then will return a clone of `collection`.
*
* @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`
* @return {Array} Naive conversion of `collection` to a new `Array`.
* @api public
*/
module.exports = function toArray(collection) {
if (typeof collection === 'undefined') return []
if (collection === null) return [null]
if (collection === window) return [window]
if (typeof collection === 'string') return [collection]
if (isArray(collection)) return collection
if (typeof collection.length != 'number') return [collection]
if (typeof collection === 'function' && collection instanceof Function) return [collection]
var arr = [];
for (var i = 0, il = collection.length; i < il; i++) {
if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {
arr.push(collection[i])
}
}
if (!arr.length) return []
return arr
}
function isArray(arr) {
return Object.prototype.toString.call(arr) === '[object Array]'
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0058 ]-- |