filename
stringlengths 20
188
| language
stringclasses 3
values | AST-segments
stringlengths 0
204k
|
---|---|---|
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | len = Math.min(x |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i];
y = b[i];
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
};
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
};
Buffer.concat = function concat (list |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | length) {
if (!isArray$1(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i;
if (length === undefined) {
length = 0;
for (i = 0; i < list.length; ++i) {
length += list[i].length;
}
}
var buffer = Buffer.allocUnsafe(length);
var pos = 0;
for (i = 0; i < list.length; ++i) {
var buf = list[i];
if (!internalIsBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | pos);
pos += buf.length;
}
return buffer
};
function byteLength (string |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding) {
if (internalIsBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string;
}
var len = string.length;
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false;
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase();
loweredCase = true;
}
}
}
Buffer.byteLength = byteLength;
function slowToString (encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end) {
var loweredCase = false;
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0;
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length;
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0;
start >>>= 0;
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8';
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end)
case 'utf8':
case 'utf-8':
return utf8Slice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end)
case 'ascii':
return asciiSlice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end)
case 'latin1':
case 'binary':
return latin1Slice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end)
case 'base64':
return base64Slice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase();
loweredCase = true;
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true;
function swap (b |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | n |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | m) {
var i = b[n];
b[n] = b[m];
b[m] = i;
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length;
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 1);
}
return this
};
Buffer.prototype.swap32 = function swap32 () {
var len = this.length;
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 3);
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 1 |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 2);
}
return this
};
Buffer.prototype.swap64 = function swap64 () {
var len = this.length;
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 7);
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 1 |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 6);
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 2 |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 5);
swap(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 3 |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + 4);
}
return this
};
Buffer.prototype.toString = function toString () {
var length = this.length | 0;
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | 0 |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | length)
return slowToString.apply(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | arguments)
};
Buffer.prototype.equals = function equals (b) {
if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | b) === 0
};
Buffer.prototype.inspect = function inspect () {
var str = '';
var max = INSPECT_MAX_BYTES;
if (this.length > 0) {
str = this.toString('hex' |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | 0 |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | max).match(/.{2}/g).join(' ');
if (this.length > max) str += ' ... ';
}
return '<Buffer ' + str + '>'
};
Buffer.prototype.compare = function compare (target |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | thisStart |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | thisEnd) {
if (!internalIsBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0;
}
if (end === undefined) {
end = target ? target.length : 0;
}
if (thisStart === undefined) {
thisStart = 0;
}
if (thisEnd === undefined) {
thisEnd = this.length;
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0;
end >>>= 0;
thisStart >>>= 0;
thisEnd >>>= 0;
if (this === target) return 0
var x = thisEnd - thisStart;
var y = end - start;
var len = Math.min(x |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | y);
var thisCopy = this.slice(thisStart |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | thisEnd);
var targetCopy = target.slice(start |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | end);
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i];
y = targetCopy[i];
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
};
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset` |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | Buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | relevant is val is a string
// - dir - true for indexOf |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | false for lastIndexOf
function bidirectionalIndexOf (buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset;
byteOffset = 0;
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff;
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000;
}
byteOffset = +byteOffset; // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | null |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | NaN |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | "foo" |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | etc |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1);
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1;
} else if (byteOffset < 0) {
if (dir) byteOffset = 0;
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding);
}
// Finally |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | search either indexOf (if dir is true) or lastIndexOf
if (internalIsBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | dir)
} else if (typeof val === 'number') {
val = val & 0xFF; // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT &&
typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset)
}
}
return arrayIndexOf(buffer |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | [ val ] |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | dir)
}
throw new TypeError('val must be string |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | number or Buffer')
}
function arrayIndexOf (arr |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | dir) {
var indexSize = 1;
var arrLength = arr.length;
var valLength = val.length;
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase();
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2;
arrLength /= 2;
valLength /= 2;
byteOffset /= 2;
}
}
function read (buf |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i;
if (dir) {
var foundIndex = -1;
for (i = byteOffset; i < arrLength; i++) {
if (read(arr |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i) === read(val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i;
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex;
foundIndex = -1;
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
for (i = byteOffset; i >= 0; i--) {
var found = true;
for (var j = 0; j < valLength; j++) {
if (read(arr |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | i + j) !== read(val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | j)) {
found = false;
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding) {
return this.indexOf(val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding) !== -1
};
Buffer.prototype.indexOf = function indexOf (val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding) {
return bidirectionalIndexOf(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | true)
};
Buffer.prototype.lastIndexOf = function lastIndexOf (val |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | byteOffset |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | encoding) {
return bidirectionalIndexOf(this |
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js | javascript | val |