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 byteLength (string, encoding) { 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 'binary': // Deprecated c...
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
byteLength
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function slowToString (encoding, start, end) { var loweredCase = false start = start | 0 end = end === undefined || end === Infinity ? this.length : end | 0 if (!encoding) encoding = 'utf8' if (start < 0) start = 0 if (end > this.length) end = this.length if (end <= start) return '' while (true) { ...
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
slowToString
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function arrayIndexOf (arr, val, byteOffset) { var foundIndex = -1 for (var i = 0; byteOffset + i < arr.length; i++) { if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { if (foundIndex === -1) foundIndex = i if (i - foundIndex + 1 === val.length) return byteOffset +...
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
arrayIndexOf
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 digits var strLen = str...
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
hexWrite
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function utf8Write (buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
utf8Write
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
asciiWrite
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function binaryWrite (buf, string, offset, length) { return asciiWrite(buf, string, offset, length) }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
binaryWrite
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
base64Write
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function ucs2Write (buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
ucs2Write
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf) } else { return base64.fromByteArray(buf.slice(start, end)) } }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
base64Slice
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 + bytesPer...
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
utf8Slice
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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) { res += Strin...
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
decodeCodePointsArray
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
asciiSlice
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function binarySlice (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 }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
binarySlice
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
hexSlice
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
utf16leSlice
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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') }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
checkOffset
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function checkInt (buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') if (value > max || value < min) throw new RangeError('value is out of bounds') if (offset + ext > buf.length) throw new RangeError('index out of range') }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
checkInt
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 } }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
objectWriteUInt16
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 } }
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected -- it returns a single octet. By augmenting the instances, we can avoid modify...
objectWriteUInt32
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function checkIEEE754 (buf, value, offset, ext, max, min) { if (value > max || value < min) throw new RangeError('value is out of bounds') if (offset + ext > buf.length) throw new RangeError('index out of range') if (offset < 0) throw new RangeError('index out of range') }
Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. Added in Node 0.12. Only available in browsers that support ArrayBuffer.
checkIEEE754
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) } ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
writeFloat
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) } ieee754.write(buf, value, offset, littleEndian, 52, 8) return offset + 8 }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
writeDouble
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 trailing...
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
base64clean
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
stringtrim
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
toHex
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 < 0xE000) { ...
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
utf8ToBytes
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
asciiToBytes
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
utf16leToBytes
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function base64ToBytes (str) { return base64.toByteArray(base64clean(str)) }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
base64ToBytes
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.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 }
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
blitBuffer
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function decode (elt) { var code = elt.charCodeAt(0) if (code === PLUS || code === PLUS_URL_SAFE) return 62 // '+' if (code === SLASH || code === SLASH_URL_SAFE) return 63 // '/' if (code < NUMBER) return -1 //no match if (code < NUMBER + 10) return code - NUMBER + 26 + 26 if (code <...
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
decode
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function b64ToByteArray (b64) { var i, j, l, tmp, placeHolders, arr if (b64.length % 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, than the two characters before it // represent one byte // i...
Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
b64ToByteArray
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function uint8ToBase64 (uint8) { var i, extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes output = "", temp, length function encode (num) { return lookup.charAt(num) } function tripletToBase64 (num) { return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >>...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
uint8ToBase64
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function encode (num) { return lookup.charAt(num) }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
encode
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function tripletToBase64 (num) { return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
tripletToBase64
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function CookieAccessInfo(domain, path, secure, script) { if (this instanceof CookieAccessInfo) { this.domain = domain || undefined; this.path = path || "/"; this.secure = !!secure; this.script = !!script; return this; } return new Cook...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
CookieAccessInfo
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function Cookie(cookiestr, request_domain, request_path) { if (cookiestr instanceof Cookie) { return cookiestr; } if (this instanceof Cookie) { this.name = null; this.value = null; this.expiration_date = Infinity; this.path = String(req...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
Cookie
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function CookieJar() { var cookies, cookies_list, collidable_cookie; if (this instanceof CookieJar) { cookies = Object.create(null); //name: [Cookie] this.setCookie = function setCookie(cookie, request_domain, request_path) { var remove, i; cookie...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
CookieJar
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function deprecated(name) { return function () { throw new Error('Function ' + name + ' is deprecated and cannot be used.'); }; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
deprecated
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function isNothing(subject) { return (typeof subject === 'undefined') || (subject === null); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
isNothing
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function isObject(subject) { return (typeof subject === 'object') && (subject !== null); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
isObject
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function toArray(sequence) { if (Array.isArray(sequence)) return sequence; else if (isNothing(sequence)) return []; return [ sequence ]; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
toArray
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function extend(target, source) { var index, length, key, sourceKeys; if (source) { sourceKeys = Object.keys(source); for (index = 0, length = sourceKeys.length; index < length; index += 1) { key = sourceKeys[index]; target[key] = source[key]; } } return target; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
extend
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function repeat(string, count) { var result = '', cycle; for (cycle = 0; cycle < count; cycle += 1) { result += string; } return result; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
repeat
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function isNegativeZero(number) { return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
isNegativeZero
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function compileStyleMap(schema, map) { var result, keys, index, length, tag, style, type; if (map === null) return {}; result = {}; keys = Object.keys(map); for (index = 0, length = keys.length; index < length; index += 1) { tag = keys[index]; style = String(map[tag]); if (tag.slice(0, 2) ===...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
compileStyleMap
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function encodeHex(character) { var string, handle, length; string = character.toString(16).toUpperCase(); if (character <= 0xFF) { handle = 'x'; length = 2; } else if (character <= 0xFFFF) { handle = 'u'; length = 4; } else if (character <= 0xFFFFFFFF) { handle = 'U'; length = 8; ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
encodeHex
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function State(options) { this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; this.indent = Math.max(1, (options['indent'] || 2)); this.skipInvalid = options['skipInvalid'] || false; this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); this.styleMap = ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
State
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function indentString(string, spaces) { var ind = common.repeat(' ', spaces), position = 0, next = -1, result = '', line, length = string.length; while (position < length) { next = string.indexOf('\n', position); if (next === -1) { line = string.slice(position); po...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
indentString
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function generateNextLine(state, level) { return '\n' + common.repeat(' ', state.indent * level); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
generateNextLine
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function testImplicitResolving(state, str) { var index, length, type; for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { type = state.implicitTypes[index]; if (type.resolve(str)) { return true; } } return false; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
testImplicitResolving
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function isWhitespace(c) { return c === CHAR_SPACE || c === CHAR_TAB; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
isWhitespace
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function isPrintable(c) { return (0x00020 <= c && c <= 0x00007E) || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) || (0x10000 <= c && c <= 0x10FFFF); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
isPrintable
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function isPlainSafe(c) { // Uses a subset of nb-char - c-flow-indicator - ":" - "#" // where nb-char ::= c-printable - b-char - c-byte-order-mark. return isPrintable(c) && c !== 0xFEFF // - c-flow-indicator && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
isPlainSafe
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { var i; var char; var hasLineBreak = false; var hasFoldableLine = false; // only checked if shouldTrackWidth var shouldTrackWidth = lineWidth !== -1; var previousLineBreak = -1; // count the first line correctl...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
chooseScalarStyle
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function testAmbiguity(string) { return testImplicitResolving(state, string); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
testAmbiguity
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function blockHeader(string, indentPerLevel) { var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : ''; // note the special case: the string '\n' counts as a "trailing" empty line. var clip = string[string.length - 1] === '\n'; var keep = clip && (string[string.length - 2] === '\n' || ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
blockHeader
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function dropEndingNewline(string) { return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
dropEndingNewline
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function foldLine(line, width) { if (line === '' || line[0] === ' ') return line; // Since a more-indented line adds a \n, breaks can't be followed by a space. var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. var match; // start is an inclusive index. end, curr, and next are exclu...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
foldLine
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function escapeString(string) { var result = ''; var char; var escapeSeq; for (var i = 0; i < string.length; i++) { char = string.charCodeAt(i); escapeSeq = ESCAPE_SEQUENCES[char]; result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); } return result...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
escapeString
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeFlowSequence(state, level, object) { var _result = '', _tag = state.tag, index, length; for (index = 0, length = object.length; index < length; index += 1) { // Write only valid elements. if (writeNode(state, level, object[index], false, false)) { if (index !== 0) _...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
writeFlowSequence
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeBlockSequence(state, level, object, compact) { var _result = '', _tag = state.tag, index, length; for (index = 0, length = object.length; index < length; index += 1) { // Write only valid elements. if (writeNode(state, level + 1, object[index], true, true)) { if (!c...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
writeBlockSequence
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeFlowMapping(state, level, object) { var _result = '', _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; for (index = 0, length = objectKeyList.length; index < length; index += 1) { pai...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
writeFlowMapping
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeBlockMapping(state, level, object, compact) { var _result = '', _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; // Allow sorting keys so that the output file is deter...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
writeBlockMapping
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function detectType(state, object, explicit) { var _result, typeList, index, length, type, style; typeList = explicit ? state.explicitTypes : state.implicitTypes; for (index = 0, length = typeList.length; index < length; index += 1) { type = typeList[index]; if ((type.instanceOf || type.predicate) && ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
detectType
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeNode(state, level, object, block, compact, iskey) { state.tag = null; state.dump = object; if (!detectType(state, object, false)) { detectType(state, object, true); } var type = _toString.call(state.dump); if (block) { block = (state.flowLevel < 0 || state.flowLevel > level); } ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
writeNode
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function getDuplicateReferences(object, state) { var objects = [], duplicatesIndexes = [], index, length; inspectNode(object, objects, duplicatesIndexes); for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { state.duplicates.push(objects[duplicatesIndexes[index]...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
getDuplicateReferences
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function inspectNode(object, objects, duplicatesIndexes) { var objectKeyList, index, length; if (object !== null && typeof object === 'object') { index = objects.indexOf(object); if (index !== -1) { if (duplicatesIndexes.indexOf(index) === -1) { duplicatesIndexes.push(index); ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
inspectNode
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function dump(input, options) { options = options || {}; var state = new State(options); if (!state.noRefs) getDuplicateReferences(input, state); if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; return ''; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
dump
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function safeDump(input, options) { return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
safeDump
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function YAMLException(reason, mark) { // Super constructor Error.call(this); // Include stack trace in error object if (Error.captureStackTrace) { // Chrome and NodeJS Error.captureStackTrace(this, this.constructor); } else { // FF, IE 10+ and Safari 6+. Fallback for others this.stack = (new...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
YAMLException
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function is_EOL(c) { return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
is_EOL
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function is_WHITE_SPACE(c) { return (c === 0x09/* Tab */) || (c === 0x20/* Space */); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
is_WHITE_SPACE
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function is_WS_OR_EOL(c) { return (c === 0x09/* Tab */) || (c === 0x20/* Space */) || (c === 0x0A/* LF */) || (c === 0x0D/* CR */); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
is_WS_OR_EOL
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function is_FLOW_INDICATOR(c) { return c === 0x2C/* , */ || c === 0x5B/* [ */ || c === 0x5D/* ] */ || c === 0x7B/* { */ || c === 0x7D/* } */; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
is_FLOW_INDICATOR
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function fromHexCode(c) { var lc; if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { return c - 0x30; } /*eslint-disable no-bitwise*/ lc = c | 0x20; if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { return lc - 0x61 + 10; } return -1; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
fromHexCode
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function escapedHexLen(c) { if (c === 0x78/* x */) { return 2; } if (c === 0x75/* u */) { return 4; } if (c === 0x55/* U */) { return 8; } return 0; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
escapedHexLen
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function fromDecimalCode(c) { if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { return c - 0x30; } return -1; }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
fromDecimalCode
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function simpleEscapeSequence(c) { return (c === 0x30/* 0 */) ? '\x00' : (c === 0x61/* a */) ? '\x07' : (c === 0x62/* b */) ? '\x08' : (c === 0x74/* t */) ? '\x09' : (c === 0x09/* Tab */) ? '\x09' : (c === 0x6E/* n */) ? '\x0A' : (c === 0x76/* v */) ? '\x0B' : (...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
simpleEscapeSequence
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function charFromCodepoint(c) { if (c <= 0xFFFF) { return String.fromCharCode(c); } // Encode UTF-16 surrogate pair // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, ((c - 0x010000) & 0x03FF...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
charFromCodepoint
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function State(input, options) { this.input = input; this.filename = options['filename'] || null; this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; this.onWarning = options['onWarning'] || null; this.legacy = options['legacy'] || false; this.json = options['json'] || false; ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
State
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function generateError(state, message) { return new YAMLException( message, new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
generateError
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function throwError(state, message) { throw generateError(state, message); }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
throwError
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function throwWarning(state, message) { if (state.onWarning) { state.onWarning.call(null, generateError(state, message)); } }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
throwWarning
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function captureSegment(state, start, end, checkJson) { var _position, _length, _character, _result; if (start < end) { _result = state.input.slice(start, end); if (checkJson) { for (_position = 0, _length = _result.length; _position < _length; _position += 1) { _charac...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
captureSegment
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function mergeMappings(state, destination, source, overridableKeys) { var sourceKeys, key, index, quantity; if (!common.isObject(source)) { throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); } sourceKeys = Object.keys(source); for (index = 0, quantity = sourceKeys.l...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
mergeMappings
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode) { var index, quantity; keyNode = String(keyNode); if (_result === null) { _result = {}; } if (keyTag === 'tag:yaml.org,2002:merge') { if (Array.isArray(valueNode)) { for (index = 0, quantity = valueNode.len...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
storeMappingPair
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readLineBreak(state) { var ch; ch = state.input.charCodeAt(state.position); if (ch === 0x0A/* LF */) { state.position++; } else if (ch === 0x0D/* CR */) { state.position++; if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { state.position++; } } else { throwErr...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readLineBreak
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function skipSeparationSpace(state, allowComments, checkIndent) { var lineBreaks = 0, ch = state.input.charCodeAt(state.position); while (ch !== 0) { while (is_WHITE_SPACE(ch)) { ch = state.input.charCodeAt(++state.position); } if (allowComments && ch === 0x23/* # */) { do { ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
skipSeparationSpace
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function testDocumentSeparator(state) { var _position = state.position, ch; ch = state.input.charCodeAt(_position); // Condition state.position === state.lineStart is tested // in parent on each call, for efficiency. No needs to test here again. if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
testDocumentSeparator
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function writeFoldedLines(state, count) { if (count === 1) { state.result += ' '; } else if (count > 1) { state.result += common.repeat('\n', count - 1); } }
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
writeFoldedLines
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readPlainScalar(state, nodeIndent, withinFlowCollection) { var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; ch = state.input.charCodeAt(state.po...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readPlainScalar
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readSingleQuotedScalar(state, nodeIndent) { var ch, captureStart, captureEnd; ch = state.input.charCodeAt(state.position); if (ch !== 0x27/* ' */) { return false; } state.kind = 'scalar'; state.result = ''; state.position++; captureStart = captureEnd = state.position; while ((ch...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readSingleQuotedScalar
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readDoubleQuotedScalar(state, nodeIndent) { var captureStart, captureEnd, hexLength, hexResult, tmp, ch; ch = state.input.charCodeAt(state.position); if (ch !== 0x22/* " */) { return false; } state.kind = 'scalar'; state.result = ''; state.position++; captur...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readDoubleQuotedScalar
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readFlowCollection(state, nodeIndent) { var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, keyNode, keyTag, valueNode,...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readFlowCollection
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readBlockScalar(state, nodeIndent) { var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; ch = state.input.charCodeA...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readBlockScalar
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readBlockSequence(state, nodeIndent) { var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.positi...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readBlockSequence
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readBlockMapping(state, nodeIndent, flowIndent) { var following, allowCompact, _line, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readBlockMapping
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0
function readTagProperty(state) { var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; ch = state.input.charCodeAt(state.position); if (ch !== 0x21/* ! */) return false; if (state.tag !== null) { throwError(state, 'duplication of a tag property'); ...
Whether or not the given `val` is an array. example: isArray([]); // > true isArray(arguments); // > false isArray(''); // > false @param {mixed} val @return {bool}
readTagProperty
javascript
edp963/wormhole
rider/swagger-ui/swagger-ui.js
https://github.com/edp963/wormhole/blob/master/rider/swagger-ui/swagger-ui.js
Apache-2.0