PATH: //opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules/bluebird/js/release
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 any.js
↓
X
📄 assert.js
↓
X
📄 async.js
↓
X
📄 bind.js
↓
X
📄 bluebird.js
↓
X
📄 call_get.js
↓
X
📄 cancel.js
↓
X
📄 catch_filter.js
↓
X
📄 context.js
↓
X
📄 debuggability.js
↓
X
📄 direct_resolve.js
↓
X
📄 each.js
↓
X
📄 errors.js
↓
X
📄 es5.js
↓
X
📄 filter.js
↓
X
📄 finally.js
↓
X
📄 generators.js
↓
X
📄 join.js
↓
X
📄 map.js
↓
X
📄 method.js
↓
X
📄 nodeback.js
↓
X
📄 nodeify.js
↓
X
📄 promise.js
↓
X
📄 promise_array.js
↓
X
📄 promisify.js
↓
X
📄 props.js
↓
X
📄 queue.js
↓
X
📄 race.js
↓
X
📄 reduce.js
↓
X
📄 schedule.js
↓
X
📄 settle.js
↓
X
📄 some.js
↓
X
📄 synchronous_inspection.js
↓
X
📄 thenables.js
↓
X
📄 timers.js
↓
X
📄 using.js
↓
X
📄 util.js
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: queue.js
"use strict"; function arrayMove(src, srcIndex, dst, dstIndex, len) { for (var j = 0; j < len; ++j) { dst[j + dstIndex] = src[j + srcIndex]; src[j + srcIndex] = void 0; } } function Queue(capacity) { this._capacity = capacity; this._length = 0; this._front = 0; } Queue.prototype._willBeOverCapacity = function (size) { return this._capacity < size; }; Queue.prototype._pushOne = function (arg) { var length = this.length(); this._checkCapacity(length + 1); var i = (this._front + length) & (this._capacity - 1); this[i] = arg; this._length = length + 1; }; Queue.prototype.push = function (fn, receiver, arg) { var length = this.length() + 3; if (this._willBeOverCapacity(length)) { this._pushOne(fn); this._pushOne(receiver); this._pushOne(arg); return; } var j = this._front + length - 3; this._checkCapacity(length); var wrapMask = this._capacity - 1; this[(j + 0) & wrapMask] = fn; this[(j + 1) & wrapMask] = receiver; this[(j + 2) & wrapMask] = arg; this._length = length; }; Queue.prototype.shift = function () { var front = this._front, ret = this[front]; this[front] = undefined; this._front = (front + 1) & (this._capacity - 1); this._length--; return ret; }; Queue.prototype.length = function () { return this._length; }; Queue.prototype._checkCapacity = function (size) { if (this._capacity < size) { this._resizeTo(this._capacity << 1); } }; Queue.prototype._resizeTo = function (capacity) { var oldCapacity = this._capacity; this._capacity = capacity; var front = this._front; var length = this._length; var moveItemsCount = (front + length) & (oldCapacity - 1); arrayMove(this, 0, this, oldCapacity, moveItemsCount); }; module.exports = Queue;
SIMPAN PERUBAHAN