Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
nodejs /
webpack /
lib /
util /
[ HOME SHELL ]
Name
Size
Permission
Action
LazyBucketSortedSet.js
5.58
KB
-rw-r--r--
Queue.js
940
B
-rw-r--r--
Semaphore.js
1007
B
-rw-r--r--
SetHelpers.js
1.34
KB
-rw-r--r--
SortableSet.js
3.16
KB
-rw-r--r--
StackedSetMap.js
2.79
KB
-rw-r--r--
TrackingSet.js
537
B
-rw-r--r--
cachedMerge.js
1.07
KB
-rw-r--r--
cleverMerge.js
2.12
KB
-rw-r--r--
createHash.js
3.31
KB
-rw-r--r--
deterministicGrouping.js
7
KB
-rw-r--r--
identifier.js
3.45
KB
-rw-r--r--
objectToMap.js
405
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : SortableSet.js
"use strict"; /** * A subset of Set that offers sorting functionality * @template T item type in set * @extends {Set<T>} */ class SortableSet extends Set { /** * Create a new sortable set * @param {Iterable<T>=} initialIterable The initial iterable value * @typedef {function(T, T): number} SortFunction * @param {SortFunction=} defaultSort Default sorting function */ constructor(initialIterable, defaultSort) { super(initialIterable); /** @private @type {function(T, T): number}} */ this._sortFn = defaultSort; /** @private @type {function(T, T): number} | null} */ this._lastActiveSortFn = null; /** @private @type {Map<Function, T[]> | undefined} */ this._cache = undefined; /** @private @type {Map<Function, T[]|string|number> | undefined} */ this._cacheOrderIndependent = undefined; } /** * @param {T} value value to add to set * @returns {this} returns itself */ add(value) { this._lastActiveSortFn = null; this._invalidateCache(); this._invalidateOrderedCache(); super.add(value); return this; } /** * @param {T} value value to delete * @returns {boolean} true if value existed in set, false otherwise */ delete(value) { this._invalidateCache(); this._invalidateOrderedCache(); return super.delete(value); } /** * @returns {void} */ clear() { this._invalidateCache(); this._invalidateOrderedCache(); return super.clear(); } /** * Sort with a comparer function * @param {SortFunction} sortFn Sorting comparer function * @returns {void} */ sortWith(sortFn) { if (this.size <= 1 || sortFn === this._lastActiveSortFn) { // already sorted - nothing to do return; } const sortedArray = Array.from(this).sort(sortFn); super.clear(); for (let i = 0; i < sortedArray.length; i += 1) { super.add(sortedArray[i]); } this._lastActiveSortFn = sortFn; this._invalidateCache(); } sort() { this.sortWith(this._sortFn); } /** * Get data from cache * @param {function(SortableSet<T>): T[]} fn function to calculate value * @returns {T[]} returns result of fn(this), cached until set changes */ getFromCache(fn) { if (this._cache === undefined) { this._cache = new Map(); } else { const data = this._cache.get(fn); if (data !== undefined) { return data; } } const newData = fn(this); this._cache.set(fn, newData); return newData; } /** * @param {function(SortableSet<T>): string|number|T[]} fn function to calculate value * @returns {any} returns result of fn(this), cached until set changes */ getFromUnorderedCache(fn) { if (this._cacheOrderIndependent === undefined) { this._cacheOrderIndependent = new Map(); } else { const data = this._cacheOrderIndependent.get(fn); if (data !== undefined) { return data; } } const newData = fn(this); this._cacheOrderIndependent.set(fn, newData); return newData; } /** * @private * @returns {void} */ _invalidateCache() { if (this._cache !== undefined) { this._cache.clear(); } } /** * @private * @returns {void} */ _invalidateOrderedCache() { if (this._cacheOrderIndependent !== undefined) { this._cacheOrderIndependent.clear(); } } } module.exports = SortableSet;
Close