id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
20,400
greenlikeorange/knayi-myscript
library/converter.js
fontConvert
function fontConvert(content, to, from) { if (!content) { if (!globalOptions.isSilentMode()) console.warn('Content must be specified on knayi.fontConvert.'); return ''; } if (content === '' || !mmCharacterRange.test(content)) return content; if (!to) { if (!globalOptions.isSilentMode()) consol...
javascript
function fontConvert(content, to, from) { if (!content) { if (!globalOptions.isSilentMode()) console.warn('Content must be specified on knayi.fontConvert.'); return ''; } if (content === '' || !mmCharacterRange.test(content)) return content; if (!to) { if (!globalOptions.isSilentMode()) consol...
[ "function", "fontConvert", "(", "content", ",", "to", ",", "from", ")", "{", "if", "(", "!", "content", ")", "{", "if", "(", "!", "globalOptions", ".", "isSilentMode", "(", ")", ")", "console", ".", "warn", "(", "'Content must be specified on knayi.fontConve...
Font Converter agent @param content Text that you want to convert @param to Type of font to convert. Default: "unicode"; @param from Type of font of content text @return converted text
[ "Font", "Converter", "agent" ]
098dbc1cbeccfdda428e55aa37e04b413dc8619b
https://github.com/greenlikeorange/knayi-myscript/blob/098dbc1cbeccfdda428e55aa37e04b413dc8619b/library/converter.js#L211-L278
20,401
thlorenz/es6ify
index.js
compileFile
function compileFile(file, src) { var compiled; compiled = compile(file, src, exports.traceurOverrides); if (compiled.error) throw new Error(compiled.error); return compiled.source; }
javascript
function compileFile(file, src) { var compiled; compiled = compile(file, src, exports.traceurOverrides); if (compiled.error) throw new Error(compiled.error); return compiled.source; }
[ "function", "compileFile", "(", "file", ",", "src", ")", "{", "var", "compiled", ";", "compiled", "=", "compile", "(", "file", ",", "src", ",", "exports", ".", "traceurOverrides", ")", ";", "if", "(", "compiled", ".", "error", ")", "throw", "new", "Err...
Compile function, exposed to be used from other libraries, not needed when using es6ify as a transform. @name es6ify::compileFile @function @param {string} file name of the file that is being compiled to ES5 @param {string} src source of the file being compiled to ES5 @return {string} compiled source
[ "Compile", "function", "exposed", "to", "be", "used", "from", "other", "libraries", "not", "needed", "when", "using", "es6ify", "as", "a", "transform", "." ]
627e999ff6c2aaeb73f150687513ddb4dfb905e7
https://github.com/thlorenz/es6ify/blob/627e999ff6c2aaeb73f150687513ddb4dfb905e7/index.js#L26-L32
20,402
thlorenz/es6ify
example/src/features/generators.js
Tree
function Tree(left, label, right) { this.left = left; this.label = label; this.right = right; }
javascript
function Tree(left, label, right) { this.left = left; this.label = label; this.right = right; }
[ "function", "Tree", "(", "left", ",", "label", ",", "right", ")", "{", "this", ".", "left", "=", "left", ";", "this", ".", "label", "=", "label", ";", "this", ".", "right", "=", "right", ";", "}" ]
A binary tree class.
[ "A", "binary", "tree", "class", "." ]
627e999ff6c2aaeb73f150687513ddb4dfb905e7
https://github.com/thlorenz/es6ify/blob/627e999ff6c2aaeb73f150687513ddb4dfb905e7/example/src/features/generators.js#L2-L6
20,403
thlorenz/es6ify
example/src/features/generators.js
make
function make(array) { // Leaf node: if (array.length == 1) return new Tree(null, array[0], null); return new Tree(make(array[0]), array[1], make(array[2])); }
javascript
function make(array) { // Leaf node: if (array.length == 1) return new Tree(null, array[0], null); return new Tree(make(array[0]), array[1], make(array[2])); }
[ "function", "make", "(", "array", ")", "{", "// Leaf node:", "if", "(", "array", ".", "length", "==", "1", ")", "return", "new", "Tree", "(", "null", ",", "array", "[", "0", "]", ",", "null", ")", ";", "return", "new", "Tree", "(", "make", "(", "...
Make a tree
[ "Make", "a", "tree" ]
627e999ff6c2aaeb73f150687513ddb4dfb905e7
https://github.com/thlorenz/es6ify/blob/627e999ff6c2aaeb73f150687513ddb4dfb905e7/example/src/features/generators.js#L18-L22
20,404
mongodb-js/mongodb-topology-manager
lib/utils.js
checkAvailable
function checkAvailable(host, port) { return new Promise(function(resolve, reject) { const socket = new net.Socket(); socket.on('connect', () => { cleanupSocket(socket); resolve(true); }); socket.on('error', err => { cleanupSocket(socket); if (err.code !== 'ECONNREFUSED') { ...
javascript
function checkAvailable(host, port) { return new Promise(function(resolve, reject) { const socket = new net.Socket(); socket.on('connect', () => { cleanupSocket(socket); resolve(true); }); socket.on('error', err => { cleanupSocket(socket); if (err.code !== 'ECONNREFUSED') { ...
[ "function", "checkAvailable", "(", "host", ",", "port", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "const", "socket", "=", "new", "net", ".", "Socket", "(", ")", ";", "socket", ".", "on", "(", "'co...
Checks if a provided address is actively listening for incoming connections @param {string} host the host to connect to @param {number} port the port to check for availability
[ "Checks", "if", "a", "provided", "address", "is", "actively", "listening", "for", "incoming", "connections" ]
7b30820c5d7f4fb4c3c748e42e456fb249469803
https://github.com/mongodb-js/mongodb-topology-manager/blob/7b30820c5d7f4fb4c3c748e42e456fb249469803/lib/utils.js#L29-L49
20,405
mongodb-js/mongodb-topology-manager
lib/utils.js
waitForAvailable
function waitForAvailable(host, port, options) { return co(function*() { options = Object.assign( {}, { initialMS: 300, retryMS: 100, retryCount: 25 }, options ); // Delay initial amount before attempting to connect yield delay(options.initialMS); ...
javascript
function waitForAvailable(host, port, options) { return co(function*() { options = Object.assign( {}, { initialMS: 300, retryMS: 100, retryCount: 25 }, options ); // Delay initial amount before attempting to connect yield delay(options.initialMS); ...
[ "function", "waitForAvailable", "(", "host", ",", "port", ",", "options", ")", "{", "return", "co", "(", "function", "*", "(", ")", "{", "options", "=", "Object", ".", "assign", "(", "{", "}", ",", "{", "initialMS", ":", "300", ",", "retryMS", ":", ...
Waits for a provided address to actively listen for incoming connections on a given port. @param {string} host the host to connect to @param {number} port the port to check for availability @param {object} [options] optional settings @param {number} [options.retryMS] the amount of time to wait between retry attempts i...
[ "Waits", "for", "a", "provided", "address", "to", "actively", "listen", "for", "incoming", "connections", "on", "a", "given", "port", "." ]
7b30820c5d7f4fb4c3c748e42e456fb249469803
https://github.com/mongodb-js/mongodb-topology-manager/blob/7b30820c5d7f4fb4c3c748e42e456fb249469803/lib/utils.js#L62-L92
20,406
mongodb-js/mongodb-topology-manager
lib/logger.js
function(className, options) { if (!(this instanceof Logger)) return new Logger(className, options); options = options || {}; // Current reference this.className = className; // Current logger if (currentLogger == null && options.logger) { currentLogger = options.logger; } else if (currentLogger == ...
javascript
function(className, options) { if (!(this instanceof Logger)) return new Logger(className, options); options = options || {}; // Current reference this.className = className; // Current logger if (currentLogger == null && options.logger) { currentLogger = options.logger; } else if (currentLogger == ...
[ "function", "(", "className", ",", "options", ")", "{", "if", "(", "!", "(", "this", "instanceof", "Logger", ")", ")", "return", "new", "Logger", "(", "className", ",", "options", ")", ";", "options", "=", "options", "||", "{", "}", ";", "// Current re...
Creates a new Logger instance @class @param {string} className The Class name associated with the logging instance @param {object} [options=null] Optional settings. @param {Function} [options.logger=null] Custom logger function; @param {string} [options.loggerLevel=error] Override default global log level. @return {Log...
[ "Creates", "a", "new", "Logger", "instance" ]
7b30820c5d7f4fb4c3c748e42e456fb249469803
https://github.com/mongodb-js/mongodb-topology-manager/blob/7b30820c5d7f4fb4c3c748e42e456fb249469803/lib/logger.js#L23-L44
20,407
segmentio/load-script
index.js
loadScript
function loadScript(options, cb) { if (!options) { throw new Error('Can\'t load nothing...'); } // Allow for the simplest case, just passing a `src` string. if (type(options) === 'string') { options = { src : options }; } var https = document.location.protocol === 'https:' || document.location.pro...
javascript
function loadScript(options, cb) { if (!options) { throw new Error('Can\'t load nothing...'); } // Allow for the simplest case, just passing a `src` string. if (type(options) === 'string') { options = { src : options }; } var https = document.location.protocol === 'https:' || document.location.pro...
[ "function", "loadScript", "(", "options", ",", "cb", ")", "{", "if", "(", "!", "options", ")", "{", "throw", "new", "Error", "(", "'Can\\'t load nothing...'", ")", ";", "}", "// Allow for the simplest case, just passing a `src` string.", "if", "(", "type", "(", ...
Loads a script asynchronously. @param {Object} options @param {Function} cb
[ "Loads", "a", "script", "asynchronously", "." ]
c167c85029e0a4c132c1f58d7ea96726989c82c0
https://github.com/segmentio/load-script/blob/c167c85029e0a4c132c1f58d7ea96726989c82c0/index.js#L17-L64
20,408
retextjs/retext-spell
index.js
transformer
function transformer(tree, file, next) { if (loadError) { next(loadError) } else if (config.checker) { all(tree, file, config) next() } else { queue.push([tree, file, config, next]) } }
javascript
function transformer(tree, file, next) { if (loadError) { next(loadError) } else if (config.checker) { all(tree, file, config) next() } else { queue.push([tree, file, config, next]) } }
[ "function", "transformer", "(", "tree", ",", "file", ",", "next", ")", "{", "if", "(", "loadError", ")", "{", "next", "(", "loadError", ")", "}", "else", "if", "(", "config", ".", "checker", ")", "{", "all", "(", "tree", ",", "file", ",", "config",...
Transformer which either immediately invokes `all` when everything has finished loading or queues the arguments.
[ "Transformer", "which", "either", "immediately", "invokes", "all", "when", "everything", "has", "finished", "loading", "or", "queues", "the", "arguments", "." ]
8f18babff9f12705c2113c34018ac576d044fd23
https://github.com/retextjs/retext-spell/blob/8f18babff9f12705c2113c34018ac576d044fd23/index.js#L51-L60
20,409
retextjs/retext-spell
index.js
all
function all(tree, file, config) { var ignore = config.ignore var ignoreLiteral = config.ignoreLiteral var ignoreDigits = config.ignoreDigits var apos = config.normalizeApostrophes var checker = config.checker var cache = config.cache visit(tree, 'WordNode', checkWord) // Check one word. function ch...
javascript
function all(tree, file, config) { var ignore = config.ignore var ignoreLiteral = config.ignoreLiteral var ignoreDigits = config.ignoreDigits var apos = config.normalizeApostrophes var checker = config.checker var cache = config.cache visit(tree, 'WordNode', checkWord) // Check one word. function ch...
[ "function", "all", "(", "tree", ",", "file", ",", "config", ")", "{", "var", "ignore", "=", "config", ".", "ignore", "var", "ignoreLiteral", "=", "config", ".", "ignoreLiteral", "var", "ignoreDigits", "=", "config", ".", "ignoreDigits", "var", "apos", "=",...
Check a file for spelling mistakes.
[ "Check", "a", "file", "for", "spelling", "mistakes", "." ]
8f18babff9f12705c2113c34018ac576d044fd23
https://github.com/retextjs/retext-spell/blob/8f18babff9f12705c2113c34018ac576d044fd23/index.js#L92-L188
20,410
stackgl/gl-vec3
clone.js
clone
function clone(a) { var out = new Float32Array(3) out[0] = a[0] out[1] = a[1] out[2] = a[2] return out }
javascript
function clone(a) { var out = new Float32Array(3) out[0] = a[0] out[1] = a[1] out[2] = a[2] return out }
[ "function", "clone", "(", "a", ")", "{", "var", "out", "=", "new", "Float32Array", "(", "3", ")", "out", "[", "0", "]", "=", "a", "[", "0", "]", "out", "[", "1", "]", "=", "a", "[", "1", "]", "out", "[", "2", "]", "=", "a", "[", "2", "]...
Creates a new vec3 initialized with values from an existing vector @param {vec3} a vector to clone @returns {vec3} a new 3D vector
[ "Creates", "a", "new", "vec3", "initialized", "with", "values", "from", "an", "existing", "vector" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/clone.js#L9-L15
20,411
stackgl/gl-vec3
rotateX.js
rotateX
function rotateX(out, a, b, c){ var by = b[1] var bz = b[2] // Translate point to the origin var py = a[1] - by var pz = a[2] - bz var sc = Math.sin(c) var cc = Math.cos(c) // perform rotation and translate to correct position out[0] = a[0] out[1] = by + py * cc - pz * sc ...
javascript
function rotateX(out, a, b, c){ var by = b[1] var bz = b[2] // Translate point to the origin var py = a[1] - by var pz = a[2] - bz var sc = Math.sin(c) var cc = Math.cos(c) // perform rotation and translate to correct position out[0] = a[0] out[1] = by + py * cc - pz * sc ...
[ "function", "rotateX", "(", "out", ",", "a", ",", "b", ",", "c", ")", "{", "var", "by", "=", "b", "[", "1", "]", "var", "bz", "=", "b", "[", "2", "]", "// Translate point to the origin", "var", "py", "=", "a", "[", "1", "]", "-", "by", "var", ...
Rotate a 3D vector around the x-axis @param {vec3} out The receiving vec3 @param {vec3} a The vec3 point to rotate @param {vec3} b The origin of the rotation @param {Number} c The angle of rotation @returns {vec3} out
[ "Rotate", "a", "3D", "vector", "around", "the", "x", "-", "axis" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/rotateX.js#L11-L28
20,412
stackgl/gl-vec3
rotateZ.js
rotateZ
function rotateZ(out, a, b, c){ var bx = b[0] var by = b[1] //Translate point to the origin var px = a[0] - bx var py = a[1] - by var sc = Math.sin(c) var cc = Math.cos(c) // perform rotation and translate to correct position out[0] = bx + px * cc - py * sc out[1] = by + px ...
javascript
function rotateZ(out, a, b, c){ var bx = b[0] var by = b[1] //Translate point to the origin var px = a[0] - bx var py = a[1] - by var sc = Math.sin(c) var cc = Math.cos(c) // perform rotation and translate to correct position out[0] = bx + px * cc - py * sc out[1] = by + px ...
[ "function", "rotateZ", "(", "out", ",", "a", ",", "b", ",", "c", ")", "{", "var", "bx", "=", "b", "[", "0", "]", "var", "by", "=", "b", "[", "1", "]", "//Translate point to the origin", "var", "px", "=", "a", "[", "0", "]", "-", "bx", "var", ...
Rotate a 3D vector around the z-axis @param {vec3} out The receiving vec3 @param {vec3} a The vec3 point to rotate @param {vec3} b The origin of the rotation @param {Number} c The angle of rotation @returns {vec3} out
[ "Rotate", "a", "3D", "vector", "around", "the", "z", "-", "axis" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/rotateZ.js#L11-L28
20,413
stackgl/gl-vec3
negate.js
negate
function negate(out, a) { out[0] = -a[0] out[1] = -a[1] out[2] = -a[2] return out }
javascript
function negate(out, a) { out[0] = -a[0] out[1] = -a[1] out[2] = -a[2] return out }
[ "function", "negate", "(", "out", ",", "a", ")", "{", "out", "[", "0", "]", "=", "-", "a", "[", "0", "]", "out", "[", "1", "]", "=", "-", "a", "[", "1", "]", "out", "[", "2", "]", "=", "-", "a", "[", "2", "]", "return", "out", "}" ]
Negates the components of a vec3 @param {vec3} out the receiving vector @param {vec3} a vector to negate @returns {vec3} out
[ "Negates", "the", "components", "of", "a", "vec3" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/negate.js#L10-L15
20,414
stackgl/gl-vec3
rotateY.js
rotateY
function rotateY(out, a, b, c){ var bx = b[0] var bz = b[2] // translate point to the origin var px = a[0] - bx var pz = a[2] - bz var sc = Math.sin(c) var cc = Math.cos(c) // perform rotation and translate to correct position out[0] = bx + pz * sc + px * cc out[1] = a[1...
javascript
function rotateY(out, a, b, c){ var bx = b[0] var bz = b[2] // translate point to the origin var px = a[0] - bx var pz = a[2] - bz var sc = Math.sin(c) var cc = Math.cos(c) // perform rotation and translate to correct position out[0] = bx + pz * sc + px * cc out[1] = a[1...
[ "function", "rotateY", "(", "out", ",", "a", ",", "b", ",", "c", ")", "{", "var", "bx", "=", "b", "[", "0", "]", "var", "bz", "=", "b", "[", "2", "]", "// translate point to the origin", "var", "px", "=", "a", "[", "0", "]", "-", "bx", "var", ...
Rotate a 3D vector around the y-axis @param {vec3} out The receiving vec3 @param {vec3} a The vec3 point to rotate @param {vec3} b The origin of the rotation @param {Number} c The angle of rotation @returns {vec3} out
[ "Rotate", "a", "3D", "vector", "around", "the", "y", "-", "axis" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/rotateY.js#L11-L28
20,415
stackgl/gl-vec3
inverse.js
inverse
function inverse(out, a) { out[0] = 1.0 / a[0] out[1] = 1.0 / a[1] out[2] = 1.0 / a[2] return out }
javascript
function inverse(out, a) { out[0] = 1.0 / a[0] out[1] = 1.0 / a[1] out[2] = 1.0 / a[2] return out }
[ "function", "inverse", "(", "out", ",", "a", ")", "{", "out", "[", "0", "]", "=", "1.0", "/", "a", "[", "0", "]", "out", "[", "1", "]", "=", "1.0", "/", "a", "[", "1", "]", "out", "[", "2", "]", "=", "1.0", "/", "a", "[", "2", "]", "r...
Returns the inverse of the components of a vec3 @param {vec3} out the receiving vector @param {vec3} a vector to invert @returns {vec3} out
[ "Returns", "the", "inverse", "of", "the", "components", "of", "a", "vec3" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/inverse.js#L10-L15
20,416
stackgl/gl-vec3
angle.js
angle
function angle(a, b) { var tempA = fromValues(a[0], a[1], a[2]) var tempB = fromValues(b[0], b[1], b[2]) normalize(tempA, tempA) normalize(tempB, tempB) var cosine = dot(tempA, tempB) if(cosine > 1.0){ return 0 } else { return Math.acos(cosine) } }
javascript
function angle(a, b) { var tempA = fromValues(a[0], a[1], a[2]) var tempB = fromValues(b[0], b[1], b[2]) normalize(tempA, tempA) normalize(tempB, tempB) var cosine = dot(tempA, tempB) if(cosine > 1.0){ return 0 } else { return Math.acos(cosine) } }
[ "function", "angle", "(", "a", ",", "b", ")", "{", "var", "tempA", "=", "fromValues", "(", "a", "[", "0", "]", ",", "a", "[", "1", "]", ",", "a", "[", "2", "]", ")", "var", "tempB", "=", "fromValues", "(", "b", "[", "0", "]", ",", "b", "[...
Get the angle between two 3D vectors @param {vec3} a The first operand @param {vec3} b The second operand @returns {Number} The angle in radians
[ "Get", "the", "angle", "between", "two", "3D", "vectors" ]
219dbe7bd23426fb921ee8f53edeb33e7a308155
https://github.com/stackgl/gl-vec3/blob/219dbe7bd23426fb921ee8f53edeb33e7a308155/angle.js#L13-L27
20,417
ConsenSys/eth-signer
dist/eth-signer.min.js
se
function se(me){/* jshint maxstatements: 18 */if(!(this instanceof se))return new se(me);var ge={};if(fe.isBuffer(me))ge=se._fromBufferReader(le(me));else if(de.isObject(me)){var _e;_e=me.header instanceof ce?me.header:ce.fromObject(me.header),ge={/** * @name MerkleBlock#header * @type {BlockHeader} ...
javascript
function se(me){/* jshint maxstatements: 18 */if(!(this instanceof se))return new se(me);var ge={};if(fe.isBuffer(me))ge=se._fromBufferReader(le(me));else if(de.isObject(me)){var _e;_e=me.header instanceof ce?me.header:ce.fromObject(me.header),ge={/** * @name MerkleBlock#header * @type {BlockHeader} ...
[ "function", "se", "(", "me", ")", "{", "/* jshint maxstatements: 18 */", "if", "(", "!", "(", "this", "instanceof", "se", ")", ")", "return", "new", "se", "(", "me", ")", ";", "var", "ge", "=", "{", "}", ";", "if", "(", "fe", ".", "isBuffer", "(", ...
Instantiate a MerkleBlock from a Buffer, JSON object, or Object with the properties of the Block @param {*} - A Buffer, JSON string, or Object representing a MerkleBlock @returns {MerkleBlock} @constructor
[ "Instantiate", "a", "MerkleBlock", "from", "a", "Buffer", "JSON", "object", "or", "Object", "with", "the", "properties", "of", "the", "Block" ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L558-L570
20,418
ConsenSys/eth-signer
dist/eth-signer.min.js
he
function he(vr,xr,Sr){for(var kr=-1,Ir=vr.criteria,Ar=xr.criteria,wr=Ir.length,Er=Sr.length,Pr;++kr<wr;)if(Pr=se(Ir[kr],Ar[kr]),Pr){if(kr>=Er)return Pr;var Br=Sr[kr];return Pr*("asc"===Br||!0===Br?1:-1)}// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circums...
javascript
function he(vr,xr,Sr){for(var kr=-1,Ir=vr.criteria,Ar=xr.criteria,wr=Ir.length,Er=Sr.length,Pr;++kr<wr;)if(Pr=se(Ir[kr],Ar[kr]),Pr){if(kr>=Er)return Pr;var Br=Sr[kr];return Pr*("asc"===Br||!0===Br?1:-1)}// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circums...
[ "function", "he", "(", "vr", ",", "xr", ",", "Sr", ")", "{", "for", "(", "var", "kr", "=", "-", "1", ",", "Ir", "=", "vr", ".", "criteria", ",", "Ar", "=", "xr", ".", "criteria", ",", "wr", "=", "Ir", ".", "length", ",", "Er", "=", "Sr", ...
Used by `_.sortByOrder` to compare multiple properties of a value to another and stable sort them. If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise, a value is sorted in ascending order if its corresponding order is "asc", and descending if "desc". @private @param {Object} object The o...
[ "Used", "by", "_", ".", "sortByOrder", "to", "compare", "multiple", "properties", "of", "a", "value", "to", "another", "and", "stable", "sort", "them", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L1640-L1647
20,419
ConsenSys/eth-signer
dist/eth-signer.min.js
uo
function uo(Kd,qd,Vd,Gd,Yd,Wd,Xd,Jd,Zd,Qd){function $d(){for(// Avoid `arguments` object use disqualifying optimizations by // converting it to an array before providing it to other functions. var dc=arguments.length,fc=dc,lc=Zn(dc);fc--;)lc[fc]=arguments[fc];if(Gd&&(lc=Da(lc,Gd,Yd)),Wd&&(lc=Ma(lc,Wd,Xd)),oc||ic){var p...
javascript
function uo(Kd,qd,Vd,Gd,Yd,Wd,Xd,Jd,Zd,Qd){function $d(){for(// Avoid `arguments` object use disqualifying optimizations by // converting it to an array before providing it to other functions. var dc=arguments.length,fc=dc,lc=Zn(dc);fc--;)lc[fc]=arguments[fc];if(Gd&&(lc=Da(lc,Gd,Yd)),Wd&&(lc=Ma(lc,Wd,Xd)),oc||ic){var p...
[ "function", "uo", "(", "Kd", ",", "qd", ",", "Vd", ",", "Gd", ",", "Yd", ",", "Wd", ",", "Xd", ",", "Jd", ",", "Zd", ",", "Qd", ")", "{", "function", "$d", "(", ")", "{", "for", "(", "// Avoid `arguments` object use disqualifying optimizations by", "//...
Creates a function that wraps `func` and invokes it with optional `this` binding of, partial application, and currying. @private @param {Function|string} func The function or method name to reference. @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. @param {*} [thisArg] The `this` bi...
[ "Creates", "a", "function", "that", "wraps", "func", "and", "invokes", "it", "with", "optional", "this", "binding", "of", "partial", "application", "and", "currying", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L2724-L2726
20,420
ConsenSys/eth-signer
dist/eth-signer.min.js
ho
function ho(Kd,qd,Vd,Gd){function Yd(){for(// Avoid `arguments` object use disqualifying optimizations by // converting it to an array before providing it `func`. var Xd=-1,Jd=arguments.length,Zd=-1,Qd=Gd.length,$d=Zn(Qd+Jd);++Zd<Qd;)$d[Zd]=Gd[Zd];for(;Jd--;)$d[Zd++]=arguments[++Xd];var tc=this&&this!==gr&&this instanc...
javascript
function ho(Kd,qd,Vd,Gd){function Yd(){for(// Avoid `arguments` object use disqualifying optimizations by // converting it to an array before providing it `func`. var Xd=-1,Jd=arguments.length,Zd=-1,Qd=Gd.length,$d=Zn(Qd+Jd);++Zd<Qd;)$d[Zd]=Gd[Zd];for(;Jd--;)$d[Zd++]=arguments[++Xd];var tc=this&&this!==gr&&this instanc...
[ "function", "ho", "(", "Kd", ",", "qd", ",", "Vd", ",", "Gd", ")", "{", "function", "Yd", "(", ")", "{", "for", "(", "// Avoid `arguments` object use disqualifying optimizations by", "// converting it to an array before providing it `func`.", "var", "Xd", "=", "-", ...
Creates a function that wraps `func` and invokes it with the optional `this` binding of `thisArg` and the `partials` prepended to those provided to the wrapper. @private @param {Function} func The function to partially apply arguments to. @param {number} bitmask The bitmask of flags. See `createWrapper` for more detai...
[ "Creates", "a", "function", "that", "wraps", "func", "and", "invokes", "it", "with", "the", "optional", "this", "binding", "of", "thisArg", "and", "the", "partials", "prepended", "to", "those", "provided", "to", "the", "wrapper", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L2746-L2748
20,421
ConsenSys/eth-signer
dist/eth-signer.min.js
be
function be(Ce,Ne,je){je.negative=Ne.negative^Ce.negative;var Le=0|Ce.length+Ne.length;je.length=Le,Le=0|Le-1;// Peel one iteration (compiler can't do it, because of code complexity) var ze=0|Ce.words[0],De=0|Ne.words[0],Me=ze*De,Ue=67108863&Me,Fe=0|Me/67108864;je.words[0]=Ue;for(var He=1;He<Le;He++){for(var Ke=Fe>>>26...
javascript
function be(Ce,Ne,je){je.negative=Ne.negative^Ce.negative;var Le=0|Ce.length+Ne.length;je.length=Le,Le=0|Le-1;// Peel one iteration (compiler can't do it, because of code complexity) var ze=0|Ce.words[0],De=0|Ne.words[0],Me=ze*De,Ue=67108863&Me,Fe=0|Me/67108864;je.words[0]=Ue;for(var He=1;He<Le;He++){for(var Ke=Fe>>>26...
[ "function", "be", "(", "Ce", ",", "Ne", ",", "je", ")", "{", "je", ".", "negative", "=", "Ne", ".", "negative", "^", "Ce", ".", "negative", ";", "var", "Le", "=", "0", "|", "Ce", ".", "length", "+", "Ne", ".", "length", ";", "je", ".", "lengt...
Number of trailing zero bits
[ "Number", "of", "trailing", "zero", "bits" ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L8346-L8349
20,422
ConsenSys/eth-signer
dist/eth-signer.min.js
function(Se){// Spawn var ke=ce(this);// Augment return Se&&ke.mixIn(Se),ke.hasOwnProperty("init")&&this.init!==ke.init||(ke.init=function(){ke.$super.init.apply(this,arguments)}),ke.init.prototype=ke,ke.$super=this,ke}
javascript
function(Se){// Spawn var ke=ce(this);// Augment return Se&&ke.mixIn(Se),ke.hasOwnProperty("init")&&this.init!==ke.init||(ke.init=function(){ke.$super.init.apply(this,arguments)}),ke.init.prototype=ke,ke.$super=this,ke}
[ "function", "(", "Se", ")", "{", "// Spawn", "var", "ke", "=", "ce", "(", "this", ")", ";", "// Augment", "return", "Se", "&&", "ke", ".", "mixIn", "(", "Se", ")", ",", "ke", ".", "hasOwnProperty", "(", "\"init\"", ")", "&&", "this", ".", "init", ...
Creates a new object that inherits from this object. @param {Object} overrides Properties to copy into the new object. @return {Object} The new object. @static @example var MyType = CryptoJS.lib.Base.extend({ field: 'value', method: function () { } });
[ "Creates", "a", "new", "object", "that", "inherits", "from", "this", "object", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L9067-L9069
20,423
ConsenSys/eth-signer
dist/eth-signer.min.js
function(Se){// Convert for(var ke=Se.length,Ie=[],Ae=0;Ae<ke;Ae++)Ie[Ae>>>2]|=(255&Se.charCodeAt(Ae))<<24-8*(Ae%4);// Shortcut return new ue.init(Ie,ke)}
javascript
function(Se){// Convert for(var ke=Se.length,Ie=[],Ae=0;Ae<ke;Ae++)Ie[Ae>>>2]|=(255&Se.charCodeAt(Ae))<<24-8*(Ae%4);// Shortcut return new ue.init(Ie,ke)}
[ "function", "(", "Se", ")", "{", "// Convert", "for", "(", "var", "ke", "=", "Se", ".", "length", ",", "Ie", "=", "[", "]", ",", "Ae", "=", "0", ";", "Ae", "<", "ke", ";", "Ae", "++", ")", "Ie", "[", "Ae", ">>>", "2", "]", "|=", "(", "255...
Converts a Latin1 string to a word array. @param {string} latin1Str The Latin1 string. @return {WordArray} The word array. @static @example var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
[ "Converts", "a", "Latin1", "string", "to", "a", "word", "array", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L9231-L9233
20,424
ConsenSys/eth-signer
dist/eth-signer.min.js
function(pe){// Shortcuts var ue=pe.words,be=pe.sigBytes,he=this._map;pe.clamp();for(var me=[],ge=0;ge<be;ge+=3)for(var _e=255&ue[ge>>>2]>>>24-8*(ge%4),ve=255&ue[ge+1>>>2]>>>24-8*((ge+1)%4),Se=255&ue[ge+2>>>2]>>>24-8*((ge+2)%4),ke=0;4>ke&&ge+0.75*ke<be;ke++)me.push(he.charAt(63&(_e<<16|ve<<8|Se)>>>6*(3-ke)));// Add pad...
javascript
function(pe){// Shortcuts var ue=pe.words,be=pe.sigBytes,he=this._map;pe.clamp();for(var me=[],ge=0;ge<be;ge+=3)for(var _e=255&ue[ge>>>2]>>>24-8*(ge%4),ve=255&ue[ge+1>>>2]>>>24-8*((ge+1)%4),Se=255&ue[ge+2>>>2]>>>24-8*((ge+2)%4),ke=0;4>ke&&ge+0.75*ke<be;ke++)me.push(he.charAt(63&(_e<<16|ve<<8|Se)>>>6*(3-ke)));// Add pad...
[ "function", "(", "pe", ")", "{", "// Shortcuts", "var", "ue", "=", "pe", ".", "words", ",", "be", "=", "pe", ".", "sigBytes", ",", "he", "=", "this", ".", "_map", ";", "pe", ".", "clamp", "(", ")", ";", "for", "(", "var", "me", "=", "[", "]",...
Converts a word array to a Base64 string. @param {WordArray} wordArray The word array. @return {string} The Base64 string. @static @example var base64String = CryptoJS.enc.Base64.stringify(wordArray);
[ "Converts", "a", "word", "array", "to", "a", "Base64", "string", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L9411-L9413
20,425
ConsenSys/eth-signer
dist/eth-signer.min.js
function(pe){// Shortcuts var ue=pe.length,be=this._map,he=this._reverseMap;if(!he){he=this._reverseMap=[];for(var me=0;me<be.length;me++)he[be.charCodeAt(me)]=me}// Ignore padding var ge=be.charAt(64);if(ge){var _e=pe.indexOf(ge);-1!==_e&&(ue=_e)}// Convert return se(pe,ue,he)}
javascript
function(pe){// Shortcuts var ue=pe.length,be=this._map,he=this._reverseMap;if(!he){he=this._reverseMap=[];for(var me=0;me<be.length;me++)he[be.charCodeAt(me)]=me}// Ignore padding var ge=be.charAt(64);if(ge){var _e=pe.indexOf(ge);-1!==_e&&(ue=_e)}// Convert return se(pe,ue,he)}
[ "function", "(", "pe", ")", "{", "// Shortcuts", "var", "ue", "=", "pe", ".", "length", ",", "be", "=", "this", ".", "_map", ",", "he", "=", "this", ".", "_reverseMap", ";", "if", "(", "!", "he", ")", "{", "he", "=", "this", ".", "_reverseMap", ...
Converts a Base64 string to a word array. @param {string} base64Str The Base64 string. @return {WordArray} The word array. @static @example var wordArray = CryptoJS.enc.Base64.parse(base64String);
[ "Converts", "a", "Base64", "string", "to", "a", "word", "array", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L9425-L9428
20,426
ConsenSys/eth-signer
dist/eth-signer.min.js
function(pe){// Convert for(var ue=pe.length,be=[],he=0;he<ue;he++)be[he>>>1]|=pe.charCodeAt(he)<<16-16*(he%2);// Shortcut return fe.create(be,2*ue)}
javascript
function(pe){// Convert for(var ue=pe.length,be=[],he=0;he<ue;he++)be[he>>>1]|=pe.charCodeAt(he)<<16-16*(he%2);// Shortcut return fe.create(be,2*ue)}
[ "function", "(", "pe", ")", "{", "// Convert", "for", "(", "var", "ue", "=", "pe", ".", "length", ",", "be", "=", "[", "]", ",", "he", "=", "0", ";", "he", "<", "ue", ";", "he", "++", ")", "be", "[", "he", ">>>", "1", "]", "|=", "pe", "."...
Converts a UTF-16 BE string to a word array. @param {string} utf16Str The UTF-16 BE string. @return {WordArray} The word array. @static @example var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
[ "Converts", "a", "UTF", "-", "16", "BE", "string", "to", "a", "word", "array", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L9455-L9457
20,427
ConsenSys/eth-signer
dist/eth-signer.min.js
function(ue){// Shortcut var be=this._hasher,he=be.finalize(ue);// Compute HMAC be.reset();var me=be.finalize(this._oKey.clone().concat(he));return me}
javascript
function(ue){// Shortcut var be=this._hasher,he=be.finalize(ue);// Compute HMAC be.reset();var me=be.finalize(this._oKey.clone().concat(he));return me}
[ "function", "(", "ue", ")", "{", "// Shortcut", "var", "be", "=", "this", ".", "_hasher", ",", "he", "=", "be", ".", "finalize", "(", "ue", ")", ";", "// Compute HMAC", "be", ".", "reset", "(", ")", ";", "var", "me", "=", "be", ".", "finalize", "...
Finalizes the HMAC computation. Note that the finalize operation is effectively a destructive, read-once operation. @param {WordArray|string} messageUpdate (Optional) A final message update. @return {WordArray} The HMAC. @example var hmac = hmacHasher.finalize(); var hmac = hmacHasher.finalize('message'); var hmac ...
[ "Finalizes", "the", "HMAC", "computation", ".", "Note", "that", "the", "finalize", "operation", "is", "effectively", "a", "destructive", "read", "-", "once", "operation", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L9597-L9599
20,428
ConsenSys/eth-signer
dist/eth-signer.min.js
me
function me(Me){// Don't use UCS-2 var Ue=[],Fe=Me.length,Ke=0,qe=Be,Ve=Pe,He,Ge,Ye,We,Xe,Je,Ze,Qe,$e,/** Cached calculation results */et;// Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the...
javascript
function me(Me){// Don't use UCS-2 var Ue=[],Fe=Me.length,Ke=0,qe=Be,Ve=Pe,He,Ge,Ye,We,Xe,Je,Ze,Qe,$e,/** Cached calculation results */et;// Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the...
[ "function", "me", "(", "Me", ")", "{", "// Don't use UCS-2", "var", "Ue", "=", "[", "]", ",", "Fe", "=", "Me", ".", "length", ",", "Ke", "=", "0", ",", "qe", "=", "Be", ",", "Ve", "=", "Pe", ",", "He", ",", "Ge", ",", "Ye", ",", "We", ",", ...
Converts a Punycode string of ASCII-only symbols to a string of Unicode symbols. @memberOf punycode @param {String} input The Punycode string of ASCII-only symbols. @returns {String} The resulting string of Unicode symbols.
[ "Converts", "a", "Punycode", "string", "of", "ASCII", "-", "only", "symbols", "to", "a", "string", "of", "Unicode", "symbols", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L10740-L10751
20,429
ConsenSys/eth-signer
dist/eth-signer.min.js
de
function de(Me,Ue){// default options var Fe={seen:[],stylize:fe};// legacy... return 3<=arguments.length&&(Fe.depth=arguments[2]),4<=arguments.length&&(Fe.colors=arguments[3]),ve(Ue)?Fe.showHidden=Ue:Ue&&te._extend(Fe,Ue),Ae(Fe.showHidden)&&(Fe.showHidden=!1),Ae(Fe.depth)&&(Fe.depth=2),Ae(Fe.colors)&&(Fe.colors=!1),Ae...
javascript
function de(Me,Ue){// default options var Fe={seen:[],stylize:fe};// legacy... return 3<=arguments.length&&(Fe.depth=arguments[2]),4<=arguments.length&&(Fe.colors=arguments[3]),ve(Ue)?Fe.showHidden=Ue:Ue&&te._extend(Fe,Ue),Ae(Fe.showHidden)&&(Fe.showHidden=!1),Ae(Fe.depth)&&(Fe.depth=2),Ae(Fe.colors)&&(Fe.colors=!1),Ae...
[ "function", "de", "(", "Me", ",", "Ue", ")", "{", "// default options", "var", "Fe", "=", "{", "seen", ":", "[", "]", ",", "stylize", ":", "fe", "}", ";", "// legacy...", "return", "3", "<=", "arguments", ".", "length", "&&", "(", "Fe", ".", "depth...
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, showHidden, depth, colors
[ "Echos", "the", "value", "of", "a", "value", ".", "Trys", "to", "print", "the", "value", "out", "in", "the", "best", "way", "possible", "given", "the", "different", "types", "." ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/dist/eth-signer.min.js#L12905-L12907
20,430
ConsenSys/eth-signer
lib/proxy_signer.js
function(proxy_address, signer, controller_address) { this.proxy_address = proxy_address; this.controller_address = controller_address || proxy_address; this.signer = signer; }
javascript
function(proxy_address, signer, controller_address) { this.proxy_address = proxy_address; this.controller_address = controller_address || proxy_address; this.signer = signer; }
[ "function", "(", "proxy_address", ",", "signer", ",", "controller_address", ")", "{", "this", ".", "proxy_address", "=", "proxy_address", ";", "this", ".", "controller_address", "=", "controller_address", "||", "proxy_address", ";", "this", ".", "signer", "=", "...
Simple unencrypted signer, not to be used in the browser
[ "Simple", "unencrypted", "signer", "not", "to", "be", "used", "in", "the", "browser" ]
3490546d865a0ec69e5cfd518b9fe1f1a76eba3a
https://github.com/ConsenSys/eth-signer/blob/3490546d865a0ec69e5cfd518b9fe1f1a76eba3a/lib/proxy_signer.js#L11-L15
20,431
terasum/js-mdict
lib/common.js
uint16BEtoNumber
function uint16BEtoNumber(bytes) { var n = 0; for (var i = 0; i < 1; i++) { n |= bytes[i]; n <<= 8; } n |= bytes[1]; return n; }
javascript
function uint16BEtoNumber(bytes) { var n = 0; for (var i = 0; i < 1; i++) { n |= bytes[i]; n <<= 8; } n |= bytes[1]; return n; }
[ "function", "uint16BEtoNumber", "(", "bytes", ")", "{", "var", "n", "=", "0", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "1", ";", "i", "++", ")", "{", "n", "|=", "bytes", "[", "i", "]", ";", "n", "<<=", "8", ";", "}", "n", "|=...
read in uint16BE Bytes return uint16 number @param {Buffer} bytes Big-endian byte buffer
[ "read", "in", "uint16BE", "Bytes", "return", "uint16", "number" ]
d73f12510689a9e96792ed01763dc03723b64a51
https://github.com/terasum/js-mdict/blob/d73f12510689a9e96792ed01763dc03723b64a51/lib/common.js#L121-L129
20,432
terasum/js-mdict
lib/common.js
readNumber
function readNumber(bf, numfmt) { var value = new Uint8Array(bf); if (numfmt === NUMFMT_UINT32) { // uint32 return uint32BEtoNumber(value); } else if (numfmt === NUMFMT_UINT64) { // uint64 return uint64BEtoNumber(value); } else if (numfmt === NUMFMT_UINT16) { // uint16 return uint16BEtoN...
javascript
function readNumber(bf, numfmt) { var value = new Uint8Array(bf); if (numfmt === NUMFMT_UINT32) { // uint32 return uint32BEtoNumber(value); } else if (numfmt === NUMFMT_UINT64) { // uint64 return uint64BEtoNumber(value); } else if (numfmt === NUMFMT_UINT16) { // uint16 return uint16BEtoN...
[ "function", "readNumber", "(", "bf", ",", "numfmt", ")", "{", "var", "value", "=", "new", "Uint8Array", "(", "bf", ")", ";", "if", "(", "numfmt", "===", "NUMFMT_UINT32", ")", "{", "// uint32", "return", "uint32BEtoNumber", "(", "value", ")", ";", "}", ...
read number from buffer @param {BufferList} bf number buffer @param {string} numfmt number format
[ "read", "number", "from", "buffer" ]
d73f12510689a9e96792ed01763dc03723b64a51
https://github.com/terasum/js-mdict/blob/d73f12510689a9e96792ed01763dc03723b64a51/lib/common.js#L178-L196
20,433
terasum/js-mdict
lib/common.js
appendBuffer
function appendBuffer(buffer1, buffer2) { var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); tmp.set(new Uint8Array(buffer1), 0); tmp.set(new Uint8Array(buffer2), buffer1.byteLength); return tmp.buffer; }
javascript
function appendBuffer(buffer1, buffer2) { var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); tmp.set(new Uint8Array(buffer1), 0); tmp.set(new Uint8Array(buffer2), buffer1.byteLength); return tmp.buffer; }
[ "function", "appendBuffer", "(", "buffer1", ",", "buffer2", ")", "{", "var", "tmp", "=", "new", "Uint8Array", "(", "buffer1", ".", "byteLength", "+", "buffer2", ".", "byteLength", ")", ";", "tmp", ".", "set", "(", "new", "Uint8Array", "(", "buffer1", ")"...
Creates a new Uint8Array based on two different ArrayBuffers @param {ArrayBuffers} buffer1 The first buffer. @param {ArrayBuffers} buffer2 The second buffer. @return {ArrayBuffers} The new ArrayBuffer created out of the two.
[ "Creates", "a", "new", "Uint8Array", "based", "on", "two", "different", "ArrayBuffers" ]
d73f12510689a9e96792ed01763dc03723b64a51
https://github.com/terasum/js-mdict/blob/d73f12510689a9e96792ed01763dc03723b64a51/lib/common.js#L232-L237
20,434
terasum/js-mdict
src/ripemd128.js
concat
function concat(a, b) { if (!a && !b) throw new Error("Please specify valid arguments for parameters a and b."); if (!b || b.length === 0) return a; if (!a || a.length === 0) return b; const c = new a.constructor(a.length + b.length); c.set(a); c.set(b, a.length); return c; }
javascript
function concat(a, b) { if (!a && !b) throw new Error("Please specify valid arguments for parameters a and b."); if (!b || b.length === 0) return a; if (!a || a.length === 0) return b; const c = new a.constructor(a.length + b.length); c.set(a); c.set(b, a.length); return c; }
[ "function", "concat", "(", "a", ",", "b", ")", "{", "if", "(", "!", "a", "&&", "!", "b", ")", "throw", "new", "Error", "(", "\"Please specify valid arguments for parameters a and b.\"", ")", ";", "if", "(", "!", "b", "||", "b", ".", "length", "===", "0...
concat 2 typed array
[ "concat", "2", "typed", "array" ]
d73f12510689a9e96792ed01763dc03723b64a51
https://github.com/terasum/js-mdict/blob/d73f12510689a9e96792ed01763dc03723b64a51/src/ripemd128.js#L23-L31
20,435
wix-incubator/wix-hive-node
lib/schemas/hotels/HotelPurchaseFailedSchema.js
Name
function Name() { /** * The prefix value * @member */ this.prefix = null; /** * The first value * @member */ this.first = null; /** * The middle value * @member */ this.middle = null; /** * The last value * @member */ this.last ...
javascript
function Name() { /** * The prefix value * @member */ this.prefix = null; /** * The first value * @member */ this.first = null; /** * The middle value * @member */ this.middle = null; /** * The last value * @member */ this.last ...
[ "function", "Name", "(", ")", "{", "/**\n * The prefix value\n * @member\n */", "this", ".", "prefix", "=", "null", ";", "/**\n * The first value\n * @member\n */", "this", ".", "first", "=", "null", ";", "/**\n * The middle value\n * @member\n ...
The Name class @constructor @alias Name
[ "The", "Name", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/hotels/HotelPurchaseFailedSchema.js#L324-L351
20,436
wix-incubator/wix-hive-node
lib/schemas/hotels/HotelPurchaseFailedSchema.js
Customer
function Customer() { /** * The contactId value * @member */ this.contactId = null; /** * The isGuest value * @member */ this.isGuest = null; /** * The name of value * @member * @type { Name } */ this.name = Object.create(Name.prototype); /**...
javascript
function Customer() { /** * The contactId value * @member */ this.contactId = null; /** * The isGuest value * @member */ this.isGuest = null; /** * The name of value * @member * @type { Name } */ this.name = Object.create(Name.prototype); /**...
[ "function", "Customer", "(", ")", "{", "/**\n * The contactId value\n * @member\n */", "this", ".", "contactId", "=", "null", ";", "/**\n * The isGuest value\n * @member\n */", "this", ".", "isGuest", "=", "null", ";", "/**\n * The name of value\n ...
The Customer class @constructor @alias Customer
[ "The", "Customer", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/hotels/HotelPurchaseFailedSchema.js#L398-L426
20,437
wix-incubator/wix-hive-node
lib/schemas/hotels/HotelPurchaseFailedSchema.js
HotelPurchaseFailedSchema
function HotelPurchaseFailedSchema() { /** * The reservationId value * @member */ this.reservationId = null; /** * The guests of value * @member * @type { Guests } */ this.guests = Object.create(Guests.prototype); /** * The stay of value * @member * ...
javascript
function HotelPurchaseFailedSchema() { /** * The reservationId value * @member */ this.reservationId = null; /** * The guests of value * @member * @type { Guests } */ this.guests = Object.create(Guests.prototype); /** * The stay of value * @member * ...
[ "function", "HotelPurchaseFailedSchema", "(", ")", "{", "/**\n * The reservationId value\n * @member\n */", "this", ".", "reservationId", "=", "null", ";", "/**\n * The guests of value\n * @member\n * @type { Guests }\n */", "this", ".", "guests", "=", "...
The HotelPurchaseFailedSchema class @constructor @alias HotelPurchaseFailedSchema
[ "The", "HotelPurchaseFailedSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/hotels/HotelPurchaseFailedSchema.js#L569-L600
20,438
wix-incubator/wix-hive-node
lib/WixConnect.js
function(instance, secret, validator) { // spilt the instance into signature and data if (instance === null || typeof secret !== 'string' || instance.split('.').length !== 2) { throw { name: "WixSignatureException", message: "Missing instance or secret key" ...
javascript
function(instance, secret, validator) { // spilt the instance into signature and data if (instance === null || typeof secret !== 'string' || instance.split('.').length !== 2) { throw { name: "WixSignatureException", message: "Missing instance or secret key" ...
[ "function", "(", "instance", ",", "secret", ",", "validator", ")", "{", "// spilt the instance into signature and data", "if", "(", "instance", "===", "null", "||", "typeof", "secret", "!==", "'string'", "||", "instance", ".", "split", "(", "'.'", ")", ".", "l...
Parses a Wix instance and verifies the data. Either returns an object or throws an exception @static @param {string} instance - the instance parameter sent by Wix @param {string} secret - your application's secret key @param {?module:Wix/Connect~WixDateValidator} validator - an optional data validator @returns {module...
[ "Parses", "a", "Wix", "instance", "and", "verifies", "the", "data", ".", "Either", "returns", "an", "object", "or", "throws", "an", "exception" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixConnect.js#L225-L260
20,439
wix-incubator/wix-hive-node
lib/schemas/messaging/SendSchema.js
Recipient
function Recipient() { /** * The method value * @member */ this.method = null; /** * The destination of value * @member * @type { Destination } */ this.destination = Object.create(Destination.prototype); /** * The contactId value * @member */ thi...
javascript
function Recipient() { /** * The method value * @member */ this.method = null; /** * The destination of value * @member * @type { Destination } */ this.destination = Object.create(Destination.prototype); /** * The contactId value * @member */ thi...
[ "function", "Recipient", "(", ")", "{", "/**\n * The method value\n * @member\n */", "this", ".", "method", "=", "null", ";", "/**\n * The destination of value\n * @member\n * @type { Destination }\n */", "this", ".", "destination", "=", "Object", ".",...
The Recipient class @constructor @alias Recipient
[ "The", "Recipient", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/messaging/SendSchema.js#L115-L133
20,440
wix-incubator/wix-hive-node
lib/schemas/messaging/SendSchema.js
SendSchema
function SendSchema() { /** * The recipient of value * @member * @type { Recipient } */ this.recipient = Object.create(Recipient.prototype); /** * The messageId value * @member */ this.messageId = null; /** * The conversionTarget of value * @member *...
javascript
function SendSchema() { /** * The recipient of value * @member * @type { Recipient } */ this.recipient = Object.create(Recipient.prototype); /** * The messageId value * @member */ this.messageId = null; /** * The conversionTarget of value * @member *...
[ "function", "SendSchema", "(", ")", "{", "/**\n * The recipient of value\n * @member\n * @type { Recipient }\n */", "this", ".", "recipient", "=", "Object", ".", "create", "(", "Recipient", ".", "prototype", ")", ";", "/**\n * The messageId value\n * @me...
The SendSchema class @constructor @alias SendSchema
[ "The", "SendSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/messaging/SendSchema.js#L238-L257
20,441
wix-incubator/wix-hive-node
lib/schemas/hotels/HotelConfirmationSchema.js
HotelConfirmationSchema
function HotelConfirmationSchema() { /** * The source value * @member */ this.source = null; /** * The reservationId value * @member */ this.reservationId = null; /** * The guests of value * @member * @type { Guests } */ this.guests = Object.crea...
javascript
function HotelConfirmationSchema() { /** * The source value * @member */ this.source = null; /** * The reservationId value * @member */ this.reservationId = null; /** * The guests of value * @member * @type { Guests } */ this.guests = Object.crea...
[ "function", "HotelConfirmationSchema", "(", ")", "{", "/**\n * The source value\n * @member\n */", "this", ".", "source", "=", "null", ";", "/**\n * The reservationId value\n * @member\n */", "this", ".", "reservationId", "=", "null", ";", "/**\n * T...
The HotelConfirmationSchema class @constructor @alias HotelConfirmationSchema
[ "The", "HotelConfirmationSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/hotels/HotelConfirmationSchema.js#L515-L551
20,442
wix-incubator/wix-hive-node
lib/schemas/music/TrackPlaySchema.js
TrackPlaySchema
function TrackPlaySchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); }
javascript
function TrackPlaySchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); }
[ "function", "TrackPlaySchema", "(", ")", "{", "/**\n * The track of value\n * @member\n * @type { Track }\n */", "this", ".", "track", "=", "Object", ".", "create", "(", "Track", ".", "prototype", ")", ";", "/**\n * The album of value\n * @member\n *...
The TrackPlaySchema class @constructor @alias TrackPlaySchema
[ "The", "TrackPlaySchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/music/TrackPlaySchema.js#L83-L97
20,443
wix-incubator/wix-hive-node
lib/schemas/music/TrackShareSchema.js
TrackShareSchema
function TrackShareSchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); /** * The sharedTo valu...
javascript
function TrackShareSchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); /** * The sharedTo valu...
[ "function", "TrackShareSchema", "(", ")", "{", "/**\n * The track of value\n * @member\n * @type { Track }\n */", "this", ".", "track", "=", "Object", ".", "create", "(", "Track", ".", "prototype", ")", ";", "/**\n * The album of value\n * @member\n ...
The TrackShareSchema class @constructor @alias TrackShareSchema
[ "The", "TrackShareSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/music/TrackShareSchema.js#L83-L102
20,444
wix-incubator/wix-hive-node
lib/schemas/e_commerce/PurchaseSchema.js
ItemsItem
function ItemsItem() { /** * The id value * @member */ this.id = null; /** * The sku value * @member */ this.sku = null; /** * The title value * @member */ this.title = null; /** * The quantity value * @member */ this.quantity =...
javascript
function ItemsItem() { /** * The id value * @member */ this.id = null; /** * The sku value * @member */ this.sku = null; /** * The title value * @member */ this.title = null; /** * The quantity value * @member */ this.quantity =...
[ "function", "ItemsItem", "(", ")", "{", "/**\n * The id value\n * @member\n */", "this", ".", "id", "=", "null", ";", "/**\n * The sku value\n * @member\n */", "this", ".", "sku", "=", "null", ";", "/**\n * The title value\n * @member\n */", ...
The ItemsItem class @constructor @alias ItemsItem
[ "The", "ItemsItem", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/e_commerce/PurchaseSchema.js#L70-L128
20,445
wix-incubator/wix-hive-node
lib/schemas/e_commerce/PurchaseSchema.js
BillingAddress
function BillingAddress() { /** * The firstName value * @member */ this.firstName = null; /** * The lastName value * @member */ this.lastName = null; /** * The email value * @member */ this.email = null; /** * The phone value * @member ...
javascript
function BillingAddress() { /** * The firstName value * @member */ this.firstName = null; /** * The lastName value * @member */ this.lastName = null; /** * The email value * @member */ this.email = null; /** * The phone value * @member ...
[ "function", "BillingAddress", "(", ")", "{", "/**\n * The firstName value\n * @member\n */", "this", ".", "firstName", "=", "null", ";", "/**\n * The lastName value\n * @member\n */", "this", ".", "lastName", "=", "null", ";", "/**\n * The email valu...
The BillingAddress class @constructor @alias BillingAddress
[ "The", "BillingAddress", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/e_commerce/PurchaseSchema.js#L620-L687
20,446
wix-incubator/wix-hive-node
lib/schemas/e_commerce/PurchaseSchema.js
PurchaseSchema
function PurchaseSchema() { /** * The cartId value * @member */ this.cartId = null; /** * The storeId value * @member */ this.storeId = null; /** * The orderId value * @member */ this.orderId = null; /** * The payment of value * @member ...
javascript
function PurchaseSchema() { /** * The cartId value * @member */ this.cartId = null; /** * The storeId value * @member */ this.storeId = null; /** * The orderId value * @member */ this.orderId = null; /** * The payment of value * @member ...
[ "function", "PurchaseSchema", "(", ")", "{", "/**\n * The cartId value\n * @member\n */", "this", ".", "cartId", "=", "null", ";", "/**\n * The storeId value\n * @member\n */", "this", ".", "storeId", "=", "null", ";", "/**\n * The orderId value\n ...
The PurchaseSchema class @constructor @alias PurchaseSchema
[ "The", "PurchaseSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/e_commerce/PurchaseSchema.js#L798-L848
20,447
wix-incubator/wix-hive-node
lib/schemas/music/TrackSkippedSchema.js
TrackSkippedSchema
function TrackSkippedSchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); }
javascript
function TrackSkippedSchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); }
[ "function", "TrackSkippedSchema", "(", ")", "{", "/**\n * The track of value\n * @member\n * @type { Track }\n */", "this", ".", "track", "=", "Object", ".", "create", "(", "Track", ".", "prototype", ")", ";", "/**\n * The album of value\n * @member\n ...
The TrackSkippedSchema class @constructor @alias TrackSkippedSchema
[ "The", "TrackSkippedSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/music/TrackSkippedSchema.js#L83-L97
20,448
wix-incubator/wix-hive-node
lib/schemas/contacts/ContactCreateSchema.js
AddressesItem
function AddressesItem() { /** * The tag value * @member */ this.tag = null; /** * The address value * @member */ this.address = null; /** * The neighborhood value * @member */ this.neighborhood = null; /** * The city value * @member ...
javascript
function AddressesItem() { /** * The tag value * @member */ this.tag = null; /** * The address value * @member */ this.address = null; /** * The neighborhood value * @member */ this.neighborhood = null; /** * The city value * @member ...
[ "function", "AddressesItem", "(", ")", "{", "/**\n * The tag value\n * @member\n */", "this", ".", "tag", "=", "null", ";", "/**\n * The address value\n * @member\n */", "this", ".", "address", "=", "null", ";", "/**\n * The neighborhood value\n ...
The AddressesItem class @constructor @alias AddressesItem
[ "The", "AddressesItem", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/contacts/ContactCreateSchema.js#L192-L229
20,449
wix-incubator/wix-hive-node
lib/schemas/contacts/ContactCreateSchema.js
ContactCreateSchema
function ContactCreateSchema() { /** * The name of value * @member * @type { Name } */ this.name = Object.create(Name.prototype); /** * The picture value * @member */ this.picture = null; /** * The company of value * @member * @type { Company } ...
javascript
function ContactCreateSchema() { /** * The name of value * @member * @type { Name } */ this.name = Object.create(Name.prototype); /** * The picture value * @member */ this.picture = null; /** * The company of value * @member * @type { Company } ...
[ "function", "ContactCreateSchema", "(", ")", "{", "/**\n * The name of value\n * @member\n * @type { Name }\n */", "this", ".", "name", "=", "Object", ".", "create", "(", "Name", ".", "prototype", ")", ";", "/**\n * The picture value\n * @member\n */...
The ContactCreateSchema class @constructor @alias ContactCreateSchema
[ "The", "ContactCreateSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/contacts/ContactCreateSchema.js#L362-L381
20,450
wix-incubator/wix-hive-node
lib/WixClient.js
WixPagingData
function WixPagingData(initialResult, wixApiCallback, dataHandler) { this.currentData = initialResult; if(dataHandler !== undefined && dataHandler !== null) { this.resultData = _.map(initialResult.results, function(elem) { return dataHandler(elem); }); } else { this.resul...
javascript
function WixPagingData(initialResult, wixApiCallback, dataHandler) { this.currentData = initialResult; if(dataHandler !== undefined && dataHandler !== null) { this.resultData = _.map(initialResult.results, function(elem) { return dataHandler(elem); }); } else { this.resul...
[ "function", "WixPagingData", "(", "initialResult", ",", "wixApiCallback", ",", "dataHandler", ")", "{", "this", ".", "currentData", "=", "initialResult", ";", "if", "(", "dataHandler", "!==", "undefined", "&&", "dataHandler", "!==", "null", ")", "{", "this", "...
A WixPagingData object is used to navigate cursored data sets returned by Wix APIs @constructor @class @alias WixPagingData
[ "A", "WixPagingData", "object", "is", "used", "to", "navigate", "cursored", "data", "sets", "returned", "by", "Wix", "APIs" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L32-L90
20,451
wix-incubator/wix-hive-node
lib/WixClient.js
WixActivityData
function WixActivityData() { /** * Information about the Activity * @typedef {Object} WixActivityData.ActivityDetails * @property {?String} additionalInfoUrl Url linking to more specific contextual information about the activity for use in the Dashboard * @property {?string} summary A short desc...
javascript
function WixActivityData() { /** * Information about the Activity * @typedef {Object} WixActivityData.ActivityDetails * @property {?String} additionalInfoUrl Url linking to more specific contextual information about the activity for use in the Dashboard * @property {?string} summary A short desc...
[ "function", "WixActivityData", "(", ")", "{", "/**\n * Information about the Activity\n * @typedef {Object} WixActivityData.ActivityDetails\n * @property {?String} additionalInfoUrl Url linking to more specific contextual information about the activity for use in the Dashboard\n * @propert...
Represents an Activity in the Wix ecosystem @constructor @alias WixActivityData @class
[ "Represents", "an", "Activity", "in", "the", "Wix", "ecosystem" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L290-L350
20,452
wix-incubator/wix-hive-node
lib/WixClient.js
WixActivity
function WixActivity() { /** * Updates to the existing contact that performed this activity. The structure of this object should match the schema for Contact, with the relevant fields updated. * @member * @type {Object} */ this.contactUpdate = schemaFactory(this.TYPES.CONTACT_CREATE.name); ...
javascript
function WixActivity() { /** * Updates to the existing contact that performed this activity. The structure of this object should match the schema for Contact, with the relevant fields updated. * @member * @type {Object} */ this.contactUpdate = schemaFactory(this.TYPES.CONTACT_CREATE.name); ...
[ "function", "WixActivity", "(", ")", "{", "/**\n * Updates to the existing contact that performed this activity. The structure of this object should match the schema for Contact, with the relevant fields updated.\n * @member\n * @type {Object}\n */", "this", ".", "contactUpdate", "...
Represents a new Activity in the Wix ecosystem, allowing for easy construction and creation @mixes BaseWixAPIObject @mixes WixActivityData @constructor @alias WixActivity @class
[ "Represents", "a", "new", "Activity", "in", "the", "Wix", "ecosystem", "allowing", "for", "easy", "construction", "and", "creation" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L360-L452
20,453
wix-incubator/wix-hive-node
lib/WixClient.js
Name
function Name(obj){ this._prefix = obj && obj.prefix; this._first = obj && obj.first; this._last = obj && obj.last; this._middle = obj && obj.middle; this._suffix = obj && obj.suffix; }
javascript
function Name(obj){ this._prefix = obj && obj.prefix; this._first = obj && obj.first; this._last = obj && obj.last; this._middle = obj && obj.middle; this._suffix = obj && obj.suffix; }
[ "function", "Name", "(", "obj", ")", "{", "this", ".", "_prefix", "=", "obj", "&&", "obj", ".", "prefix", ";", "this", ".", "_first", "=", "obj", "&&", "obj", ".", "first", ";", "this", ".", "_last", "=", "obj", "&&", "obj", ".", "last", ";", "...
Contact Name information @typedef {Object} Contact.Name @property {string} prefix - The prefix of the contact's name @property {string} first - The contact's first name @property {string} middle - The contact's middle name @property {string} last - The contact's last name @property {string} suffix - The suffix of the c...
[ "Contact", "Name", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L933-L939
20,454
wix-incubator/wix-hive-node
lib/WixClient.js
Company
function Company(obj){ this._role = obj && obj.role; this._name = obj && obj.name; }
javascript
function Company(obj){ this._role = obj && obj.role; this._name = obj && obj.name; }
[ "function", "Company", "(", "obj", ")", "{", "this", ".", "_role", "=", "obj", "&&", "obj", ".", "role", ";", "this", ".", "_name", "=", "obj", "&&", "obj", ".", "name", ";", "}" ]
Contact Company information @typedef {Object} Contact.Company @property {string} role - The contact's role within their company, @property {string} name - The name of the contact's current company
[ "Contact", "Company", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L978-L981
20,455
wix-incubator/wix-hive-node
lib/WixClient.js
Email
function Email(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._email = obj && obj.email; this._emailStatus = obj && obj.emailStatus; if (this._tag == undefined || this._tag == null){ throw 'Tag is a required field' } if (this._email == undefined || this._email == n...
javascript
function Email(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._email = obj && obj.email; this._emailStatus = obj && obj.emailStatus; if (this._tag == undefined || this._tag == null){ throw 'Tag is a required field' } if (this._email == undefined || this._email == n...
[ "function", "Email", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_tag", "=", "obj", "&&", "obj", ".", "tag", ";", "this", ".", "_email", "=", "obj", "&&", "obj", ".", "email", ";", "this", ...
Contact Email information @typedef {Object} Contact.Email @property {string} tag - a context tag @property {string} email - The email address to add @property {string} contactSubscriptionStatus - The subscription status of the current contact ['optIn' or 'optInOut' or 'notSet'] @property {string} siteOwnerSubscriptionS...
[ "Contact", "Email", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1010-L1022
20,456
wix-incubator/wix-hive-node
lib/WixClient.js
Phone
function Phone(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._phone = obj && obj.phone; this._normalizedPhone = obj && obj.normalizedPhone; }
javascript
function Phone(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._phone = obj && obj.phone; this._normalizedPhone = obj && obj.normalizedPhone; }
[ "function", "Phone", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_tag", "=", "obj", "&&", "obj", ".", "tag", ";", "this", ".", "_phone", "=", "obj", "&&", "obj", ".", "phone", ";", "this", ...
Contact Phone information @typedef {Object} Contact.Phone @property {string} tag - a context tag @property {string} phone - The phone number to add @property {string} normalizedPhone - The contact's normalized phone number
[ "Contact", "Phone", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1061-L1066
20,457
wix-incubator/wix-hive-node
lib/WixClient.js
Address
function Address(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._address = obj && obj.address; this._city = obj && obj.city; this._neighborhood = obj && obj.neighborhood; this._region = obj && obj.region; this._country = obj && obj.country; this._postalCode = obj && obj...
javascript
function Address(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._address = obj && obj.address; this._city = obj && obj.city; this._neighborhood = obj && obj.neighborhood; this._region = obj && obj.region; this._country = obj && obj.country; this._postalCode = obj && obj...
[ "function", "Address", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_tag", "=", "obj", "&&", "obj", ".", "tag", ";", "this", ".", "_address", "=", "obj", "&&", "obj", ".", "address", ";", "thi...
Contact Address information @typedef {Object} Contact.Address @property {String} tag - The context tag associated with this address, @property {?String} address - The contact's street address, @property {?String} neighborhood - The contact's street neighborhood, @property {?String} city - The contact's city, @property ...
[ "Contact", "Address", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1107-L1116
20,458
wix-incubator/wix-hive-node
lib/WixClient.js
Url
function Url(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._url = obj && obj.url; }
javascript
function Url(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._url = obj && obj.url; }
[ "function", "Url", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_tag", "=", "obj", "&&", "obj", ".", "tag", ";", "this", ".", "_url", "=", "obj", "&&", "obj", ".", "url", ";", "}" ]
Contact Url information @typedef {Object} Contact.Url @property {string} tag - The context tag associated with this url @property {string} url - A url associated with this contact
[ "Contact", "Url", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1177-L1181
20,459
wix-incubator/wix-hive-node
lib/WixClient.js
StateLink
function StateLink(obj){ this._id = obj && obj.id; this._href = obj && obj.href; this._rel = obj && obj.rel; }
javascript
function StateLink(obj){ this._id = obj && obj.id; this._href = obj && obj.href; this._rel = obj && obj.rel; }
[ "function", "StateLink", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_href", "=", "obj", "&&", "obj", ".", "href", ";", "this", ".", "_rel", "=", "obj", "&&", "obj", ".", "rel", ";", "}" ]
Contact Link information A HATEOAS link to operations applicable to this Contact resource @typedef {Object} Contact.StateLink @property {string} href - The href of the operation relevant to this resource @property {string} rel - The relationship of this operation to the returned resource
[ "Contact", "Link", "information", "A", "HATEOAS", "link", "to", "operations", "applicable", "to", "this", "Contact", "resource" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1213-L1217
20,460
wix-incubator/wix-hive-node
lib/WixClient.js
ImportantDate
function ImportantDate(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._date = obj && obj.date; }
javascript
function ImportantDate(obj){ this._id = obj && obj.id; this._tag = obj && obj.tag; this._date = obj && obj.date; }
[ "function", "ImportantDate", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_tag", "=", "obj", "&&", "obj", ".", "tag", ";", "this", ".", "_date", "=", "obj", "&&", "obj", ".", "date", ";", "}" ...
Contact Important Date information @typedef {Object} Contact.ImportantDate @property {string} tag - The context tag associated with this date @property {dateTime} date - An important date for this contact, as an ISO 8601 timestamp
[ "Contact", "Important", "Date", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1248-L1252
20,461
wix-incubator/wix-hive-node
lib/WixClient.js
Note
function Note(obj){ this._id = obj && obj.id; this._modifiedAt = obj && obj.modifiedAt; this._content = obj && obj.content; }
javascript
function Note(obj){ this._id = obj && obj.id; this._modifiedAt = obj && obj.modifiedAt; this._content = obj && obj.content; }
[ "function", "Note", "(", "obj", ")", "{", "this", ".", "_id", "=", "obj", "&&", "obj", ".", "id", ";", "this", ".", "_modifiedAt", "=", "obj", "&&", "obj", ".", "modifiedAt", ";", "this", ".", "_content", "=", "obj", "&&", "obj", ".", "content", ...
Contact Note information @typedef {Object} Contact.Note @property {string} tag - a context tag @property {string} note - The note to add
[ "Contact", "Note", "information" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1318-L1322
20,462
wix-incubator/wix-hive-node
lib/WixClient.js
WixLabelData
function WixLabelData() { /** * The id of the Label * @member WixLabelData#id * @type {string} */ /** * A timestamp to indicate when this Label was created * @member * @type {Date} */ this.createdAt = new Date().toISOString(); /** * Label name * @memb...
javascript
function WixLabelData() { /** * The id of the Label * @member WixLabelData#id * @type {string} */ /** * A timestamp to indicate when this Label was created * @member * @type {Date} */ this.createdAt = new Date().toISOString(); /** * Label name * @memb...
[ "function", "WixLabelData", "(", ")", "{", "/**\n * The id of the Label\n * @member WixLabelData#id\n * @type {string}\n */", "/**\n * A timestamp to indicate when this Label was created\n * @member\n * @type {Date}\n */", "this", ".", "createdAt", "=", "new", ...
Represents an Label in the Wix ecosystem @constructor @alias WixLabelData @class
[ "Represents", "an", "Label", "in", "the", "Wix", "ecosystem" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L1973-L2028
20,463
wix-incubator/wix-hive-node
lib/WixClient.js
WixLabel
function WixLabel() { this.isValid = function() { //TODO provide slightly better validation return this.name !== null && this.description !== null; }; this.toJSON = function() { var _this = this; return { name : _this.name, description : ...
javascript
function WixLabel() { this.isValid = function() { //TODO provide slightly better validation return this.name !== null && this.description !== null; }; this.toJSON = function() { var _this = this; return { name : _this.name, description : ...
[ "function", "WixLabel", "(", ")", "{", "this", ".", "isValid", "=", "function", "(", ")", "{", "//TODO provide slightly better validation", "return", "this", ".", "name", "!==", "null", "&&", "this", ".", "description", "!==", "null", ";", "}", ";", "this", ...
Represents a new Label in the Wix ecosystem, allowing for easy construction and creation @mixes BaseWixAPIObject @mixes WixLabelData @constructor @alias WixLabel @class
[ "Represents", "a", "new", "Label", "in", "the", "Wix", "ecosystem", "allowing", "for", "easy", "construction", "and", "creation" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L2038-L2053
20,464
wix-incubator/wix-hive-node
lib/WixClient.js
APIBuilder
function APIBuilder() { /** * Creates a {@link Wix} API object with the give credentials. * @method * @param {APIBuilder.APICredentials} data JSON data containing credentials for the API * @throws an exception if signatures don't match when using the API with the instance param * @throws an...
javascript
function APIBuilder() { /** * Creates a {@link Wix} API object with the give credentials. * @method * @param {APIBuilder.APICredentials} data JSON data containing credentials for the API * @throws an exception if signatures don't match when using the API with the instance param * @throws an...
[ "function", "APIBuilder", "(", ")", "{", "/**\n * Creates a {@link Wix} API object with the give credentials.\n * @method\n * @param {APIBuilder.APICredentials} data JSON data containing credentials for the API\n * @throws an exception if signatures don't match when using the API with the ...
Credentials to access the Wix API. Must specific either an instance or an instanceId property @typedef {Object} APIBuilder.APICredentials @alias APICredentials @property {!String} secretKey Your applications Secret Key @property {!string} appId Your applications App Id @property {?String} instanceId Your applications i...
[ "Credentials", "to", "access", "the", "Wix", "API", ".", "Must", "specific", "either", "an", "instance", "or", "an", "instanceId", "property" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/WixClient.js#L2293-L2321
20,465
wix-incubator/wix-hive-node
lib/schemas/music/TrackPlayedSchema.js
TrackPlayedSchema
function TrackPlayedSchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); }
javascript
function TrackPlayedSchema() { /** * The track of value * @member * @type { Track } */ this.track = Object.create(Track.prototype); /** * The album of value * @member * @type { Album } */ this.album = Object.create(Album.prototype); }
[ "function", "TrackPlayedSchema", "(", ")", "{", "/**\n * The track of value\n * @member\n * @type { Track }\n */", "this", ".", "track", "=", "Object", ".", "create", "(", "Track", ".", "prototype", ")", ";", "/**\n * The album of value\n * @member\n ...
The TrackPlayedSchema class @constructor @alias TrackPlayedSchema
[ "The", "TrackPlayedSchema", "class" ]
1e2ea858d30b057f300306d1eace6a6c388318e8
https://github.com/wix-incubator/wix-hive-node/blob/1e2ea858d30b057f300306d1eace6a6c388318e8/lib/schemas/music/TrackPlayedSchema.js#L83-L97
20,466
chriso/redback
lib/advanced_structures/Lock.js
function(client, key, ttl) { client.ttl(key, function(err, currentTtl) { if (currentTtl === -1) { // There is no expiry set on this key, set it client.expire(key, ttl); } }); }
javascript
function(client, key, ttl) { client.ttl(key, function(err, currentTtl) { if (currentTtl === -1) { // There is no expiry set on this key, set it client.expire(key, ttl); } }); }
[ "function", "(", "client", ",", "key", ",", "ttl", ")", "{", "client", ".", "ttl", "(", "key", ",", "function", "(", "err", ",", "currentTtl", ")", "{", "if", "(", "currentTtl", "===", "-", "1", ")", "{", "// There is no expiry set on this key, set it", ...
Ensure the lock with the given key has a `ttl`. If it does not, the given expiry will be applied to it. @param {RedisClient} client The Redis to use to apply the ttl @param {string} key The key of the lock to check @param {number} ttl If the lock does not have an expiry set, set this dur...
[ "Ensure", "the", "lock", "with", "the", "given", "key", "has", "a", "ttl", ".", "If", "it", "does", "not", "the", "given", "expiry", "will", "be", "applied", "to", "it", "." ]
1529cbf2bfa31e2479bf7c1f81df0a48c730cc63
https://github.com/chriso/redback/blob/1529cbf2bfa31e2479bf7c1f81df0a48c730cc63/lib/advanced_structures/Lock.js#L109-L116
20,467
chriso/redback
lib/advanced_structures/Lock.js
function(callback) { crypto.randomBytes(16, function(err, buffer) { if (err) { return callback(err); } return callback(null, buffer.toString('base64')); }); }
javascript
function(callback) { crypto.randomBytes(16, function(err, buffer) { if (err) { return callback(err); } return callback(null, buffer.toString('base64')); }); }
[ "function", "(", "callback", ")", "{", "crypto", ".", "randomBytes", "(", "16", ",", "function", "(", "err", ",", "buffer", ")", "{", "if", "(", "err", ")", "{", "return", "callback", "(", "err", ")", ";", "}", "return", "callback", "(", "null", ",...
Generate a random lock token. @param {Function} callback Invoked with the token when complete @param {Error} callback.err An error that occurred, if any @param {string} callback.token The randomly generated token @api private
[ "Generate", "a", "random", "lock", "token", "." ]
1529cbf2bfa31e2479bf7c1f81df0a48c730cc63
https://github.com/chriso/redback/blob/1529cbf2bfa31e2479bf7c1f81df0a48c730cc63/lib/advanced_structures/Lock.js#L127-L135
20,468
themasch/node-bencode
lib/encode.js
encode
function encode (data, buffer, offset) { var buffers = [] var result = null encode._encode(buffers, data) result = Buffer.concat(buffers) encode.bytes = result.length if (Buffer.isBuffer(buffer)) { result.copy(buffer, offset) return buffer } return result }
javascript
function encode (data, buffer, offset) { var buffers = [] var result = null encode._encode(buffers, data) result = Buffer.concat(buffers) encode.bytes = result.length if (Buffer.isBuffer(buffer)) { result.copy(buffer, offset) return buffer } return result }
[ "function", "encode", "(", "data", ",", "buffer", ",", "offset", ")", "{", "var", "buffers", "=", "[", "]", "var", "result", "=", "null", "encode", ".", "_encode", "(", "buffers", ",", "data", ")", "result", "=", "Buffer", ".", "concat", "(", "buffer...
Encodes data in bencode. @param {Buffer|Array|String|Object|Number|Boolean} data @return {Buffer}
[ "Encodes", "data", "in", "bencode", "." ]
8a881dffcdedcc9e122b7f6e5dd2f96eb0fe0ab4
https://github.com/themasch/node-bencode/blob/8a881dffcdedcc9e122b7f6e5dd2f96eb0fe0ab4/lib/encode.js#L9-L23
20,469
themasch/node-bencode
lib/decode.js
decode
function decode (data, start, end, encoding) { if (data == null || data.length === 0) { return null } if (typeof start !== 'number' && encoding == null) { encoding = start start = undefined } if (typeof end !== 'number' && encoding == null) { encoding = end end = undefined } decode....
javascript
function decode (data, start, end, encoding) { if (data == null || data.length === 0) { return null } if (typeof start !== 'number' && encoding == null) { encoding = start start = undefined } if (typeof end !== 'number' && encoding == null) { encoding = end end = undefined } decode....
[ "function", "decode", "(", "data", ",", "start", ",", "end", ",", "encoding", ")", "{", "if", "(", "data", "==", "null", "||", "data", ".", "length", "===", "0", ")", "{", "return", "null", "}", "if", "(", "typeof", "start", "!==", "'number'", "&&"...
Decodes bencoded data. @param {Buffer} data @param {Number} start (optional) @param {Number} end (optional) @param {String} encoding (optional) @return {Object|Array|Buffer|String|Number}
[ "Decodes", "bencoded", "data", "." ]
8a881dffcdedcc9e122b7f6e5dd2f96eb0fe0ab4
https://github.com/themasch/node-bencode/blob/8a881dffcdedcc9e122b7f6e5dd2f96eb0fe0ab4/lib/decode.js#L59-L84
20,470
diegonetto/generator-ionic
templates/hooks/after_prepare/icons_and_splashscreens.js
copyFile
function copyFile (src, dest, ncpOpts, callback) { var orchestrator = new Orchestrator(); var parts = dest.split(path.sep); var fileName = parts.pop(); var destDir = parts.join(path.sep); var destFile = path.resolve(destDir, fileName); orchestrator.add('ensureDir', function (done) { mkdirp(destDir, func...
javascript
function copyFile (src, dest, ncpOpts, callback) { var orchestrator = new Orchestrator(); var parts = dest.split(path.sep); var fileName = parts.pop(); var destDir = parts.join(path.sep); var destFile = path.resolve(destDir, fileName); orchestrator.add('ensureDir', function (done) { mkdirp(destDir, func...
[ "function", "copyFile", "(", "src", ",", "dest", ",", "ncpOpts", ",", "callback", ")", "{", "var", "orchestrator", "=", "new", "Orchestrator", "(", ")", ";", "var", "parts", "=", "dest", ".", "split", "(", "path", ".", "sep", ")", ";", "var", "fileNa...
Helper function for file copying that ensures directory existence.
[ "Helper", "function", "for", "file", "copying", "that", "ensures", "directory", "existence", "." ]
c5eb2078a8fe08658aeccb4a51a17d19b169c3a1
https://github.com/diegonetto/generator-ionic/blob/c5eb2078a8fe08658aeccb4a51a17d19b169c3a1/templates/hooks/after_prepare/icons_and_splashscreens.js#L29-L48
20,471
diegonetto/generator-ionic
templates/hooks/after_prepare/update_platform_config.js
function (filename) { var contents = fs.readFileSync(filename, 'utf-8'); if(contents) { //Windows is the BOM. Skip the Byte Order Mark. contents = contents.substring(contents.indexOf('<')); } return new et.ElementTree(et.XML(contents)); ...
javascript
function (filename) { var contents = fs.readFileSync(filename, 'utf-8'); if(contents) { //Windows is the BOM. Skip the Byte Order Mark. contents = contents.substring(contents.indexOf('<')); } return new et.ElementTree(et.XML(contents)); ...
[ "function", "(", "filename", ")", "{", "var", "contents", "=", "fs", ".", "readFileSync", "(", "filename", ",", "'utf-8'", ")", ";", "if", "(", "contents", ")", "{", "//Windows is the BOM. Skip the Byte Order Mark.", "contents", "=", "contents", ".", "substring"...
Parses a given file into an elementtree object
[ "Parses", "a", "given", "file", "into", "an", "elementtree", "object" ]
c5eb2078a8fe08658aeccb4a51a17d19b169c3a1
https://github.com/diegonetto/generator-ionic/blob/c5eb2078a8fe08658aeccb4a51a17d19b169c3a1/templates/hooks/after_prepare/update_platform_config.js#L107-L114
20,472
rstiller/inspector-metrics
examples/express4-multi-process-js/src/metrics.js
carbonReporter
async function carbonReporter (registry, tags) { const { CarbonMetricReporter } = require('inspector-carbon') const reporter = new CarbonMetricReporter({ host: 'http://localhost/', log: null, minReportingTimeout: 30, reportInterval: 5000 }) reporter.setTags(tags) reporter.addMetricRegi...
javascript
async function carbonReporter (registry, tags) { const { CarbonMetricReporter } = require('inspector-carbon') const reporter = new CarbonMetricReporter({ host: 'http://localhost/', log: null, minReportingTimeout: 30, reportInterval: 5000 }) reporter.setTags(tags) reporter.addMetricRegi...
[ "async", "function", "carbonReporter", "(", "registry", ",", "tags", ")", "{", "const", "{", "CarbonMetricReporter", "}", "=", "require", "(", "'inspector-carbon'", ")", "const", "reporter", "=", "new", "CarbonMetricReporter", "(", "{", "host", ":", "'http://loc...
return reporter }
[ "return", "reporter", "}" ]
6b1d23b8bf328614242cebecebfa2fac29ccb049
https://github.com/rstiller/inspector-metrics/blob/6b1d23b8bf328614242cebecebfa2fac29ccb049/examples/express4-multi-process-js/src/metrics.js#L22-L40
20,473
namics/generator-nitro
packages/nitro-webpack/lib/utils.js
getEnrichedConfig
function getEnrichedConfig(rule, config) { if (!config) { return rule; } if (config.include) { rule.include = config.include; } if (config.exclude) { rule.exclude = config.exclude; } return rule; }
javascript
function getEnrichedConfig(rule, config) { if (!config) { return rule; } if (config.include) { rule.include = config.include; } if (config.exclude) { rule.exclude = config.exclude; } return rule; }
[ "function", "getEnrichedConfig", "(", "rule", ",", "config", ")", "{", "if", "(", "!", "config", ")", "{", "return", "rule", ";", "}", "if", "(", "config", ".", "include", ")", "{", "rule", ".", "include", "=", "config", ".", "include", ";", "}", "...
add optional include or exclude configs to rule
[ "add", "optional", "include", "or", "exclude", "configs", "to", "rule" ]
c81f7c6ebd9aebe4a6dfbea0d6fa4eeedc68024d
https://github.com/namics/generator-nitro/blob/c81f7c6ebd9aebe4a6dfbea0d6fa4eeedc68024d/packages/nitro-webpack/lib/utils.js#L4-L14
20,474
namics/generator-nitro
packages/nitro-app/app/lib/view.js
getViewCombinations
function getViewCombinations(action) { const pathes = [action]; const positions = []; let i; let j; for (i = 0; i < action.length; i++) { if (action[i] === '-') { positions.push(i); } } const len = positions.length; const combinations = []; for (i = 1; i < (1 << len); i++) { const c = []; for (j ...
javascript
function getViewCombinations(action) { const pathes = [action]; const positions = []; let i; let j; for (i = 0; i < action.length; i++) { if (action[i] === '-') { positions.push(i); } } const len = positions.length; const combinations = []; for (i = 1; i < (1 << len); i++) { const c = []; for (j ...
[ "function", "getViewCombinations", "(", "action", ")", "{", "const", "pathes", "=", "[", "action", "]", ";", "const", "positions", "=", "[", "]", ";", "let", "i", ";", "let", "j", ";", "for", "(", "i", "=", "0", ";", "i", "<", "action", ".", "len...
get possible view paths @param action The requested route (e.g. content-example) @returns {Array} array of strings of possible paths to view files (e.g. content-example, content/example)
[ "get", "possible", "view", "paths" ]
c81f7c6ebd9aebe4a6dfbea0d6fa4eeedc68024d
https://github.com/namics/generator-nitro/blob/c81f7c6ebd9aebe4a6dfbea0d6fa4eeedc68024d/packages/nitro-app/app/lib/view.js#L70-L103
20,475
choojs/nanorouter
index.js
pathname
function pathname (routename, isElectron) { if (isElectron) routename = routename.replace(stripElectron, '') else routename = routename.replace(prefix, '') return decodeURI(routename.replace(suffix, '').replace(normalize, '/')) }
javascript
function pathname (routename, isElectron) { if (isElectron) routename = routename.replace(stripElectron, '') else routename = routename.replace(prefix, '') return decodeURI(routename.replace(suffix, '').replace(normalize, '/')) }
[ "function", "pathname", "(", "routename", ",", "isElectron", ")", "{", "if", "(", "isElectron", ")", "routename", "=", "routename", ".", "replace", "(", "stripElectron", ",", "''", ")", "else", "routename", "=", "routename", ".", "replace", "(", "prefix", ...
replace everything in a route but the pathname and hash
[ "replace", "everything", "in", "a", "route", "but", "the", "pathname", "and", "hash" ]
ed5016ef347cd466d603309a65bf83dfe61750ce
https://github.com/choojs/nanorouter/blob/ed5016ef347cd466d603309a65bf83dfe61750ce/index.js#L50-L54
20,476
dfinity/wasm-persist
index.js
prepare
function prepare (binary, include = {memory: true, table: true}, symbol = '_') { return inject(binary, include, symbol) }
javascript
function prepare (binary, include = {memory: true, table: true}, symbol = '_') { return inject(binary, include, symbol) }
[ "function", "prepare", "(", "binary", ",", "include", "=", "{", "memory", ":", "true", ",", "table", ":", "true", "}", ",", "symbol", "=", "'_'", ")", "{", "return", "inject", "(", "binary", ",", "include", ",", "symbol", ")", "}" ]
Prepares a binary by injecting getter and setter function for memory, globals and tables. @param {ArrayBuffer} binary - a wasm binary @param {Object} include @param {Boolean} [include.memory=true] - whether or not to include memory @param {Boolean} [include.table=true] - whether or not to include the function table @pa...
[ "Prepares", "a", "binary", "by", "injecting", "getter", "and", "setter", "function", "for", "memory", "globals", "and", "tables", "." ]
39daece03e7489406df32a0b433623980a20e393
https://github.com/dfinity/wasm-persist/blob/39daece03e7489406df32a0b433623980a20e393/index.js#L16-L18
20,477
dfinity/wasm-persist
index.js
hibernate
function hibernate (instance, symbol = '_') { const json = { globals: [], table: [], symbol } for (const key in instance.exports) { const val = instance.exports[key] if (key.startsWith(symbol)) { const keyElems = key.slice(symbol.length).split('_') // save the memory if (val ...
javascript
function hibernate (instance, symbol = '_') { const json = { globals: [], table: [], symbol } for (const key in instance.exports) { const val = instance.exports[key] if (key.startsWith(symbol)) { const keyElems = key.slice(symbol.length).split('_') // save the memory if (val ...
[ "function", "hibernate", "(", "instance", ",", "symbol", "=", "'_'", ")", "{", "const", "json", "=", "{", "globals", ":", "[", "]", ",", "table", ":", "[", "]", ",", "symbol", "}", "for", "(", "const", "key", "in", "instance", ".", "exports", ")", ...
Given a Webassembly Instance this will produce an Object containing the current state of the instance @param {WebAssembly.Instance} instance @param {String} symbol - the symbol that will be used to find the injected functions @return {Object} the state of the wasm instance
[ "Given", "a", "Webassembly", "Instance", "this", "will", "produce", "an", "Object", "containing", "the", "current", "state", "of", "the", "instance" ]
39daece03e7489406df32a0b433623980a20e393
https://github.com/dfinity/wasm-persist/blob/39daece03e7489406df32a0b433623980a20e393/index.js#L27-L64
20,478
dfinity/wasm-persist
index.js
resume
function resume (instance, state) { if (instance.__hibernated) { instance.__hibernated = false } else { // initialize memory const mem = instance.exports[`${state.symbol}memory`] if (mem) { (new Uint32Array(mem.buffer)).set(state.memory, 0) } // initialize table if (instance.expor...
javascript
function resume (instance, state) { if (instance.__hibernated) { instance.__hibernated = false } else { // initialize memory const mem = instance.exports[`${state.symbol}memory`] if (mem) { (new Uint32Array(mem.buffer)).set(state.memory, 0) } // initialize table if (instance.expor...
[ "function", "resume", "(", "instance", ",", "state", ")", "{", "if", "(", "instance", ".", "__hibernated", ")", "{", "instance", ".", "__hibernated", "=", "false", "}", "else", "{", "// initialize memory", "const", "mem", "=", "instance", ".", "exports", "...
Resumes a previously hibernated Webassembly instance @param {WebAssembly.Instance} instance @param {Object} state - the previous state of the wasm instance @return {WebAssembly.Instance}
[ "Resumes", "a", "previously", "hibernated", "Webassembly", "instance" ]
39daece03e7489406df32a0b433623980a20e393
https://github.com/dfinity/wasm-persist/blob/39daece03e7489406df32a0b433623980a20e393/index.js#L72-L103
20,479
socketio/engine.io-parser
lib/index.js
encodeBuffer
function encodeBuffer(packet, supportsBinary, callback) { if (!supportsBinary) { return exports.encodeBase64Packet(packet, callback); } var data = packet.data; var typeBuffer = new Buffer(1); typeBuffer[0] = packets[packet.type]; return callback(Buffer.concat([typeBuffer, data])); }
javascript
function encodeBuffer(packet, supportsBinary, callback) { if (!supportsBinary) { return exports.encodeBase64Packet(packet, callback); } var data = packet.data; var typeBuffer = new Buffer(1); typeBuffer[0] = packets[packet.type]; return callback(Buffer.concat([typeBuffer, data])); }
[ "function", "encodeBuffer", "(", "packet", ",", "supportsBinary", ",", "callback", ")", "{", "if", "(", "!", "supportsBinary", ")", "{", "return", "exports", ".", "encodeBase64Packet", "(", "packet", ",", "callback", ")", ";", "}", "var", "data", "=", "pac...
Encode Buffer data
[ "Encode", "Buffer", "data" ]
021a7dc75137585aced83f23fd056c3101504418
https://github.com/socketio/engine.io-parser/blob/021a7dc75137585aced83f23fd056c3101504418/lib/index.js#L85-L94
20,480
socketio/engine.io-parser
lib/index.js
map
function map(ary, each, done) { var result = new Array(ary.length); var next = after(ary.length, done); for (var i = 0; i < ary.length; i++) { each(ary[i], function(error, msg) { result[i] = msg; next(error, result); }); } }
javascript
function map(ary, each, done) { var result = new Array(ary.length); var next = after(ary.length, done); for (var i = 0; i < ary.length; i++) { each(ary[i], function(error, msg) { result[i] = msg; next(error, result); }); } }
[ "function", "map", "(", "ary", ",", "each", ",", "done", ")", "{", "var", "result", "=", "new", "Array", "(", "ary", ".", "length", ")", ";", "var", "next", "=", "after", "(", "ary", ".", "length", ",", "done", ")", ";", "for", "(", "var", "i",...
Async array map using after
[ "Async", "array", "map", "using", "after" ]
021a7dc75137585aced83f23fd056c3101504418
https://github.com/socketio/engine.io-parser/blob/021a7dc75137585aced83f23fd056c3101504418/lib/index.js#L244-L254
20,481
shripalsoni04/nativescript-webview-interface
index-common.js
parseJSON
function parseJSON(data) { var oData; try { oData = JSON.parse(data); } catch (e) { return false; } return oData; }
javascript
function parseJSON(data) { var oData; try { oData = JSON.parse(data); } catch (e) { return false; } return oData; }
[ "function", "parseJSON", "(", "data", ")", "{", "var", "oData", ";", "try", "{", "oData", "=", "JSON", ".", "parse", "(", "data", ")", ";", "}", "catch", "(", "e", ")", "{", "return", "false", ";", "}", "return", "oData", ";", "}" ]
Parses json string to object if valid.
[ "Parses", "json", "string", "to", "object", "if", "valid", "." ]
351a418e6069eefc9c244700dfbaf6428b0bf3e0
https://github.com/shripalsoni04/nativescript-webview-interface/blob/351a418e6069eefc9c244700dfbaf6428b0bf3e0/index-common.js#L4-L12
20,482
shripalsoni04/nativescript-webview-interface
index-common.js
WebViewInterface
function WebViewInterface(webView) { /** * WebView to setup interface for */ this.webView = webView; /** * Mapping of webView event/command and its native handler */ this.eventListenerMap = {}; /** * Mapping of js call request id and its success handler. * B...
javascript
function WebViewInterface(webView) { /** * WebView to setup interface for */ this.webView = webView; /** * Mapping of webView event/command and its native handler */ this.eventListenerMap = {}; /** * Mapping of js call request id and its success handler. * B...
[ "function", "WebViewInterface", "(", "webView", ")", "{", "/**\n * WebView to setup interface for\n */", "this", ".", "webView", "=", "webView", ";", "/**\n * Mapping of webView event/command and its native handler \n */", "this", ".", "eventListenerMap", "=", "{"...
WebViewInterface Class containing common functionalities for Android and iOS
[ "WebViewInterface", "Class", "containing", "common", "functionalities", "for", "Android", "and", "iOS" ]
351a418e6069eefc9c244700dfbaf6428b0bf3e0
https://github.com/shripalsoni04/nativescript-webview-interface/blob/351a418e6069eefc9c244700dfbaf6428b0bf3e0/index-common.js#L17-L51
20,483
shripalsoni04/nativescript-webview-interface
index.android.js
getAndroidJSInterface
function getAndroidJSInterface(oWebViewInterface){ var AndroidWebViewInterface = com.shripalsoni.natiescriptwebviewinterface.WebViewInterface.extend({ /** * On call from webView to android, this function is called from handleEventFromWebView method of WebViewInerface class */ onWeb...
javascript
function getAndroidJSInterface(oWebViewInterface){ var AndroidWebViewInterface = com.shripalsoni.natiescriptwebviewinterface.WebViewInterface.extend({ /** * On call from webView to android, this function is called from handleEventFromWebView method of WebViewInerface class */ onWeb...
[ "function", "getAndroidJSInterface", "(", "oWebViewInterface", ")", "{", "var", "AndroidWebViewInterface", "=", "com", ".", "shripalsoni", ".", "natiescriptwebviewinterface", ".", "WebViewInterface", ".", "extend", "(", "{", "/**\n * On call from webView to android, t...
Factory function to provide instance of Android JavascriptInterface.
[ "Factory", "function", "to", "provide", "instance", "of", "Android", "JavascriptInterface", "." ]
351a418e6069eefc9c244700dfbaf6428b0bf3e0
https://github.com/shripalsoni04/nativescript-webview-interface/blob/351a418e6069eefc9c244700dfbaf6428b0bf3e0/index.android.js#L9-L25
20,484
shripalsoni04/nativescript-webview-interface
index.android.js
function(webViewId, eventName, jsonData){ // getting webviewInterface object by webViewId from static map. var oWebViewInterface = getWebViewIntefaceObjByWebViewId(webViewId); if (oWebViewInterface) { oWebViewInterface._onWebViewEvent(eventName, jsonData); ...
javascript
function(webViewId, eventName, jsonData){ // getting webviewInterface object by webViewId from static map. var oWebViewInterface = getWebViewIntefaceObjByWebViewId(webViewId); if (oWebViewInterface) { oWebViewInterface._onWebViewEvent(eventName, jsonData); ...
[ "function", "(", "webViewId", ",", "eventName", ",", "jsonData", ")", "{", "// getting webviewInterface object by webViewId from static map.", "var", "oWebViewInterface", "=", "getWebViewIntefaceObjByWebViewId", "(", "webViewId", ")", ";", "if", "(", "oWebViewInterface", ")...
On call from webView to android, this function is called from handleEventFromWebView method of WebViewInerface class
[ "On", "call", "from", "webView", "to", "android", "this", "function", "is", "called", "from", "handleEventFromWebView", "method", "of", "WebViewInerface", "class" ]
351a418e6069eefc9c244700dfbaf6428b0bf3e0
https://github.com/shripalsoni04/nativescript-webview-interface/blob/351a418e6069eefc9c244700dfbaf6428b0bf3e0/index.android.js#L14-L20
20,485
phillbaker/digitalocean-node
lib/digitalocean/util.js
function(object) { // if we're not an array or object, return the primative if (object !== Object(object)) { return object; } var decamelizeString = function(string) { var separator = '_'; var split = /(?=[A-Z])/; return string.split(split).join(separator).toLowerCase(); };...
javascript
function(object) { // if we're not an array or object, return the primative if (object !== Object(object)) { return object; } var decamelizeString = function(string) { var separator = '_'; var split = /(?=[A-Z])/; return string.split(split).join(separator).toLowerCase(); };...
[ "function", "(", "object", ")", "{", "// if we're not an array or object, return the primative", "if", "(", "object", "!==", "Object", "(", "object", ")", ")", "{", "return", "object", ";", "}", "var", "decamelizeString", "=", "function", "(", "string", ")", "{"...
Based on Humps by Dom Christie
[ "Based", "on", "Humps", "by", "Dom", "Christie" ]
39fe7a0c5793ba1ee29434fa31627eee8bda3734
https://github.com/phillbaker/digitalocean-node/blob/39fe7a0c5793ba1ee29434fa31627eee8bda3734/lib/digitalocean/util.js#L12-L42
20,486
phillbaker/digitalocean-node
lib/digitalocean/util.js
function(client, initialData, totalLength, requestOptions, successStatuses, successRootKeys, promise) { this.currentPage = 1; // default to start at page 1 // this.perPage = queryParams && queryParams.per_page || 25; // default to 25 per page this.totalLength = totalLength; // bootstrap with initial dat...
javascript
function(client, initialData, totalLength, requestOptions, successStatuses, successRootKeys, promise) { this.currentPage = 1; // default to start at page 1 // this.perPage = queryParams && queryParams.per_page || 25; // default to 25 per page this.totalLength = totalLength; // bootstrap with initial dat...
[ "function", "(", "client", ",", "initialData", ",", "totalLength", ",", "requestOptions", ",", "successStatuses", ",", "successRootKeys", ",", "promise", ")", "{", "this", ".", "currentPage", "=", "1", ";", "// default to start at page 1", "// this.perPage = queryPara...
A class that runs the pagination until the end if necessary. @class ListResponse
[ "A", "class", "that", "runs", "the", "pagination", "until", "the", "end", "if", "necessary", "." ]
39fe7a0c5793ba1ee29434fa31627eee8bda3734
https://github.com/phillbaker/digitalocean-node/blob/39fe7a0c5793ba1ee29434fa31627eee8bda3734/lib/digitalocean/util.js#L82-L94
20,487
phillbaker/digitalocean-node
examples/make_droplet.js
pollUntilDone
function pollUntilDone(id, done) { client.droplets.get(id, function(err, droplet) { if (!err && droplet.locked === false) { // we're done! done.call(); } else if (!err && droplet.locked === true) { // back off 10s more setTimeout(function() { pollUntilDone(id, done); }, (...
javascript
function pollUntilDone(id, done) { client.droplets.get(id, function(err, droplet) { if (!err && droplet.locked === false) { // we're done! done.call(); } else if (!err && droplet.locked === true) { // back off 10s more setTimeout(function() { pollUntilDone(id, done); }, (...
[ "function", "pollUntilDone", "(", "id", ",", "done", ")", "{", "client", ".", "droplets", ".", "get", "(", "id", ",", "function", "(", "err", ",", "droplet", ")", "{", "if", "(", "!", "err", "&&", "droplet", ".", "locked", "===", "false", ")", "{",...
Poll for non-locked state every 10s
[ "Poll", "for", "non", "-", "locked", "state", "every", "10s" ]
39fe7a0c5793ba1ee29434fa31627eee8bda3734
https://github.com/phillbaker/digitalocean-node/blob/39fe7a0c5793ba1ee29434fa31627eee8bda3734/examples/make_droplet.js#L22-L36
20,488
rquadling/grunt-html2js
tasks/html2js.js
generateModule
function generateModule (f) { // f.dest must be a string or write will fail var moduleNames = []; var filePaths = f.src.filter(existsFilter); if (options.watch) { watcher.add(filePaths); } var modules = filePaths.map(function (filepath) { var moduleName = normaliz...
javascript
function generateModule (f) { // f.dest must be a string or write will fail var moduleNames = []; var filePaths = f.src.filter(existsFilter); if (options.watch) { watcher.add(filePaths); } var modules = filePaths.map(function (filepath) { var moduleName = normaliz...
[ "function", "generateModule", "(", "f", ")", "{", "// f.dest must be a string or write will fail", "var", "moduleNames", "=", "[", "]", ";", "var", "filePaths", "=", "f", ".", "src", ".", "filter", "(", "existsFilter", ")", ";", "if", "(", "options", ".", "w...
generate a separate module
[ "generate", "a", "separate", "module" ]
9faf4a2e2a3491edf996f3ffc3b0f4eb153f48b3
https://github.com/rquadling/grunt-html2js/blob/9faf4a2e2a3491edf996f3ffc3b0f4eb153f48b3/tasks/html2js.js#L170-L265
20,489
ezraroi/ngJsTree
demo/bower_components/AngularJS-Toaster/toaster.js
function (scope, elm, attrs) { var id = 0, mergedConfig; mergedConfig = angular.extend({}, toasterConfig, scope.$eval(attrs.toasterOptions)); scope.config = { position: mergedConfig['position-class'], title: mergedConfig['title-class...
javascript
function (scope, elm, attrs) { var id = 0, mergedConfig; mergedConfig = angular.extend({}, toasterConfig, scope.$eval(attrs.toasterOptions)); scope.config = { position: mergedConfig['position-class'], title: mergedConfig['title-class...
[ "function", "(", "scope", ",", "elm", ",", "attrs", ")", "{", "var", "id", "=", "0", ",", "mergedConfig", ";", "mergedConfig", "=", "angular", ".", "extend", "(", "{", "}", ",", "toasterConfig", ",", "scope", ".", "$eval", "(", "attrs", ".", "toaster...
creates an internal scope for this directive
[ "creates", "an", "internal", "scope", "for", "this", "directive" ]
bb323525a885f3a7cf9b231de8138492c0c96dbb
https://github.com/ezraroi/ngJsTree/blob/bb323525a885f3a7cf9b231de8138492c0c96dbb/demo/bower_components/AngularJS-Toaster/toaster.js#L65-L134
20,490
iamisti/mdDataTable
dist/md-data-table.js
_setDefaultTranslations
function _setDefaultTranslations(){ $scope.mdtTranslations = $scope.mdtTranslations || {}; $scope.mdtTranslations.rowsPerPage = $scope.mdtTranslations.rowsPerPage || 'Rows per page:'; $scope.mdtTranslations.largeEditDialog = $scope.mdtTranslations.largeEditD...
javascript
function _setDefaultTranslations(){ $scope.mdtTranslations = $scope.mdtTranslations || {}; $scope.mdtTranslations.rowsPerPage = $scope.mdtTranslations.rowsPerPage || 'Rows per page:'; $scope.mdtTranslations.largeEditDialog = $scope.mdtTranslations.largeEditD...
[ "function", "_setDefaultTranslations", "(", ")", "{", "$scope", ".", "mdtTranslations", "=", "$scope", ".", "mdtTranslations", "||", "{", "}", ";", "$scope", ".", "mdtTranslations", ".", "rowsPerPage", "=", "$scope", ".", "mdtTranslations", ".", "rowsPerPage", "...
set translations or fallback to a default value
[ "set", "translations", "or", "fallback", "to", "a", "default", "value" ]
85f0902f81912208514d5d9b334e90a7cec510fc
https://github.com/iamisti/mdDataTable/blob/85f0902f81912208514d5d9b334e90a7cec510fc/dist/md-data-table.js#L277-L285
20,491
iamisti/mdDataTable
dist/md-data-table.js
_processData
function _processData(){ if(_.isEmpty($scope.mdtRow)) { return; } //local search/filter if (angular.isUndefined($scope.mdtRowPaginator)) { $scope.$watch('mdtRow', function (mdtRow) { ...
javascript
function _processData(){ if(_.isEmpty($scope.mdtRow)) { return; } //local search/filter if (angular.isUndefined($scope.mdtRowPaginator)) { $scope.$watch('mdtRow', function (mdtRow) { ...
[ "function", "_processData", "(", ")", "{", "if", "(", "_", ".", "isEmpty", "(", "$scope", ".", "mdtRow", ")", ")", "{", "return", ";", "}", "//local search/filter", "if", "(", "angular", ".", "isUndefined", "(", "$scope", ".", "mdtRowPaginator", ")", ")"...
fill storage with values if set
[ "fill", "storage", "with", "values", "if", "set" ]
85f0902f81912208514d5d9b334e90a7cec510fc
https://github.com/iamisti/mdDataTable/blob/85f0902f81912208514d5d9b334e90a7cec510fc/dist/md-data-table.js#L288-L303
20,492
iamisti/mdDataTable
demo/developmentArea.js
nutritionNameFilterCallback
function nutritionNameFilterCallback(names){ var arr = _.filter(nutritionList, function(item){ return item.fields.item_name.toLowerCase().indexOf(names.toLowerCase()) !== -1; }); return $q.resolve(arr); }
javascript
function nutritionNameFilterCallback(names){ var arr = _.filter(nutritionList, function(item){ return item.fields.item_name.toLowerCase().indexOf(names.toLowerCase()) !== -1; }); return $q.resolve(arr); }
[ "function", "nutritionNameFilterCallback", "(", "names", ")", "{", "var", "arr", "=", "_", ".", "filter", "(", "nutritionList", ",", "function", "(", "item", ")", "{", "return", "item", ".", "fields", ".", "item_name", ".", "toLowerCase", "(", ")", ".", ...
name column filter functions
[ "name", "column", "filter", "functions" ]
85f0902f81912208514d5d9b334e90a7cec510fc
https://github.com/iamisti/mdDataTable/blob/85f0902f81912208514d5d9b334e90a7cec510fc/demo/developmentArea.js#L28-L34
20,493
iamisti/mdDataTable
demo/developmentArea.js
serviceUnitsFilterCallback
function serviceUnitsFilterCallback(){ var arr = _.filter(nutritionList, function(item){ return item.fields.nf_serving_size_unit && item.fields.nf_serving_size_unit.toLowerCase(); }); arr = _.uniq(arr, function(item){ return item.fields.nf_serving_size_unit;}); ...
javascript
function serviceUnitsFilterCallback(){ var arr = _.filter(nutritionList, function(item){ return item.fields.nf_serving_size_unit && item.fields.nf_serving_size_unit.toLowerCase(); }); arr = _.uniq(arr, function(item){ return item.fields.nf_serving_size_unit;}); ...
[ "function", "serviceUnitsFilterCallback", "(", ")", "{", "var", "arr", "=", "_", ".", "filter", "(", "nutritionList", ",", "function", "(", "item", ")", "{", "return", "item", ".", "fields", ".", "nf_serving_size_unit", "&&", "item", ".", "fields", ".", "n...
service units filter
[ "service", "units", "filter" ]
85f0902f81912208514d5d9b334e90a7cec510fc
https://github.com/iamisti/mdDataTable/blob/85f0902f81912208514d5d9b334e90a7cec510fc/demo/developmentArea.js#L41-L49
20,494
iamisti/mdDataTable
demo/developmentArea.js
fatValuesCallback
function fatValuesCallback(){ return $q.resolve([ { name: '> 50%', comparator: function(val){ return val > 50;} }, { name: '<= 50%', comparator: function(val){ return val <= 50;} }...
javascript
function fatValuesCallback(){ return $q.resolve([ { name: '> 50%', comparator: function(val){ return val > 50;} }, { name: '<= 50%', comparator: function(val){ return val <= 50;} }...
[ "function", "fatValuesCallback", "(", ")", "{", "return", "$q", ".", "resolve", "(", "[", "{", "name", ":", "'> 50%'", ",", "comparator", ":", "function", "(", "val", ")", "{", "return", "val", ">", "50", ";", "}", "}", ",", "{", "name", ":", "'<= ...
fat values filter
[ "fat", "values", "filter" ]
85f0902f81912208514d5d9b334e90a7cec510fc
https://github.com/iamisti/mdDataTable/blob/85f0902f81912208514d5d9b334e90a7cec510fc/demo/developmentArea.js#L56-L65
20,495
iamisti/mdDataTable
demo/developmentArea.js
paginatorCallback
function paginatorCallback(page, pageSize, options){ console.log(options); var filtersApplied = options.columnFilter; var offset = (page-1) * pageSize; var result = nutritionList; if(filtersApplied[0].length) { result = _.filter(nutritionList...
javascript
function paginatorCallback(page, pageSize, options){ console.log(options); var filtersApplied = options.columnFilter; var offset = (page-1) * pageSize; var result = nutritionList; if(filtersApplied[0].length) { result = _.filter(nutritionList...
[ "function", "paginatorCallback", "(", "page", ",", "pageSize", ",", "options", ")", "{", "console", ".", "log", "(", "options", ")", ";", "var", "filtersApplied", "=", "options", ".", "columnFilter", ";", "var", "offset", "=", "(", "page", "-", "1", ")",...
table search endpoint Don't look carefully the implementation details of this method, since it's just emulates an API call which increases the complexity of it. What happens here is just simply playing with the values passed with `filtersApplied` parameter, and trying to filter the array of nutritions.
[ "table", "search", "endpoint", "Don", "t", "look", "carefully", "the", "implementation", "details", "of", "this", "method", "since", "it", "s", "just", "emulates", "an", "API", "call", "which", "increases", "the", "complexity", "of", "it", ".", "What", "happ...
85f0902f81912208514d5d9b334e90a7cec510fc
https://github.com/iamisti/mdDataTable/blob/85f0902f81912208514d5d9b334e90a7cec510fc/demo/developmentArea.js#L74-L137
20,496
wso2/carbon-dashboards
components/dashboards-web-component/src/utils/WidgetClassRegistry.js
extendsFromDeprecatedWidgetClassVersion
function extendsFromDeprecatedWidgetClassVersion(widgetClass) { return Object.getPrototypeOf(widgetClass.prototype).constructor.version !== Widget.version; }
javascript
function extendsFromDeprecatedWidgetClassVersion(widgetClass) { return Object.getPrototypeOf(widgetClass.prototype).constructor.version !== Widget.version; }
[ "function", "extendsFromDeprecatedWidgetClassVersion", "(", "widgetClass", ")", "{", "return", "Object", ".", "getPrototypeOf", "(", "widgetClass", ".", "prototype", ")", ".", "constructor", ".", "version", "!==", "Widget", ".", "version", ";", "}" ]
Following is to maintain backward compatibility with SP-4.0.0, SP-4.1.0 Checks whether given widget class extends from a deprecated version of @wso2-dashboards/widget class. @param {class} widgetClass class to be checked @returns {boolean} true if extend from a deprecated version of the Widget class, otherwise false @...
[ "Following", "is", "to", "maintain", "backward", "compatibility", "with", "SP", "-", "4", ".", "0", ".", "0", "SP", "-", "4", ".", "1", ".", "0", "Checks", "whether", "given", "widget", "class", "extends", "from", "a", "deprecated", "version", "of" ]
9bbfd52d237f38dd3ade3455f78c9859ae506d20
https://github.com/wso2/carbon-dashboards/blob/9bbfd52d237f38dd3ade3455f78c9859ae506d20/components/dashboards-web-component/src/utils/WidgetClassRegistry.js#L78-L80
20,497
wso2/carbon-dashboards
components/dashboards-web-component/src/utils/WidgetClassRegistry.js
patchWidgetClass
function patchWidgetClass(widgetClass) { const superWidgetClassPrototype = Object.getPrototypeOf(widgetClass.prototype); // Patch subscribe method. superWidgetClassPrototype.subscribe = Widget.prototype.subscribe; // Patch publish method. superWidgetClassPrototype.publish = Widget.prototype.publish;...
javascript
function patchWidgetClass(widgetClass) { const superWidgetClassPrototype = Object.getPrototypeOf(widgetClass.prototype); // Patch subscribe method. superWidgetClassPrototype.subscribe = Widget.prototype.subscribe; // Patch publish method. superWidgetClassPrototype.publish = Widget.prototype.publish;...
[ "function", "patchWidgetClass", "(", "widgetClass", ")", "{", "const", "superWidgetClassPrototype", "=", "Object", ".", "getPrototypeOf", "(", "widgetClass", ".", "prototype", ")", ";", "// Patch subscribe method.", "superWidgetClassPrototype", ".", "subscribe", "=", "W...
Patches given widget class which extends from a deprecated version of @wso2-dashboards/widget class, to be compatible with newer versions. @param {class} widgetClass widget class to be patched @private
[ "Patches", "given", "widget", "class", "which", "extends", "from", "a", "deprecated", "version", "of" ]
9bbfd52d237f38dd3ade3455f78c9859ae506d20
https://github.com/wso2/carbon-dashboards/blob/9bbfd52d237f38dd3ade3455f78c9859ae506d20/components/dashboards-web-component/src/utils/WidgetClassRegistry.js#L88-L94
20,498
mapbox/eslint-plugin-react-filenames
lib/rules/filename-matches-component.js
reportNonMatchingComponentName
function reportNonMatchingComponentName(node, rawName, name, filename) { context.report( node, 'Component name ' + rawName + ' (' + name + ') does not match filename ' + filename ); }
javascript
function reportNonMatchingComponentName(node, rawName, name, filename) { context.report( node, 'Component name ' + rawName + ' (' + name + ') does not match filename ' + filename ); }
[ "function", "reportNonMatchingComponentName", "(", "node", ",", "rawName", ",", "name", ",", "filename", ")", "{", "context", ".", "report", "(", "node", ",", "'Component name '", "+", "rawName", "+", "' ('", "+", "name", "+", "') does not match filename '", "+"...
Reports missing display name for a given component @param {Object} component The component to process
[ "Reports", "missing", "display", "name", "for", "a", "given", "component" ]
d25030b865124f2f0555ba17b8f73a99c2111af0
https://github.com/mapbox/eslint-plugin-react-filenames/blob/d25030b865124f2f0555ba17b8f73a99c2111af0/lib/rules/filename-matches-component.js#L69-L74
20,499
mapbox/watchbot-progress
lib/progress.js
client
function client(table) { table = table || process.env.ProgressTable; if (!table) throw new Error('ProgressTable environment variable is not set'); var dyno = module.exports.Dyno({ table: table.split(':')[5].split('/')[1], region: table.split(':')[3], endpoint: process.env.DynamoDbEndpoint }); /*...
javascript
function client(table) { table = table || process.env.ProgressTable; if (!table) throw new Error('ProgressTable environment variable is not set'); var dyno = module.exports.Dyno({ table: table.split(':')[5].split('/')[1], region: table.split(':')[3], endpoint: process.env.DynamoDbEndpoint }); /*...
[ "function", "client", "(", "table", ")", "{", "table", "=", "table", "||", "process", ".", "env", ".", "ProgressTable", ";", "if", "(", "!", "table", ")", "throw", "new", "Error", "(", "'ProgressTable environment variable is not set'", ")", ";", "var", "dyno...
mockable Create a progress-tracking client @param {string} [table] - the ARN for the DynamoDB table used to track progress. If not provided, it will look for `$ProgessTable` environment variable, and fail if neither is provided. @returns {object} a progress client @example var progress = require('watchbot-progress')....
[ "mockable", "Create", "a", "progress", "-", "tracking", "client" ]
34306c917e839b2c32999a39152402524599c5ad
https://github.com/mapbox/watchbot-progress/blob/34306c917e839b2c32999a39152402524599c5ad/lib/progress.js#L14-L117