filename
stringlengths
20
188
language
stringclasses
3 values
AST-segments
stringlengths
0
204k
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
''); // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===)
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
base64-js does not while (str.length % 4 !== 0) { str = str + '='; } return str } function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'') } function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } function utf8ToBytes (string
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
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) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBD); continue } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBD); continue } // valid lead leadSurrogate = codePoint; continue } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBD); leadSurrogate = codePoint; continue } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; } else if (leadSurrogate) { // valid bmp char
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBF
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0xBD); } leadSurrogate = null; // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint); } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
codePoint & 0x3F | 0x80 ); } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
codePoint >> 0x6 & 0x3F | 0x80
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
codePoint & 0x3F | 0x80 ); } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
codePoint >> 0xC & 0x3F | 0x80
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
codePoint >> 0x6 & 0x3F | 0x80
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
codePoint & 0x3F | 0x80 ); } else { throw new Error('Invalid code point') } } return bytes } 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 } function utf16leToBytes (str
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
units) { var c
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
hi
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
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 } function base64ToBytes (str) { return toByteArray(base64clean(str)) } function blitBuffer (src
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
dst
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
offset
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i]; } return i } function isnan (val) { return val !== val // eslint-disable-line no-self-compare } // the following is from is-buffer
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
also by Feross Aboukhadijeh and with same lisence // The _isBuffer check is for Safari 5-7 support
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
because it's missing // Object.prototype.constructor. Remove this eventually function isBuffer$1(obj) { return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) } function isFastBuffer (obj) { return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } // For Node v0.10 support. Remove this eventually. function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0)) } // shim for using process in browser // based off https://github.com/defunctzombie/node-process/blob/master/browser.js function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } var cachedSetTimeout = defaultSetTimout; var cachedClearTimeout = defaultClearTimeout; if (typeof global$1.setTimeout === 'function') { cachedSetTimeout = setTimeout; } if (typeof global$1.clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
fun
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
fun
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
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) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } 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[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } 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
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } } // v8 likes predictible objects function Item(fun
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
this.array); }; // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js var performance = global$1.performance || {}; performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function(){ return (new Date()).getTime() }; var inherits; if (typeof Object.create === 'function'){ inherits = function inherits(ctor
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
superCtor) { // implementation from standard node.js 'util' module ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
{ constructor: { value: ctor
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
enumerable: false
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
writable: true
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
configurable: true } }); }; } else { inherits = function inherits(ctor
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
superCtor) { ctor.super_ = superCtor; var TempCtor = function () {}; TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; }; } var inherits$1 = inherits; var formatRegExp = /%[sdj%]/g; function format(f) { if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { objects.push(inspect(arguments[i])); } return objects.join(' '); } var i = 1; var args = arguments; var len = args.length; var str = String(f).replace(formatRegExp
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
function(x) { if (x === '%%') return '%'; if (i >= len) return x; switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } default: return x; } }); for (var x = args[i]; i < len; x = args[++i]) { if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { str += ' ' + inspect(x); } } return str; } // Mark that a method should not be used. // Returns a modified function which warns once by default. // If --no-deprecation is set
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
then it is a no-op. function deprecate(fn
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
msg) { // Allow for deprecating things in the process of starting up. if (isUndefined(global$1.process)) { return function() { return deprecate(fn
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
msg).apply(this
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
arguments); }; } var warned = false; function deprecated() { if (!warned) { { console.error(msg); } warned = true; } return fn.apply(this
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
arguments); } return deprecated; } var debugs = {}; var debugEnviron; function debuglog(set) { if (isUndefined(debugEnviron)) debugEnviron = ''; set = set.toUpperCase(); if (!debugs[set]) { if (new RegExp('\\b' + set + '\\b'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'i').test(debugEnviron)) { var pid = 0; debugs[set] = function() { var msg = format.apply(null
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
arguments); console.error('%s %d: %s'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
set
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
pid
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
msg); }; } else { debugs[set] = function() {}; } } return debugs[set]; } /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ /* legacy: obj
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
showHidden
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
depth
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
colors*/ function inspect(obj
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
opts) { // default options var ctx = { seen: []
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
stylize: stylizeNoColor }; // legacy... if (arguments.length >= 3) ctx.depth = arguments[2]; if (arguments.length >= 4) ctx.colors = arguments[3]; if (isBoolean(opts)) { // legacy... ctx.showHidden = opts; } else if (opts) { // got an "options" object _extend(ctx
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
opts); } // set default options if (isUndefined(ctx.showHidden)) ctx.showHidden = false; if (isUndefined(ctx.depth)) ctx.depth = 2; if (isUndefined(ctx.colors)) ctx.colors = false; if (isUndefined(ctx.customInspect)) ctx.customInspect = true; if (ctx.colors) ctx.stylize = stylizeWithColor; return formatValue(ctx
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
obj
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
ctx.depth); } // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics inspect.colors = { 'bold' : [1
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
22]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'italic' : [3
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
23]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'underline' : [4
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
24]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'inverse' : [7
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
27]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'white' : [37
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'grey' : [90
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'black' : [30
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'blue' : [34
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'cyan' : [36
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'green' : [32
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'magenta' : [35
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'red' : [31
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39]
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'yellow' : [33
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
39] }; // Don't use 'blue' not visible on cmd.exe inspect.styles = { 'special': 'cyan'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'number': 'yellow'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'boolean': 'yellow'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'undefined': 'grey'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'null': 'bold'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'string': 'green'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
'date': 'magenta'
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
// "name": intentionally not styling 'regexp': 'red' }; function stylizeWithColor(str
pratsatya_uqt-serverside-nft-ops_node_modules_stream-transform_dist_iife_sync.js
javascript
styleType) { var style = inspect.styles[styleType]; if (style) { return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; } else { return str; } } function stylizeNoColor(str