code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function extname(path) {
const filename = basename(path);
const dotIndex = filename.lastIndexOf(".");
if (dotIndex === -1) {
return "";
}
return filename.slice(dotIndex);
} | Checks if the hunk exactly fits on the provided location | extname | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function basename(path) {
return path.split(sep).pop();
} | Checks if the hunk exactly fits on the provided location | basename | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function isAbsolute() {
return true;
} | Checks if the hunk exactly fits on the provided location | isAbsolute | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function init() {
inited = true;
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i];
revLookup[code.charCodeAt(i)] = i;
}
revLookup['-'.charCodeAt(0)] = 62;
revLookup['_'.charCodeAt(0... | Checks if the hunk exactly fits on the provided location | init | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function toByteArray(b64) {
if (!inited) {
init();
}
var i, j, l, tmp, placeHolders, arr;
var len = b64.length;
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4');
} // the number of equal signs (place holders)
// if there are two placeholders,... | Checks if the hunk exactly fits on the provided location | toByteArray | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function tripletToBase64(num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
} | Checks if the hunk exactly fits on the provided location | tripletToBase64 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function encodeChunk(uint8, start, end) {
var tmp;
var output = [];
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
output.push(tripletToBase64(tmp));
}
return output.join('');
} | Checks if the hunk exactly fits on the provided location | encodeChunk | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function fromByteArray(uint8) {
if (!inited) {
init();
}
var tmp;
var len = uint8.length;
var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
var output = '';
var parts = [];
var maxChunkLength = 16383; // must be multiple of 3
// go through the array every three... | Checks if the hunk exactly fits on the provided location | fromByteArray | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function read(buffer, offset, isLE, mLen, nBytes) {
var e, m;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = -7;
var i = isLE ? nBytes - 1 : 0;
var d = isLE ? -1 : 1;
var s = buffer[offset + i];
i += d;
e = s & (1 << -nBits) - 1;
... | Checks if the hunk exactly fits on the provided location | read | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function write(buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
var i = isLE ? 0 : nBytes - 1;
var d = isLE ? 1 : -1;
var s = valu... | Checks if the hunk exactly fits on the provided location | write | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function Buffer(arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length);
} // Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error('If encoding i... | The Buffer constructor returns instances of `Uint8Array` that have their
prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
`Uint8Array`, so the returned instances will have all the node `Buffer` methods
and the `Uint8Array` methods. Square bracket notation works as expected -- it
returns a... | Buffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function from(that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number');
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length);
}
... | The Buffer constructor returns instances of `Uint8Array` that have their
prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
`Uint8Array`, so the returned instances will have all the node `Buffer` methods
and the `Uint8Array` methods. Square bracket notation works as expected -- it
returns a... | from | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function assertSize(size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number');
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative');
}
} | Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
if value is a number.
Buffer.from(str[, encoding])
Buffer.from(array)
Buffer.from(buffer)
Buffer.from(arrayBuffer[, byteOffset[, length]]) | assertSize | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function alloc(that, size, fill, encoding) {
assertSize(size);
if (size <= 0) {
return createBuffer(that, size);
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a ... | Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
if value is a number.
Buffer.from(str[, encoding])
Buffer.from(array)
Buffer.from(buffer)
Buffer.from(arrayBuffer[, byteOffset[, length]]) | alloc | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function allocUnsafe(that, size) {
assertSize(size);
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0;
}
}
return that;
} | Creates a new filled Buffer instance.
alloc(size[, fill[, encoding]]) | allocUnsafe | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function fromString(that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8';
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding');
}
var length = byteLength(string, encoding) | 0;
that = c... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | fromString | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function fromArrayLike(that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0;
that = createBuffer(that, length);
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255;
}
return that;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | fromArrayLike | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function fromArrayBuffer(that, array, byteOffset, length) {
array.byteLength; // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds');
}
if (array.byteLength < byteOffset + (length || 0)) {
... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | fromArrayBuffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function fromObject(that, obj) {
if (internalIsBuffer(obj)) {
var len = checked(obj.length) | 0;
that = createBuffer(that, len);
if (that.length === 0) {
return that;
}
obj.copy(that, 0, 0, len);
return that;
}
if (obj) {
if (typeof ArrayBuffer !== 'undef... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | fromObject | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function checked(length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' b... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | checked | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function internalIsBuffer(b) {
return !!(b != null && b._isBuffer);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | internalIsBuffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function byteLength(string, 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 ... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | byteLength | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function slowToString(encoding, start, 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... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | slowToString | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function swap(b, n, m) {
var i = b[n];
b[n] = b[m];
b[m] = i;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | swap | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, 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) {
byteOff... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | bidirectionalIndexOf | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function arrayIndexOf(arr, val, byteOffset, encoding, 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' || enco... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | arrayIndexOf | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function read(buf, i) {
if (indexSize === 1) {
return buf[i];
} else {
return buf.readUInt16BE(i * indexSize);
}
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | read | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function hexWrite(buf, string, offset, length) {
offset = Number(offset) || 0;
var remaining = buf.length - offset;
if (!length) {
length = remaining;
} else {
length = Number(length);
if (length > remaining) {
length = remaining;
}
} // must be an even number of di... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | hexWrite | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function utf8Write(buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | utf8Write | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function asciiWrite(buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | asciiWrite | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function latin1Write(buf, string, offset, length) {
return asciiWrite(buf, string, offset, length);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | latin1Write | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function base64Write(buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | base64Write | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function ucs2Write(buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | ucs2Write | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function base64Slice(buf, start, end) {
if (start === 0 && end === buf.length) {
return fromByteArray(buf);
} else {
return fromByteArray(buf.slice(start, end));
}
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | base64Slice | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function utf8Slice(buf, start, end) {
end = Math.min(buf.length, end);
var res = [];
var i = start;
while (i < end) {
var firstByte = buf[i];
var codePoint = null;
var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
if (i + bytesPerSeq... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | utf8Slice | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function decodeCodePointsArray(codePoints) {
var len = codePoints.length;
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
} // Decode in chunks to avoid "call stack size exceeded".
var res = '';
var i = 0;
while (i < len) ... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | decodeCodePointsArray | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function asciiSlice(buf, start, end) {
var ret = '';
end = Math.min(buf.length, end);
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F);
}
return ret;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | asciiSlice | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function latin1Slice(buf, start, end) {
var ret = '';
end = Math.min(buf.length, end);
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i]);
}
return ret;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | latin1Slice | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function hexSlice(buf, start, end) {
var len = buf.length;
if (!start || start < 0) start = 0;
if (!end || end < 0 || end > len) end = len;
var out = '';
for (var i = start; i < end; ++i) {
out += toHex(buf[i]);
}
return out;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | hexSlice | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function utf16leSlice(buf, start, end) {
var bytes = buf.slice(start, end);
var res = '';
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
}
return res;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | utf16leSlice | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function checkOffset(offset, ext, length) {
if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | checkOffset | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function checkInt(buf, value, offset, ext, max, min) {
if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
if (offset + ext > buf.length) throw new RangeError('Index out of ... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | checkInt | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function objectWriteUInt16(buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1;
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
}
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | objectWriteUInt16 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function objectWriteUInt32(buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1;
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
}
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | objectWriteUInt32 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function checkIEEE754(buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range');
if (offset < 0) throw new RangeError('Index out of range');
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | checkIEEE754 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function writeFloat(buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4);
}
write(buf, value, offset, littleEndian, 23, 4);
return offset + 4;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | writeFloat | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function writeDouble(buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8);
}
write(buf, value, offset, littleEndian, 52, 8);
return offset + 8;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | writeDouble | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function base64clean(str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trai... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | base64clean | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function stringtrim(str) {
if (str.trim) return str.trim();
return str.replace(/^\s+|\s+$/g, '');
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | stringtrim | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function toHex(n) {
if (n < 16) return '0' + n.toString(16);
return n.toString(16);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | toHex | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function utf8ToBytes(string, units) {
units = units || Infinity;
var codePoint;
var length = string.length;
var leadSurrogate = null;
var bytes = [];
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i); // is surrogate component
if (codePoint > 0xD7FF && codePoint <... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | utf8ToBytes | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function asciiToBytes(str) {
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF);
}
return byteArray;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | asciiToBytes | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function utf16leToBytes(str, units) {
var c, hi, lo;
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break;
c = str.charCodeAt(i);
hi = c >> 8;
lo = c % 256;
byteArray.push(lo);
byteArray.push(hi);
}
return byteArray;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | utf16leToBytes | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function base64ToBytes(str) {
return toByteArray(base64clean(str));
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | base64ToBytes | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function blitBuffer(src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if (i + offset >= dst.length || i >= src.length) break;
dst[i + offset] = src[i];
}
return i;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | blitBuffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function isnan(val) {
return val !== val; // eslint-disable-line no-self-compare
} // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | isnan | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function isBuffer(obj) {
return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj));
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | isBuffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function isFastBuffer(obj) {
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
} // For Node v0.10 support. Remove this eventually. | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | isFastBuffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function isSlowBuffer(obj) {
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0));
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | isSlowBuffer | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | unwrapExports | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | createCommonjsModule | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function getCjsExportFromNamespace (n) {
return n && n['default'] || n;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | getCjsExportFromNamespace | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | fromPairs | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = sourc... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _objectWithoutPropertiesLoose | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _taggedTemplateLiteral(strings, raw) {
if (!raw) {
raw = strings.slice(0);
}
return Object.freeze(Object.defineProperties(strings, {
raw: {
value: Object.freeze(raw)
}
}));
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _taggedTemplateLiteral | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | defaultSetTimout | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function defaultClearTimeout() {
throw new Error('clearTimeout has not been defined');
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | defaultClearTimeout | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
} // if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeo... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | runTimeout | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
} // if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeou... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | runClearTimeout | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | cleanUpNextTick | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIn... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | drainQueue | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function nextTick(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | nextTick | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function Item(fun, array) {
this.fun = fun;
this.array = array;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | Item | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function binding(name) {
throw new Error('process.binding is not supported');
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | binding | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function cwd() {
return '/';
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | cwd | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function chdir(dir) {
throw new Error('process.chdir is not supported');
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | chdir | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function umask() {
return 0;
} // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | umask | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function hrtime(previousTimestamp) {
var clocktime = performanceNow.call(performance) * 1e-3;
var seconds = Math.floor(clocktime);
var nanoseconds = Math.floor(clocktime % 1 * 1e9);
if (previousTimestamp) {
seconds = seconds - previousTimestamp[0];
nanoseconds = nanoseconds - previousTimest... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | hrtime | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function uptime() {
var currentTime = new Date();
var dif = currentTime - startTime;
return dif / 1000;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | uptime | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
createToken = (name, value, isGlobal) => {
const index = R++;
debug_1(index, value);
t[name] = index;
src[index] = value;
re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | createToken | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
createToken = (name, value, isGlobal) => {
const index = R++;
debug_1(index, value);
t[name] = index;
src[index] = value;
re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | createToken | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
compareIdentifiers = (a, b) => {
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
a = +a;
b = +b;
}
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | compareIdentifiers | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
compareIdentifiers = (a, b) => {
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
a = +a;
b = +b;
}
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | compareIdentifiers | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
constructor(version, options) {
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
};
}
if (version instanceof SemVer) {
if (version.loose === !!options.loose && version.includePrerelease === !!options.incl... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
format() {
this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
if (this.prerelease.length) {
this.version += "-".concat(this.prerelease.join('.'));
}
return this.version;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | format | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
toString() {
return this.version;
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | toString | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
compare(other) {
debug_1('SemVer.compare', this.version, this.options, other);
if (!(other instanceof SemVer)) {
if (typeof other === 'string' && other === this.version) {
return 0;
}
other = new SemVer(other, this.options);
}
if (other.version === this.versi... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | compare | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
compareMain(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
return compareIdentifiers$1(this.major, other.major) || compareIdentifiers$1(this.minor, other.minor) || compareIdentifiers$1(this.patch, other.patch);
} | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | compareMain | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
comparePre(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
} // NOT having a prerelease is > having one
if (this.prerelease.length && !other.prerelease.length) {
return -1;
} else if (!this.prerelease.length && other.prerelease.length) {
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | comparePre | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
compareBuild(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
let i = 0;
do {
const a = this.build[i];
const b = other.build[i];
debug_1('prerelease compare', i, a, b);
if (a === undefined && b === undefined) {
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | compareBuild | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
inc(release, identifier) {
switch (release) {
case 'premajor':
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc('pre', identifier);
break;
case 'preminor':
this.prerelease.length = 0;
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | inc | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
arrayify = (object, keyName) => Object.entries(object).map(([key, value]) => Object.assign({
[keyName]: key
}, value)) | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | arrayify | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function dedent(strings) {
var raw = void 0;
if (typeof strings === "string") {
// dedent can be used as a plain function
raw = [strings];
} else {
raw = strings.raw;
} // first, perform interpolation
var result = "";
for (var i = 0; i < raw.length; i++) {... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | dedent | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _templateObject6() {
const data = _taggedTemplateLiteral(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);
_templateObject6 = function _templateObject6() {
return data;
};
return data;
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _templateObject6 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _templateObject5() {
const data = _taggedTemplateLiteral(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
_templateObjec... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _templateObject5 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _templateObject4() {
const data = _taggedTemplateLiteral(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
_templateObject4 = function _temp... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _templateObject4 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _templateObject3() {
const data = _taggedTemplateLiteral(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);
_templateO... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _templateObject3 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _templateObject2() {
const data = _taggedTemplateLiteral(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _templateObject2 | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function _templateObject() {
const data = _taggedTemplateLiteral(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);
_templateObject = function _templateObject() {
return data;
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | _templateObject | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
function getSupportInfo({
plugins = [],
showUnreleased = false,
showDeprecated = false,
showInternal = false
} = {}) {
// pre-release version is smaller than the normal version in semver,
// we need to treat it as the normal one so as to test new features.
const version = currentVersion.sp... | Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugi... | getSupportInfo | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/standalone.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.