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
49,300
tolokoban/ToloFrameWork
ker/mod/tfw.web-service.js
callWebService
function callWebService( name, args, url ) { return new Promise( function( resolve, reject ) { svc( name, args, url ).then( resolve, function( err ) { if ( typeof err === 'object' && err.id === exports.BAD_ROLE ) { // Ec...
javascript
function callWebService( name, args, url ) { return new Promise( function( resolve, reject ) { svc( name, args, url ).then( resolve, function( err ) { if ( typeof err === 'object' && err.id === exports.BAD_ROLE ) { // Ec...
[ "function", "callWebService", "(", "name", ",", "args", ",", "url", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "svc", "(", "name", ",", "args", ",", "url", ")", ".", "then", "(", "resolve", ",", ...
Call a webservice.
[ "Call", "a", "webservice", "." ]
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/tfw.web-service.js#L361-L382
49,301
vkiding/jud-vue-render
src/render/vue/components/slider/indicator.js
_reLayout
function _reLayout (context, virtualRect, ltbr) { const el = context.$el const rect = _getIndicatorRect(el) const rectWithPx = Object.keys(rect).reduce((pre, key) => { pre[key] = rect[key] + 'px' return pre }, {}) extend(el.style, rectWithPx) const axisMap = [ { dir: ltbr.left ? 'left' : ltbr.ri...
javascript
function _reLayout (context, virtualRect, ltbr) { const el = context.$el const rect = _getIndicatorRect(el) const rectWithPx = Object.keys(rect).reduce((pre, key) => { pre[key] = rect[key] + 'px' return pre }, {}) extend(el.style, rectWithPx) const axisMap = [ { dir: ltbr.left ? 'left' : ltbr.ri...
[ "function", "_reLayout", "(", "context", ",", "virtualRect", ",", "ltbr", ")", "{", "const", "el", "=", "context", ".", "$el", "const", "rect", "=", "_getIndicatorRect", "(", "el", ")", "const", "rectWithPx", "=", "Object", ".", "keys", "(", "rect", ")",...
calculate and reset indicator's width, height, and ltbr. @param {object} virtualRect. width and height of indicator's virtual rect box. @param {object} ltbr. the user specified left, top, bottom, right pixels (without units).
[ "calculate", "and", "reset", "indicator", "s", "width", "height", "and", "ltbr", "." ]
07d8ab08d0ef86cf2819e5f2bf1f4b06381f4d47
https://github.com/vkiding/jud-vue-render/blob/07d8ab08d0ef86cf2819e5f2bf1f4b06381f4d47/src/render/vue/components/slider/indicator.js#L120-L136
49,302
jmjuanes/objectsort
dist/objectsort.js
ObjectSort
function ObjectSort(array, columns, order) { //Check the columns if(typeof columns === 'undefined') { //Create the columns array var columns = []; //Add the keys for(var key in array[0]){ columns.push(key); } } //Check if columns is not an array else if(Array.isArray(columns) === false) {...
javascript
function ObjectSort(array, columns, order) { //Check the columns if(typeof columns === 'undefined') { //Create the columns array var columns = []; //Add the keys for(var key in array[0]){ columns.push(key); } } //Check if columns is not an array else if(Array.isArray(columns) === false) {...
[ "function", "ObjectSort", "(", "array", ",", "columns", ",", "order", ")", "{", "//Check the columns\r", "if", "(", "typeof", "columns", "===", "'undefined'", ")", "{", "//Create the columns array\r", "var", "columns", "=", "[", "]", ";", "//Add the keys\r", "fo...
Sort main function
[ "Sort", "main", "function" ]
a3d29a83423e56ff8aed5ebc06446fff0596ba46
https://github.com/jmjuanes/objectsort/blob/a3d29a83423e56ff8aed5ebc06446fff0596ba46/dist/objectsort.js#L2-L57
49,303
jmjuanes/objectsort
dist/objectsort.js
Compare
function Compare(left, right, columns, order) { //Compare all for(var i = 0; i < columns.length; i++) { //Check if que difference is numeric var numeric = !isNaN(+left[columns[i]] - +right[columns[i]]); //Get the values var a = (numeric === true) ? +left[columns[i]] : left[columns[i]].toLowerCase()...
javascript
function Compare(left, right, columns, order) { //Compare all for(var i = 0; i < columns.length; i++) { //Check if que difference is numeric var numeric = !isNaN(+left[columns[i]] - +right[columns[i]]); //Get the values var a = (numeric === true) ? +left[columns[i]] : left[columns[i]].toLowerCase()...
[ "function", "Compare", "(", "left", ",", "right", ",", "columns", ",", "order", ")", "{", "//Compare all\r", "for", "(", "var", "i", "=", "0", ";", "i", "<", "columns", ".", "length", ";", "i", "++", ")", "{", "//Check if que difference is numeric\r", "v...
Function for compare two elements
[ "Function", "for", "compare", "two", "elements" ]
a3d29a83423e56ff8aed5ebc06446fff0596ba46
https://github.com/jmjuanes/objectsort/blob/a3d29a83423e56ff8aed5ebc06446fff0596ba46/dist/objectsort.js#L60-L87
49,304
jeremyruppel/hoagie
lib/middleware/completion/index.js
commands
function commands(req, res /*, next */) { req.app.commands.forEach(function(command) { res.writeln(command); }); res.end(); }
javascript
function commands(req, res /*, next */) { req.app.commands.forEach(function(command) { res.writeln(command); }); res.end(); }
[ "function", "commands", "(", "req", ",", "res", "/*, next */", ")", "{", "req", ".", "app", ".", "commands", ".", "forEach", "(", "function", "(", "command", ")", "{", "res", ".", "writeln", "(", "command", ")", ";", "}", ")", ";", "res", ".", "end...
Prints all registered commands.
[ "Prints", "all", "registered", "commands", "." ]
9e05b4c9f0537d681dcb240eab41822f15bef613
https://github.com/jeremyruppel/hoagie/blob/9e05b4c9f0537d681dcb240eab41822f15bef613/lib/middleware/completion/index.js#L50-L55
49,305
jeremyruppel/hoagie
lib/middleware/completion/index.js
install
function install(req, res /*, next */) { res.writeln('Add the following to your profile:'); res.writeln('eval "$(%s --completion)"', req.program); res.end(); }
javascript
function install(req, res /*, next */) { res.writeln('Add the following to your profile:'); res.writeln('eval "$(%s --completion)"', req.program); res.end(); }
[ "function", "install", "(", "req", ",", "res", "/*, next */", ")", "{", "res", ".", "writeln", "(", "'Add the following to your profile:'", ")", ";", "res", ".", "writeln", "(", "'eval \"$(%s --completion)\"'", ",", "req", ".", "program", ")", ";", "res", ".",...
Prints install instructions for the completion script.
[ "Prints", "install", "instructions", "for", "the", "completion", "script", "." ]
9e05b4c9f0537d681dcb240eab41822f15bef613
https://github.com/jeremyruppel/hoagie/blob/9e05b4c9f0537d681dcb240eab41822f15bef613/lib/middleware/completion/index.js#L61-L65
49,306
jeremyruppel/hoagie
lib/middleware/completion/index.js
script
function script(req, res, next) { switch (req.get('SHELL')) { case '/bin/sh': case '/bin/bash': res.render(__dirname + '/init.bash'); break; default: next(new Error('Unsupported shell: ' + req.get('SHELL'))); } }
javascript
function script(req, res, next) { switch (req.get('SHELL')) { case '/bin/sh': case '/bin/bash': res.render(__dirname + '/init.bash'); break; default: next(new Error('Unsupported shell: ' + req.get('SHELL'))); } }
[ "function", "script", "(", "req", ",", "res", ",", "next", ")", "{", "switch", "(", "req", ".", "get", "(", "'SHELL'", ")", ")", "{", "case", "'/bin/sh'", ":", "case", "'/bin/bash'", ":", "res", ".", "render", "(", "__dirname", "+", "'/init.bash'", "...
Prints the completion init script for the user's shell.
[ "Prints", "the", "completion", "init", "script", "for", "the", "user", "s", "shell", "." ]
9e05b4c9f0537d681dcb240eab41822f15bef613
https://github.com/jeremyruppel/hoagie/blob/9e05b4c9f0537d681dcb240eab41822f15bef613/lib/middleware/completion/index.js#L71-L80
49,307
leeola/tork
lib/middleware/history.js
function () { var middlewares = Array.prototype.slice.apply(arguments) , req = middlewares.splice(0, 1) , next = middlewares.pop() // Check other middlewares for client objects. If we find one, merge // it and ours together. for (var i = 0; i < middlewares.length; i++) { v...
javascript
function () { var middlewares = Array.prototype.slice.apply(arguments) , req = middlewares.splice(0, 1) , next = middlewares.pop() // Check other middlewares for client objects. If we find one, merge // it and ours together. for (var i = 0; i < middlewares.length; i++) { v...
[ "function", "(", ")", "{", "var", "middlewares", "=", "Array", ".", "prototype", ".", "slice", ".", "apply", "(", "arguments", ")", ",", "req", "=", "middlewares", ".", "splice", "(", "0", ",", "1", ")", ",", "next", "=", "middlewares", ".", "pop", ...
Our middleware function
[ "Our", "middleware", "function" ]
d29edabb97ac49ac4cdbcce091647d4faa75989c
https://github.com/leeola/tork/blob/d29edabb97ac49ac4cdbcce091647d4faa75989c/lib/middleware/history.js#L41-L60
49,308
dalekjs/dalek-driver-sauce
lib/commands/frame.js
function (selector, hash) { if (selector !== null) { this.actionQueue.push(this.webdriverClient.element.bind(this.webdriverClient, selector)); } this.actionQueue.push(this.webdriverClient.frame.bind(this.webdriverClient)); this.actionQueue.push(this._frameCb.bind(this, selector, hash)); return...
javascript
function (selector, hash) { if (selector !== null) { this.actionQueue.push(this.webdriverClient.element.bind(this.webdriverClient, selector)); } this.actionQueue.push(this.webdriverClient.frame.bind(this.webdriverClient)); this.actionQueue.push(this._frameCb.bind(this, selector, hash)); return...
[ "function", "(", "selector", ",", "hash", ")", "{", "if", "(", "selector", "!==", "null", ")", "{", "this", ".", "actionQueue", ".", "push", "(", "this", ".", "webdriverClient", ".", "element", ".", "bind", "(", "this", ".", "webdriverClient", ",", "se...
Switches to frame context @method toFrame @param {string} selector Selector expression to find the element @param {string} hash Unique hash of that fn call @chainable
[ "Switches", "to", "frame", "context" ]
4b3ef87a0c35a91db8456d074b0d47a3e0df58f7
https://github.com/dalekjs/dalek-driver-sauce/blob/4b3ef87a0c35a91db8456d074b0d47a3e0df58f7/lib/commands/frame.js#L49-L56
49,309
Nazariglez/perenquen
lib/pixi/src/filters/sepia/SepiaFilter.js
SepiaFilter
function SepiaFilter() { core.AbstractFilter.call(this, // vertex shader null, // fragment shader fs.readFileSync(__dirname + '/sepia.frag', 'utf8'), // custom uniforms { sepia: { type: '1f', value: 1 } } ); }
javascript
function SepiaFilter() { core.AbstractFilter.call(this, // vertex shader null, // fragment shader fs.readFileSync(__dirname + '/sepia.frag', 'utf8'), // custom uniforms { sepia: { type: '1f', value: 1 } } ); }
[ "function", "SepiaFilter", "(", ")", "{", "core", ".", "AbstractFilter", ".", "call", "(", "this", ",", "// vertex shader", "null", ",", "// fragment shader", "fs", ".", "readFileSync", "(", "__dirname", "+", "'/sepia.frag'", ",", "'utf8'", ")", ",", "// custo...
This applies a sepia effect to your Display Objects. @class @extends AbstractFilter @memberof PIXI.filters
[ "This", "applies", "a", "sepia", "effect", "to", "your", "Display", "Objects", "." ]
e023964d05afeefebdcac4e2044819fdfa3899ae
https://github.com/Nazariglez/perenquen/blob/e023964d05afeefebdcac4e2044819fdfa3899ae/lib/pixi/src/filters/sepia/SepiaFilter.js#L12-L24
49,310
b-heilman/bmoor
src/array.js
remove
function remove( arr, searchElement, fromIndex ){ var pos = arr.indexOf( searchElement, fromIndex ); if ( pos > -1 ){ return arr.splice( pos, 1 )[0]; } }
javascript
function remove( arr, searchElement, fromIndex ){ var pos = arr.indexOf( searchElement, fromIndex ); if ( pos > -1 ){ return arr.splice( pos, 1 )[0]; } }
[ "function", "remove", "(", "arr", ",", "searchElement", ",", "fromIndex", ")", "{", "var", "pos", "=", "arr", ".", "indexOf", "(", "searchElement", ",", "fromIndex", ")", ";", "if", "(", "pos", ">", "-", "1", ")", "{", "return", "arr", ".", "splice",...
Search an array for an element and remove it, starting at the begining or a specified location @function remove @param {array} arr An array to be searched @param {*} searchElement Content for which to be searched @param {integer} fromIndex The begining index from which to begin the search, defaults to 0 @return {array...
[ "Search", "an", "array", "for", "an", "element", "and", "remove", "it", "starting", "at", "the", "begining", "or", "a", "specified", "location" ]
b21a315b477093c14e5f32d857b4644a5a0a36fd
https://github.com/b-heilman/bmoor/blob/b21a315b477093c14e5f32d857b4644a5a0a36fd/src/array.js#L17-L23
49,311
b-heilman/bmoor
src/array.js
removeAll
function removeAll( arr, searchElement, fromIndex ){ var r, pos = arr.indexOf( searchElement, fromIndex ); if ( pos > -1 ){ r = removeAll( arr, searchElement, pos+1 ); r.unshift( arr.splice(pos,1)[0] ); return r; } else { return []; } }
javascript
function removeAll( arr, searchElement, fromIndex ){ var r, pos = arr.indexOf( searchElement, fromIndex ); if ( pos > -1 ){ r = removeAll( arr, searchElement, pos+1 ); r.unshift( arr.splice(pos,1)[0] ); return r; } else { return []; } }
[ "function", "removeAll", "(", "arr", ",", "searchElement", ",", "fromIndex", ")", "{", "var", "r", ",", "pos", "=", "arr", ".", "indexOf", "(", "searchElement", ",", "fromIndex", ")", ";", "if", "(", "pos", ">", "-", "1", ")", "{", "r", "=", "remov...
Search an array for an element and remove all instances of it, starting at the begining or a specified location @function remove @param {array} arr An array to be searched @param {*} searchElement Content for which to be searched @param {integer} fromIndex The begining index from which to begin the search, defaults to...
[ "Search", "an", "array", "for", "an", "element", "and", "remove", "all", "instances", "of", "it", "starting", "at", "the", "begining", "or", "a", "specified", "location" ]
b21a315b477093c14e5f32d857b4644a5a0a36fd
https://github.com/b-heilman/bmoor/blob/b21a315b477093c14e5f32d857b4644a5a0a36fd/src/array.js#L34-L46
49,312
b-heilman/bmoor
src/array.js
compare
function compare( arr1, arr2, func ){ var cmp, left = [], right = [], leftI = [], rightI = []; arr1 = arr1.slice(0); arr2 = arr2.slice(0); arr1.sort( func ); arr2.sort( func ); while( arr1.length > 0 && arr2.length > 0 ){ cmp = func( arr1[0], arr2[0] ); if ( cmp < 0 ){ left.push( arr1.shift() )...
javascript
function compare( arr1, arr2, func ){ var cmp, left = [], right = [], leftI = [], rightI = []; arr1 = arr1.slice(0); arr2 = arr2.slice(0); arr1.sort( func ); arr2.sort( func ); while( arr1.length > 0 && arr2.length > 0 ){ cmp = func( arr1[0], arr2[0] ); if ( cmp < 0 ){ left.push( arr1.shift() )...
[ "function", "compare", "(", "arr1", ",", "arr2", ",", "func", ")", "{", "var", "cmp", ",", "left", "=", "[", "]", ",", "right", "=", "[", "]", ",", "leftI", "=", "[", "]", ",", "rightI", "=", "[", "]", ";", "arr1", "=", "arr1", ".", "slice", ...
Compare two arrays. @function remove @param {array} arr1 An array to be compared @param {array} arr2 An array to be compared @param {function} func The comparison function @return {object} an object containing the elements unique to the left, matched, and unqiue to the right
[ "Compare", "two", "arrays", "." ]
b21a315b477093c14e5f32d857b4644a5a0a36fd
https://github.com/b-heilman/bmoor/blob/b21a315b477093c14e5f32d857b4644a5a0a36fd/src/array.js#L118-L160
49,313
b-heilman/bmoor
src/array.js
unique
function unique( arr, sort, uniqueFn ){ var rtn = []; if ( arr.length ){ if ( sort ){ // more efficient because I can presort if ( bmoor.isFunction(sort) ){ arr = arr.slice(0).sort(sort); } let last; for( let i = 0, c = arr.length; i < c; i++ ){ let d = arr[i], v = uniqueFn ? uniqu...
javascript
function unique( arr, sort, uniqueFn ){ var rtn = []; if ( arr.length ){ if ( sort ){ // more efficient because I can presort if ( bmoor.isFunction(sort) ){ arr = arr.slice(0).sort(sort); } let last; for( let i = 0, c = arr.length; i < c; i++ ){ let d = arr[i], v = uniqueFn ? uniqu...
[ "function", "unique", "(", "arr", ",", "sort", ",", "uniqueFn", ")", "{", "var", "rtn", "=", "[", "]", ";", "if", "(", "arr", ".", "length", ")", "{", "if", "(", "sort", ")", "{", "// more efficient because I can presort", "if", "(", "bmoor", ".", "i...
Create a new array that is completely unique @function unique @param {array} arr The array to be made unique @param {function|boolean} sort If boolean === true, array is presorted. If function, use to sort
[ "Create", "a", "new", "array", "that", "is", "completely", "unique" ]
b21a315b477093c14e5f32d857b4644a5a0a36fd
https://github.com/b-heilman/bmoor/blob/b21a315b477093c14e5f32d857b4644a5a0a36fd/src/array.js#L169-L215
49,314
b-heilman/bmoor
src/array.js
intersection
function intersection( arr1, arr2 ){ var rtn = []; if ( arr1.length > arr2.length ){ let t = arr1; arr1 = arr2; arr2 = t; } for( let i = 0, c = arr1.length; i < c; i++ ){ let d = arr1[i]; if ( arr2.indexOf(d) !== -1 ){ rtn.push( d ); } } return rtn; }
javascript
function intersection( arr1, arr2 ){ var rtn = []; if ( arr1.length > arr2.length ){ let t = arr1; arr1 = arr2; arr2 = t; } for( let i = 0, c = arr1.length; i < c; i++ ){ let d = arr1[i]; if ( arr2.indexOf(d) !== -1 ){ rtn.push( d ); } } return rtn; }
[ "function", "intersection", "(", "arr1", ",", "arr2", ")", "{", "var", "rtn", "=", "[", "]", ";", "if", "(", "arr1", ".", "length", ">", "arr2", ".", "length", ")", "{", "let", "t", "=", "arr1", ";", "arr1", "=", "arr2", ";", "arr2", "=", "t", ...
I could probably make this sexier, like allow uniqueness algorithm, but I'm keeping it simple for now
[ "I", "could", "probably", "make", "this", "sexier", "like", "allow", "uniqueness", "algorithm", "but", "I", "m", "keeping", "it", "simple", "for", "now" ]
b21a315b477093c14e5f32d857b4644a5a0a36fd
https://github.com/b-heilman/bmoor/blob/b21a315b477093c14e5f32d857b4644a5a0a36fd/src/array.js#L218-L237
49,315
vibe-project/vibe-protocol
lib/socket.js
open
function open() { // If there is no remaining URI, fires `error` and `close` event as // it means that all connection failed. if (uris.length === 0) { self.emit("error", new Error()); self.emit("close"); return; } ...
javascript
function open() { // If there is no remaining URI, fires `error` and `close` event as // it means that all connection failed. if (uris.length === 0) { self.emit("error", new Error()); self.emit("close"); return; } ...
[ "function", "open", "(", ")", "{", "// If there is no remaining URI, fires `error` and `close` event as", "// it means that all connection failed.", "if", "(", "uris", ".", "length", "===", "0", ")", "{", "self", ".", "emit", "(", "\"error\"", ",", "new", "Error", "("...
Tries connection with next URI.
[ "Tries", "connection", "with", "next", "URI", "." ]
4a350acade3760ea13e75d7b9ce0815cf8b1d688
https://github.com/vibe-project/vibe-protocol/blob/4a350acade3760ea13e75d7b9ce0815cf8b1d688/lib/socket.js#L65-L117
49,316
vibe-project/vibe-protocol
lib/socket.js
init
function init(trans) { // Assign `trans` to `transport` which is associated with the // socket. transport = trans; // When the transport has received a message from the server. transport.on("text", function(text) { // Converts JSON text to an e...
javascript
function init(trans) { // Assign `trans` to `transport` which is associated with the // socket. transport = trans; // When the transport has received a message from the server. transport.on("text", function(text) { // Converts JSON text to an e...
[ "function", "init", "(", "trans", ")", "{", "// Assign `trans` to `transport` which is associated with the", "// socket.", "transport", "=", "trans", ";", "// When the transport has received a message from the server.", "transport", ".", "on", "(", "\"text\"", ",", "function", ...
Now that working transport is determined, associates it with the socket.
[ "Now", "that", "working", "transport", "is", "determined", "associates", "it", "with", "the", "socket", "." ]
4a350acade3760ea13e75d7b9ce0815cf8b1d688
https://github.com/vibe-project/vibe-protocol/blob/4a350acade3760ea13e75d7b9ce0815cf8b1d688/lib/socket.js#L132-L176
49,317
antoniobrandao/mongoose3-bsonfix-bson
lib/bson/db_ref.js
DBRef
function DBRef(namespace, oid, db) { if(!(this instanceof DBRef)) return new DBRef(namespace, oid, db); this._bsontype = 'DBRef'; this.namespace = namespace; this.oid = oid; this.db = db; }
javascript
function DBRef(namespace, oid, db) { if(!(this instanceof DBRef)) return new DBRef(namespace, oid, db); this._bsontype = 'DBRef'; this.namespace = namespace; this.oid = oid; this.db = db; }
[ "function", "DBRef", "(", "namespace", ",", "oid", ",", "db", ")", "{", "if", "(", "!", "(", "this", "instanceof", "DBRef", ")", ")", "return", "new", "DBRef", "(", "namespace", ",", "oid", ",", "db", ")", ";", "this", ".", "_bsontype", "=", "'DBRe...
A class representation of the BSON DBRef type. @class @param {string} namespace the collection name. @param {ObjectID} oid the reference ObjectID. @param {string} [db] optional db name, if omitted the reference is local to the current db. @return {DBRef}
[ "A", "class", "representation", "of", "the", "BSON", "DBRef", "type", "." ]
b0eae261710704de70f6f282669cf020dbd6a490
https://github.com/antoniobrandao/mongoose3-bsonfix-bson/blob/b0eae261710704de70f6f282669cf020dbd6a490/lib/bson/db_ref.js#L10-L17
49,318
dalekjs/dalek-driver-sauce
lib/browser.js
function (configuration, events, config) { var deferred = Q.defer(); // override desired capabilities, status & browser longname this.desiredCapabilities = this._generateDesiredCaps(configuration.name, config); this.driverDefaults.status = this._generateStatusInfo(this.desiredCapabilities); this.lo...
javascript
function (configuration, events, config) { var deferred = Q.defer(); // override desired capabilities, status & browser longname this.desiredCapabilities = this._generateDesiredCaps(configuration.name, config); this.driverDefaults.status = this._generateStatusInfo(this.desiredCapabilities); this.lo...
[ "function", "(", "configuration", ",", "events", ",", "config", ")", "{", "var", "deferred", "=", "Q", ".", "defer", "(", ")", ";", "// override desired capabilities, status & browser longname", "this", ".", "desiredCapabilities", "=", "this", ".", "_generateDesired...
Stores & validates the incoming browser config @method launch @param {object} configuration Browser configuration @param {EventEmitter2} events EventEmitter (Reporter Emitter instance) @param {Dalek.Internal.Config} config Dalek configuration class @return {object} Browser promise
[ "Stores", "&", "validates", "the", "incoming", "browser", "config" ]
4b3ef87a0c35a91db8456d074b0d47a3e0df58f7
https://github.com/dalekjs/dalek-driver-sauce/blob/4b3ef87a0c35a91db8456d074b0d47a3e0df58f7/lib/browser.js#L182-L198
49,319
dalekjs/dalek-driver-sauce
lib/browser.js
function (browserName, config) { var browsers = config.get('browsers'); // check if we couldnt find a configured alias, // set to defaults otherwise if (!browsers) { return {actAs: this.desiredCapabilities.browserName, version: this.desiredCapabilities['browser-version']}; } var browser =...
javascript
function (browserName, config) { var browsers = config.get('browsers'); // check if we couldnt find a configured alias, // set to defaults otherwise if (!browsers) { return {actAs: this.desiredCapabilities.browserName, version: this.desiredCapabilities['browser-version']}; } var browser =...
[ "function", "(", "browserName", ",", "config", ")", "{", "var", "browsers", "=", "config", ".", "get", "(", "'browsers'", ")", ";", "// check if we couldnt find a configured alias,", "// set to defaults otherwise", "if", "(", "!", "browsers", ")", "{", "return", "...
Verifies the browser config @method _verfiyBrowserConfig @param {string} browserName Name of the browser to verify @param {object} config Daleks internal config helper @return {object} Browser config @private
[ "Verifies", "the", "browser", "config" ]
4b3ef87a0c35a91db8456d074b0d47a3e0df58f7
https://github.com/dalekjs/dalek-driver-sauce/blob/4b3ef87a0c35a91db8456d074b0d47a3e0df58f7/lib/browser.js#L263-L285
49,320
dalekjs/dalek-driver-sauce
lib/browser.js
function (browser) { var isValid = this.platforms.reduce(function (previousValue, platform) { if (previousValue === browser.platform || platform === browser.platform) { return browser.platform; } }); return isValid || this.desiredCapabilities.platform; }
javascript
function (browser) { var isValid = this.platforms.reduce(function (previousValue, platform) { if (previousValue === browser.platform || platform === browser.platform) { return browser.platform; } }); return isValid || this.desiredCapabilities.platform; }
[ "function", "(", "browser", ")", "{", "var", "isValid", "=", "this", ".", "platforms", ".", "reduce", "(", "function", "(", "previousValue", ",", "platform", ")", "{", "if", "(", "previousValue", "===", "browser", ".", "platform", "||", "platform", "===", ...
Verfies the OS platform config @method _verfiyPlatformConfig @param {object} browser Browser information @return {string} Platform @private
[ "Verfies", "the", "OS", "platform", "config" ]
4b3ef87a0c35a91db8456d074b0d47a3e0df58f7
https://github.com/dalekjs/dalek-driver-sauce/blob/4b3ef87a0c35a91db8456d074b0d47a3e0df58f7/lib/browser.js#L296-L304
49,321
dalekjs/dalek-driver-sauce
lib/browser.js
function (browserName, config) { var browser = this._verfiyBrowserConfig(browserName, config); var platform = this._verfiyPlatformConfig(browser); var driverConfig = config.get('driver.sauce'); var desiredCaps = { browserName: browser.actAs, platform: platform, 'screen-resolution': (br...
javascript
function (browserName, config) { var browser = this._verfiyBrowserConfig(browserName, config); var platform = this._verfiyPlatformConfig(browser); var driverConfig = config.get('driver.sauce'); var desiredCaps = { browserName: browser.actAs, platform: platform, 'screen-resolution': (br...
[ "function", "(", "browserName", ",", "config", ")", "{", "var", "browser", "=", "this", ".", "_verfiyBrowserConfig", "(", "browserName", ",", "config", ")", ";", "var", "platform", "=", "this", ".", "_verfiyPlatformConfig", "(", "browser", ")", ";", "var", ...
Generates the desired capabilities for this session @method _generateDesiredCaps @param {string} browserName The browser name @param {object} config Daleks internal config helper @return {object} The sessions desired capabilities @private
[ "Generates", "the", "desired", "capabilities", "for", "this", "session" ]
4b3ef87a0c35a91db8456d074b0d47a3e0df58f7
https://github.com/dalekjs/dalek-driver-sauce/blob/4b3ef87a0c35a91db8456d074b0d47a3e0df58f7/lib/browser.js#L316-L339
49,322
dalekjs/dalek-driver-sauce
lib/browser.js
function (browserName, config) { var longName = null; if(this.browsers.hasOwnProperty(browserName)){ longName = this.browsers[browserName].longName; } if(config.get('browsers')[0].hasOwnProperty(browserName)){ longName = config.get('browsers')[0][browserName].longName; } return longN...
javascript
function (browserName, config) { var longName = null; if(this.browsers.hasOwnProperty(browserName)){ longName = this.browsers[browserName].longName; } if(config.get('browsers')[0].hasOwnProperty(browserName)){ longName = config.get('browsers')[0][browserName].longName; } return longN...
[ "function", "(", "browserName", ",", "config", ")", "{", "var", "longName", "=", "null", ";", "if", "(", "this", ".", "browsers", ".", "hasOwnProperty", "(", "browserName", ")", ")", "{", "longName", "=", "this", ".", "browsers", "[", "browserName", "]",...
Generates the verbose name of the current remote browser in use @method _generateLongName @param {object} desiredCaps The sessions desired capabilities @return {string} Verbose browser name @private
[ "Generates", "the", "verbose", "name", "of", "the", "current", "remote", "browser", "in", "use" ]
4b3ef87a0c35a91db8456d074b0d47a3e0df58f7
https://github.com/dalekjs/dalek-driver-sauce/blob/4b3ef87a0c35a91db8456d074b0d47a3e0df58f7/lib/browser.js#L363-L372
49,323
tolokoban/ToloFrameWork
ker/mod/wdg.wysiwyg.js
onMenu
function onMenu( item ) { var squire = this.squire; var id = item.id; switch ( id ) { case 'undo': squire.undo(); break; case 'redo': squire.redo(); break; case 'eraser': squire.removeAllFormatting(); break; case 'link': makeLink.call(...
javascript
function onMenu( item ) { var squire = this.squire; var id = item.id; switch ( id ) { case 'undo': squire.undo(); break; case 'redo': squire.redo(); break; case 'eraser': squire.removeAllFormatting(); break; case 'link': makeLink.call(...
[ "function", "onMenu", "(", "item", ")", "{", "var", "squire", "=", "this", ".", "squire", ";", "var", "id", "=", "item", ".", "id", ";", "switch", "(", "id", ")", "{", "case", "'undo'", ":", "squire", ".", "undo", "(", ")", ";", "break", ";", "...
`this` is the squire object.
[ "this", "is", "the", "squire", "object", "." ]
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/wdg.wysiwyg.js#L373-L448
49,324
weekeight/gulp-joycss
joycss/lib/csslib/cssReader.js
ruleEnd
function ruleEnd(e){ var selectors ; if (e.old === 'ruleStart'){ selectors = this.get('selectors'); //delete the last selector selectors.pop(); var lines = this.get('lines'); lines.pop(); this.attributes.nest.pop(); return; } else if (e.old === 'valueStart') { ...
javascript
function ruleEnd(e){ var selectors ; if (e.old === 'ruleStart'){ selectors = this.get('selectors'); //delete the last selector selectors.pop(); var lines = this.get('lines'); lines.pop(); this.attributes.nest.pop(); return; } else if (e.old === 'valueStart') { ...
[ "function", "ruleEnd", "(", "e", ")", "{", "var", "selectors", ";", "if", "(", "e", ".", "old", "===", "'ruleStart'", ")", "{", "selectors", "=", "this", ".", "get", "(", "'selectors'", ")", ";", "//delete the last selector", "selectors", ".", "pop", "("...
1. fix the problem when have some empty rule such as @example .foo {} remove the selector in the collections of selector 2. fix when the last value don't end with the semicolon @example .foo { color: red }
[ "1", ".", "fix", "the", "problem", "when", "have", "some", "empty", "rule", "such", "as" ]
5dc7a1276bcca878c2ac513efe6442fc47a36e29
https://github.com/weekeight/gulp-joycss/blob/5dc7a1276bcca878c2ac513efe6442fc47a36e29/joycss/lib/csslib/cssReader.js#L170-L199
49,325
weekeight/gulp-joycss
joycss/lib/csslib/cssReader.js
addValue
function addValue(e){ var len; if (e.old === 'valueStart') { var history = this.get('history'); len = history.length; var preStatus = history[len - 3]; isNew = preStatus == 'ruleStart'; value = this._getLast(isNew, 'values'); value && value.push(e.data); } else { ...
javascript
function addValue(e){ var len; if (e.old === 'valueStart') { var history = this.get('history'); len = history.length; var preStatus = history[len - 3]; isNew = preStatus == 'ruleStart'; value = this._getLast(isNew, 'values'); value && value.push(e.data); } else { ...
[ "function", "addValue", "(", "e", ")", "{", "var", "len", ";", "if", "(", "e", ".", "old", "===", "'valueStart'", ")", "{", "var", "history", "=", "this", ".", "get", "(", "'history'", ")", ";", "len", "=", "history", ".", "length", ";", "var", "...
add value and when meet with single rule, such as '@charset "UTF-8";', push the is to the object of metas
[ "add", "value", "and", "when", "meet", "with", "single", "rule", "such", "as" ]
5dc7a1276bcca878c2ac513efe6442fc47a36e29
https://github.com/weekeight/gulp-joycss/blob/5dc7a1276bcca878c2ac513efe6442fc47a36e29/joycss/lib/csslib/cssReader.js#L234-L263
49,326
weekeight/gulp-joycss
joycss/lib/csslib/cssReader.js
getLast
function getLast(isNew, opt_key){ opt_key = opt_key || 'selectors'; var items = this.get(opt_key); var len = items.length; if (isNew){ len++; items.push([]); var nest = this.get('nest'); var nLen = nest.length; if (nLen > 1){ //console.log([nest, nest[nLen - 2], l...
javascript
function getLast(isNew, opt_key){ opt_key = opt_key || 'selectors'; var items = this.get(opt_key); var len = items.length; if (isNew){ len++; items.push([]); var nest = this.get('nest'); var nLen = nest.length; if (nLen > 1){ //console.log([nest, nest[nLen - 2], l...
[ "function", "getLast", "(", "isNew", ",", "opt_key", ")", "{", "opt_key", "=", "opt_key", "||", "'selectors'", ";", "var", "items", "=", "this", ".", "get", "(", "opt_key", ")", ";", "var", "len", "=", "items", ".", "length", ";", "if", "(", "isNew",...
get last item of selectors or properties or values @param isNew {bool} if isNew, push it an new empty array, if isNew is null, isNew equal to false @param opt_key {string} selectors | properties | values by default opt_key is selectors
[ "get", "last", "item", "of", "selectors", "or", "properties", "or", "values" ]
5dc7a1276bcca878c2ac513efe6442fc47a36e29
https://github.com/weekeight/gulp-joycss/blob/5dc7a1276bcca878c2ac513efe6442fc47a36e29/joycss/lib/csslib/cssReader.js#L296-L315
49,327
weekeight/gulp-joycss
joycss/lib/csslib/cssReader.js
read
function read(data){ var dismember = this.get('DISMEMBER'); var i = 0, j = 0; var comment = false; var len = data.length; var code = data[0]; var line = 1; var val; var slice = data.asciiSlice ? 'asciiSlice' : 'slice'; //console.log("one\n"); while(code){ if (typeof code...
javascript
function read(data){ var dismember = this.get('DISMEMBER'); var i = 0, j = 0; var comment = false; var len = data.length; var code = data[0]; var line = 1; var val; var slice = data.asciiSlice ? 'asciiSlice' : 'slice'; //console.log("one\n"); while(code){ if (typeof code...
[ "function", "read", "(", "data", ")", "{", "var", "dismember", "=", "this", ".", "get", "(", "'DISMEMBER'", ")", ";", "var", "i", "=", "0", ",", "j", "=", "0", ";", "var", "comment", "=", "false", ";", "var", "len", "=", "data", ".", "length", ...
read data steam, loop exam the assic code one by one. filter the comment and when meet with code in dismember, fire some event, then change the property of status, push event into the array of history, and deliver a string of selector or property or value.
[ "read", "data", "steam", "loop", "exam", "the", "assic", "code", "one", "by", "one", ".", "filter", "the", "comment", "and", "when", "meet", "with", "code", "in", "dismember", "fire", "some", "event", "then", "change", "the", "property", "of", "status", ...
5dc7a1276bcca878c2ac513efe6442fc47a36e29
https://github.com/weekeight/gulp-joycss/blob/5dc7a1276bcca878c2ac513efe6442fc47a36e29/joycss/lib/csslib/cssReader.js#L339-L395
49,328
arufian/better-say
app.js
function(sentences, options) { var voice = options.voice, callback = options.callback, iswrite = options.writetext; for (var i=0; i<sentences.length; i++) { speechList.push(sentences[i]); }; try{ tts(voice, iswrite, callback); return true; } catch(e) { throw new Error('...
javascript
function(sentences, options) { var voice = options.voice, callback = options.callback, iswrite = options.writetext; for (var i=0; i<sentences.length; i++) { speechList.push(sentences[i]); }; try{ tts(voice, iswrite, callback); return true; } catch(e) { throw new Error('...
[ "function", "(", "sentences", ",", "options", ")", "{", "var", "voice", "=", "options", ".", "voice", ",", "callback", "=", "options", ".", "callback", ",", "iswrite", "=", "options", ".", "writetext", ";", "for", "(", "var", "i", "=", "0", ";", "i",...
Make your computer speak better with multiple sentences @param {Array} | {String} Array list of sentences or filepath @param {Object<voice, writetext, callback>} options
[ "Make", "your", "computer", "speak", "better", "with", "multiple", "sentences" ]
52a53c0e96329109286bc64683ef65fdc06e1fda
https://github.com/arufian/better-say/blob/52a53c0e96329109286bc64683ef65fdc06e1fda/app.js#L69-L81
49,329
assertjs/assert.js
dist/assert.esm.js
AssertionException
function AssertionException(type, message, id) { var _this = _super.call(this, message) || this; _this.type = type; _this.id = id; if (Error.captureStackTrace) { Error.captureStackTrace(_this, _this.constructor); } return _this; }
javascript
function AssertionException(type, message, id) { var _this = _super.call(this, message) || this; _this.type = type; _this.id = id; if (Error.captureStackTrace) { Error.captureStackTrace(_this, _this.constructor); } return _this; }
[ "function", "AssertionException", "(", "type", ",", "message", ",", "id", ")", "{", "var", "_this", "=", "_super", ".", "call", "(", "this", ",", "message", ")", "||", "this", ";", "_this", ".", "type", "=", "type", ";", "_this", ".", "id", "=", "i...
Create AssertionException based on type, message and id @param {assertionTypes} type - Assertion type @param {string} message - Custom error message @param {string} id - Exception id
[ "Create", "AssertionException", "based", "on", "type", "message", "and", "id" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L115-L123
49,330
assertjs/assert.js
dist/assert.esm.js
fail
function fail(message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled) { throw new AssertionException(assertionTypes.FAIL, message, id); } }
javascript
function fail(message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled) { throw new AssertionException(assertionTypes.FAIL, message, id); } }
[ "function", "fail", "(", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(", "this", ".", "...
Always throw AssertError @param message @param id @returns {void}
[ "Always", "throw", "AssertError" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L147-L153
49,331
assertjs/assert.js
dist/assert.esm.js
isTruthy
function isTruthy(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !value) { throw LogicException.throw(assertionTypes.IS_TRUTHY, value, message, id); } }
javascript
function isTruthy(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !value) { throw LogicException.throw(assertionTypes.IS_TRUTHY, value, message, id); } }
[ "function", "isTruthy", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "("...
Assert if given value is truthy @param value @param {string} message @param {string} id @returns {void}
[ "Assert", "if", "given", "value", "is", "truthy" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L259-L265
49,332
assertjs/assert.js
dist/assert.esm.js
isFalsy
function isFalsy(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value) { throw LogicException.throw(assertionTypes.IS_FALSY, value, message, id); } }
javascript
function isFalsy(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value) { throw LogicException.throw(assertionTypes.IS_FALSY, value, message, id); } }
[ "function", "isFalsy", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(",...
Assert if given value is falsy @param value @param {string} message @param {string} id @returns {void}
[ "Assert", "if", "given", "value", "is", "falsy" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L274-L280
49,333
assertjs/assert.js
dist/assert.esm.js
isEmpty
function isEmpty(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && ((typeof value === 'string' && value.length === 0) || (typeof value === 'number' && value === 0))) { throw LogicException.throw(assertionType...
javascript
function isEmpty(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && ((typeof value === 'string' && value.length === 0) || (typeof value === 'number' && value === 0))) { throw LogicException.throw(assertionType...
[ "function", "isEmpty", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(",...
Assert if given value is empty @param value @param {string} message @param {string} id @returns {void}
[ "Assert", "if", "given", "value", "is", "empty" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L289-L297
49,334
assertjs/assert.js
dist/assert.esm.js
isNotEmpty
function isNotEmpty(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && ((typeof value === 'string' && value.length !== 0) || (typeof value === 'number' && value !== 0))) { throw LogicException.throw(assertionT...
javascript
function isNotEmpty(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && ((typeof value === 'string' && value.length !== 0) || (typeof value === 'number' && value !== 0))) { throw LogicException.throw(assertionT...
[ "function", "isNotEmpty", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "...
Assert if given value is not empty @param value @param {string} message @param {string} id @returns {void}
[ "Assert", "if", "given", "value", "is", "not", "empty" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L306-L314
49,335
assertjs/assert.js
dist/assert.esm.js
isUndefined
function isUndefined(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== undefined) { throw TypeException.unexpectedType(assertionTypes.IS_UNDEFINED, value, '<undefined>', message, id); } }
javascript
function isUndefined(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== undefined) { throw TypeException.unexpectedType(assertionTypes.IS_UNDEFINED, value, '<undefined>', message, id); } }
[ "function", "isUndefined", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", ...
Check if provided value is undefined @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "undefined" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L384-L390
49,336
assertjs/assert.js
dist/assert.esm.js
isBool
function isBool(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value !== 'boolean') { throw TypeException.unexpectedType(assertionTypes.IS_BOOL, value, '<boolean>', message, id); } }
javascript
function isBool(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value !== 'boolean') { throw TypeException.unexpectedType(assertionTypes.IS_BOOL, value, '<boolean>', message, id); } }
[ "function", "isBool", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(", ...
Check if provided value is boolean @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "boolean" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L399-L405
49,337
assertjs/assert.js
dist/assert.esm.js
isNotBool
function isNotBool(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value === 'boolean') { throw TypeException.expectedType(assertionTypes.IS_NOT_BOOL, value, '<boolean>', message, id); } }
javascript
function isNotBool(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value === 'boolean') { throw TypeException.expectedType(assertionTypes.IS_NOT_BOOL, value, '<boolean>', message, id); } }
[ "function", "isNotBool", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(...
Check if provided value is not boolean @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "not", "boolean" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L414-L420
49,338
assertjs/assert.js
dist/assert.esm.js
isNumber
function isNumber(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !(typeof value === 'number' || value instanceof Number)) { throw TypeException.unexpectedType(assertionTypes.IS_NUMBER, value, '<number>', message, id); } }
javascript
function isNumber(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !(typeof value === 'number' || value instanceof Number)) { throw TypeException.unexpectedType(assertionTypes.IS_NUMBER, value, '<number>', message, id); } }
[ "function", "isNumber", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "("...
Check if provided value is number @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "number" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L429-L435
49,339
assertjs/assert.js
dist/assert.esm.js
isNotNumber
function isNotNumber(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && (typeof value === 'number' || value instanceof Number)) { throw TypeException.expectedType(assertionTypes.IS_NOT_NUMBER, value, '<number>', message, id); ...
javascript
function isNotNumber(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && (typeof value === 'number' || value instanceof Number)) { throw TypeException.expectedType(assertionTypes.IS_NOT_NUMBER, value, '<number>', message, id); ...
[ "function", "isNotNumber", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", ...
Check if provided value is not number @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "not", "number" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L444-L450
49,340
assertjs/assert.js
dist/assert.esm.js
isNaN
function isNaN(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !Number.isNaN(value)) { throw TypeException.unexpectedType(assertionTypes.IS_NAN, value, '<NaN>', message, id); } }
javascript
function isNaN(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !Number.isNaN(value)) { throw TypeException.unexpectedType(assertionTypes.IS_NAN, value, '<NaN>', message, id); } }
[ "function", "isNaN", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(", ...
Check if provided value is Not a Number @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "Not", "a", "Number" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L489-L495
49,341
assertjs/assert.js
dist/assert.esm.js
isNotNaN
function isNotNaN(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && Number.isNaN(value)) { throw TypeException.expectedType(assertionTypes.IS_NOT_NAN, value, '<NaN>', message, id); } }
javascript
function isNotNaN(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && Number.isNaN(value)) { throw TypeException.expectedType(assertionTypes.IS_NOT_NAN, value, '<NaN>', message, id); } }
[ "function", "isNotNaN", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "("...
Check if provided value is other than Not a Number @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "other", "than", "Not", "a", "Number" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L504-L510
49,342
assertjs/assert.js
dist/assert.esm.js
isString
function isString(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !(typeof value === 'string' || value instanceof String)) { throw TypeException.unexpectedType(assertionTypes.IS_STRING, value, '<string>', message, id); } }
javascript
function isString(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !(typeof value === 'string' || value instanceof String)) { throw TypeException.unexpectedType(assertionTypes.IS_STRING, value, '<string>', message, id); } }
[ "function", "isString", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "("...
Check if provided value is string @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "string" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L519-L525
49,343
assertjs/assert.js
dist/assert.esm.js
isNotString
function isNotString(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && (typeof value === 'string' || value instanceof String)) { throw TypeException.expectedType(assertionTypes.IS_NOT_STRING, value, '<string>', message, id); ...
javascript
function isNotString(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && (typeof value === 'string' || value instanceof String)) { throw TypeException.expectedType(assertionTypes.IS_NOT_STRING, value, '<string>', message, id); ...
[ "function", "isNotString", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", ...
Check if provided value is not string @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "not", "string" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L534-L540
49,344
assertjs/assert.js
dist/assert.esm.js
isArray
function isArray(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !Array.isArray(value)) { throw TypeException.unexpectedType(assertionTypes.IS_ARRAY, value, '<array>', message, id); } }
javascript
function isArray(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !Array.isArray(value)) { throw TypeException.unexpectedType(assertionTypes.IS_ARRAY, value, '<array>', message, id); } }
[ "function", "isArray", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(",...
Check if provided value is an array @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "an", "array" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L549-L555
49,345
assertjs/assert.js
dist/assert.esm.js
isNotArray
function isNotArray(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && Array.isArray(value)) { throw TypeException.expectedType(assertionTypes.IS_NOT_ARRAY, value, '<array>', message, id); } }
javascript
function isNotArray(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && Array.isArray(value)) { throw TypeException.expectedType(assertionTypes.IS_NOT_ARRAY, value, '<array>', message, id); } }
[ "function", "isNotArray", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "...
Check if provided value is not an array @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "not", "an", "array" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L564-L570
49,346
assertjs/assert.js
dist/assert.esm.js
isFunction
function isFunction(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value !== 'function') { throw TypeException.expectedType(assertionTypes.IS_FUNCTION, value, '<function>', message, id); } }
javascript
function isFunction(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value !== 'function') { throw TypeException.expectedType(assertionTypes.IS_FUNCTION, value, '<function>', message, id); } }
[ "function", "isFunction", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "...
Check if provided value is function @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "function" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L579-L585
49,347
assertjs/assert.js
dist/assert.esm.js
isNotFunction
function isNotFunction(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value === 'function') { throw TypeException.unexpectedType(assertionTypes.IS_NOT_FUNCTION, value, '<function>', message, id); } }
javascript
function isNotFunction(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value === 'function') { throw TypeException.unexpectedType(assertionTypes.IS_NOT_FUNCTION, value, '<function>', message, id); } }
[ "function", "isNotFunction", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", ...
Check if provided value is not function @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "not", "function" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L594-L600
49,348
assertjs/assert.js
dist/assert.esm.js
isSymbol
function isSymbol(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value !== 'symbol') { throw TypeException.unexpectedType(assertionTypes.IS_SYMBOL, value, '<symbol>', message, id); } }
javascript
function isSymbol(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value !== 'symbol') { throw TypeException.unexpectedType(assertionTypes.IS_SYMBOL, value, '<symbol>', message, id); } }
[ "function", "isSymbol", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "("...
Check if provided value is Symbol @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "Symbol" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L609-L615
49,349
assertjs/assert.js
dist/assert.esm.js
isNotSymbol
function isNotSymbol(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value === 'symbol') { throw TypeException.expectedType(assertionTypes.IS_NOT_SYMBOL, value, '<symbol>', message, id); } }
javascript
function isNotSymbol(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && typeof value === 'symbol') { throw TypeException.expectedType(assertionTypes.IS_NOT_SYMBOL, value, '<symbol>', message, id); } }
[ "function", "isNotSymbol", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", ...
Check if provided value is not an Symbol @param value @param {string} message @param {string} id @returns void
[ "Check", "if", "provided", "value", "is", "not", "an", "Symbol" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L624-L630
49,350
assertjs/assert.js
dist/assert.esm.js
isInstanceOf
function isInstanceOf(value, expectedInstance, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !(value instanceof expectedInstance)) { throw ValueException.unexpectedValue(assertionTypes.INSTANCE_OF, value, expectedInstance, message, i...
javascript
function isInstanceOf(value, expectedInstance, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !(value instanceof expectedInstance)) { throw ValueException.unexpectedValue(assertionTypes.INSTANCE_OF, value, expectedInstance, message, i...
[ "function", "isInstanceOf", "(", "value", ",", "expectedInstance", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", ...
Check if provided value is an expected instance @param value @param {Function} expectedInstance @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "an", "expected", "instance" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L686-L692
49,351
assertjs/assert.js
dist/assert.esm.js
isNotInstanceOf
function isNotInstanceOf(value, excludedInstance, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value instanceof excludedInstance) { throw ValueException.expectedValue(assertionTypes.NOT_INSTANCE_OF, value, excludedInstance, message,...
javascript
function isNotInstanceOf(value, excludedInstance, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value instanceof excludedInstance) { throw ValueException.expectedValue(assertionTypes.NOT_INSTANCE_OF, value, excludedInstance, message,...
[ "function", "isNotInstanceOf", "(", "value", ",", "excludedInstance", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=",...
Check if provided value is not instance of excluded instance @param value @param {Function} excludedInstance @param {string} message @param {string} id
[ "Check", "if", "provided", "value", "is", "not", "instance", "of", "excluded", "instance" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L701-L707
49,352
assertjs/assert.js
dist/assert.esm.js
isTrue
function isTrue(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== true) { throw ValueException.unexpectedValue(assertionTypes.IS_TRUE, value, true, message, id); } }
javascript
function isTrue(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== true) { throw ValueException.unexpectedValue(assertionTypes.IS_TRUE, value, true, message, id); } }
[ "function", "isTrue", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(", ...
Check if provided value is true @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "true" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L716-L722
49,353
assertjs/assert.js
dist/assert.esm.js
isNotTrue
function isNotTrue(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value === true) { throw ValueException.expectedValue(assertionTypes.IS_NOT_TRUE, value, true, message, id); } }
javascript
function isNotTrue(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value === true) { throw ValueException.expectedValue(assertionTypes.IS_NOT_TRUE, value, true, message, id); } }
[ "function", "isNotTrue", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(...
Check if provided value is not true @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "not", "true" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L731-L737
49,354
assertjs/assert.js
dist/assert.esm.js
isFalse
function isFalse(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== false) { throw ValueException.unexpectedValue(assertionTypes.IS_FALSE, value, false, message, id); } }
javascript
function isFalse(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== false) { throw ValueException.unexpectedValue(assertionTypes.IS_FALSE, value, false, message, id); } }
[ "function", "isFalse", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(",...
Check if provided value is false @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "false" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L746-L752
49,355
assertjs/assert.js
dist/assert.esm.js
isNotFalse
function isNotFalse(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value === false) { throw ValueException.expectedValue(assertionTypes.IS_NOT_FALSE, value, false, message, id); } }
javascript
function isNotFalse(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value === false) { throw ValueException.expectedValue(assertionTypes.IS_NOT_FALSE, value, false, message, id); } }
[ "function", "isNotFalse", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "...
Check if provided value is not false @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "not", "false" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L761-L767
49,356
assertjs/assert.js
dist/assert.esm.js
isNull
function isNull(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== null) { throw ValueException.unexpectedValue(assertionTypes.IS_NULL, value, null, message, id); } }
javascript
function isNull(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value !== null) { throw ValueException.unexpectedValue(assertionTypes.IS_NULL, value, null, message, id); } }
[ "function", "isNull", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(", ...
Check if provided value is null @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "null" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L776-L782
49,357
assertjs/assert.js
dist/assert.esm.js
isNotNull
function isNotNull(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value === null) { throw ValueException.expectedValue(assertionTypes.IS_NOT_NULL, value, null, message, id); } }
javascript
function isNotNull(value, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && value === null) { throw ValueException.expectedValue(assertionTypes.IS_NOT_NULL, value, null, message, id); } }
[ "function", "isNotNull", "(", "value", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}", "if", "(...
Check if provided value is not null @param value @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "is", "not", "null" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L791-L797
49,358
assertjs/assert.js
dist/assert.esm.js
match
function match(value, regExp, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !regExp.test(value)) { throw LogicException.throw(assertionTypes.MATCH, value, message, id); } }
javascript
function match(value, regExp, message, id) { if (message === void 0) { message = ''; } if (id === void 0) { id = ''; } if (this.enabled && !regExp.test(value)) { throw LogicException.throw(assertionTypes.MATCH, value, message, id); } }
[ "function", "match", "(", "value", ",", "regExp", ",", "message", ",", "id", ")", "{", "if", "(", "message", "===", "void", "0", ")", "{", "message", "=", "''", ";", "}", "if", "(", "id", "===", "void", "0", ")", "{", "id", "=", "''", ";", "}...
Check if provided value match provided RegExp @param {string} value @param {RegExp} regExp @param {string} message @param {string} id @returns {void}
[ "Check", "if", "provided", "value", "match", "provided", "RegExp" ]
709656c2dc87ffa47f86e0e3d6442f199252260c
https://github.com/assertjs/assert.js/blob/709656c2dc87ffa47f86e0e3d6442f199252260c/dist/assert.esm.js#L807-L813
49,359
joaquinfq/jf-json-parse
index.js
loadJsonFile
function loadJsonFile(filename, cache, cwd) { let _content = null; if (filename.toLowerCase().endsWith('.json')) { const _filename = path.resolve(cwd, filename); if (fs.existsSync(_filename)) { if (_filename in cache) { _content = cache[_filena...
javascript
function loadJsonFile(filename, cache, cwd) { let _content = null; if (filename.toLowerCase().endsWith('.json')) { const _filename = path.resolve(cwd, filename); if (fs.existsSync(_filename)) { if (_filename in cache) { _content = cache[_filena...
[ "function", "loadJsonFile", "(", "filename", ",", "cache", ",", "cwd", ")", "{", "let", "_content", "=", "null", ";", "if", "(", "filename", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "'.json'", ")", ")", "{", "const", "_filename", "=", "path"...
Lee el archivo JSON o el texto en formato JSON y busca los archivos JSON incluidos. Si un archivo no existe se deja el texto tal cual. @param {string} filename Ruta al archivo a leer o texto en formato JSON. @param {object} cache Archivos y textos procesados previamente. @param {object} cwd Directorio actual a...
[ "Lee", "el", "archivo", "JSON", "o", "el", "texto", "en", "formato", "JSON", "y", "busca", "los", "archivos", "JSON", "incluidos", ".", "Si", "un", "archivo", "no", "existe", "se", "deja", "el", "texto", "tal", "cual", "." ]
73ad42e71de95426d51c98a9780419945fe2004e
https://github.com/joaquinfq/jf-json-parse/blob/73ad42e71de95426d51c98a9780419945fe2004e/index.js#L14-L55
49,360
joaquinfq/jf-json-parse
index.js
parseJson
function parseJson(json, cache, cwd) { return json.replace( /"([^"]+\.json)"/gi, (match, jsonFile) => { const _json = loadJsonFile(jsonFile, cache, cwd); return _json === null ? match : _json; } ); }
javascript
function parseJson(json, cache, cwd) { return json.replace( /"([^"]+\.json)"/gi, (match, jsonFile) => { const _json = loadJsonFile(jsonFile, cache, cwd); return _json === null ? match : _json; } ); }
[ "function", "parseJson", "(", "json", ",", "cache", ",", "cwd", ")", "{", "return", "json", ".", "replace", "(", "/", "\"([^\"]+\\.json)\"", "/", "gi", ",", "(", "match", ",", "jsonFile", ")", "=>", "{", "const", "_json", "=", "loadJsonFile", "(", "jso...
Lee el texto en formato JSON y busca los archivos JSON incluidos. Si un archivo no existe se deja el texto tal cual. @param {string} json Texto en formato JSON a analizar. @param {object} cache Archivos y textos procesados previamente. @param {object} cwd Directorio actual a usar para resolver las inclusiones. @re...
[ "Lee", "el", "texto", "en", "formato", "JSON", "y", "busca", "los", "archivos", "JSON", "incluidos", ".", "Si", "un", "archivo", "no", "existe", "se", "deja", "el", "texto", "tal", "cual", "." ]
73ad42e71de95426d51c98a9780419945fe2004e
https://github.com/joaquinfq/jf-json-parse/blob/73ad42e71de95426d51c98a9780419945fe2004e/index.js#L67-L80
49,361
erelsgl/languagemodel
LanguageModel.js
function(dataset) { // calculate counts for equation (3): var mapWordToTotalCount = {}; var totalNumberOfWordsInDataset = 0; for (var i in dataset) { var datum = dataset[i]; var totalPerDatum = 0; // for each input sentence, count the total number of words in it: for (var word in datum) { m...
javascript
function(dataset) { // calculate counts for equation (3): var mapWordToTotalCount = {}; var totalNumberOfWordsInDataset = 0; for (var i in dataset) { var datum = dataset[i]; var totalPerDatum = 0; // for each input sentence, count the total number of words in it: for (var word in datum) { m...
[ "function", "(", "dataset", ")", "{", "// calculate counts for equation (3):", "var", "mapWordToTotalCount", "=", "{", "}", ";", "var", "totalNumberOfWordsInDataset", "=", "0", ";", "for", "(", "var", "i", "in", "dataset", ")", "{", "var", "datum", "=", "datas...
Train the language with all the given documents. @param dataset an array with hashes of the format: {word1:count1, word2:count2,...} each object represents the a sentence (it should be tokenized in advance).
[ "Train", "the", "language", "with", "all", "the", "given", "documents", "." ]
462644dc32f97a970e3f4827fe92d0e709db21db
https://github.com/erelsgl/languagemodel/blob/462644dc32f97a970e3f4827fe92d0e709db21db/LanguageModel.js#L32-L64
49,362
ottojs/otto-errors
lib/read.error.js
ErrorRead
function ErrorRead (message) { Error.call(this); // Add Information this.name = 'ErrorRead'; this.type = 'server'; this.status = 500; if (message) { this.message = message; } }
javascript
function ErrorRead (message) { Error.call(this); // Add Information this.name = 'ErrorRead'; this.type = 'server'; this.status = 500; if (message) { this.message = message; } }
[ "function", "ErrorRead", "(", "message", ")", "{", "Error", ".", "call", "(", "this", ")", ";", "// Add Information", "this", ".", "name", "=", "'ErrorRead'", ";", "this", ".", "type", "=", "'server'", ";", "this", ".", "status", "=", "500", ";", "if",...
Error - ErrorRead
[ "Error", "-", "ErrorRead" ]
a3c6d98fd5d35ce3c136ed7e1edd2f800af268d9
https://github.com/ottojs/otto-errors/blob/a3c6d98fd5d35ce3c136ed7e1edd2f800af268d9/lib/read.error.js#L8-L20
49,363
kevinoid/promised-read
index.js
tryUnshift
function tryUnshift(stream, result, desiredLength, emptySlice) { if (typeof stream.unshift !== 'function') { debug('Unable to unshift, stream does not have an unshift method.'); return result; } const errorListeners = stream.listeners('error'); stream.removeAllListeners('error'); // Note: Don't rel...
javascript
function tryUnshift(stream, result, desiredLength, emptySlice) { if (typeof stream.unshift !== 'function') { debug('Unable to unshift, stream does not have an unshift method.'); return result; } const errorListeners = stream.listeners('error'); stream.removeAllListeners('error'); // Note: Don't rel...
[ "function", "tryUnshift", "(", "stream", ",", "result", ",", "desiredLength", ",", "emptySlice", ")", "{", "if", "(", "typeof", "stream", ".", "unshift", "!==", "'function'", ")", "{", "debug", "(", "'Unable to unshift, stream does not have an unshift method.'", ")"...
Attempts to unshift result data down to a desired length. @param {stream.Readable} stream Stream into which to unshift data. @param {!Buffer|string|!Array} result Read result data. @param {number} desiredLength Desired length of result after unshifting. @param {boolean=} emptySlice Return an empty slice when all data i...
[ "Attempts", "to", "unshift", "result", "data", "down", "to", "a", "desired", "length", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L28-L74
49,364
kevinoid/promised-read
index.js
checkUntil
function checkUntil(resultWithData, data, ended) { let desiredLength; try { desiredLength = until(resultWithData, data, ended); } catch (errUntil) { doReject(errUntil, true); return true; } const resultLength = result ? result.length : 0; if (typeof desiredLe...
javascript
function checkUntil(resultWithData, data, ended) { let desiredLength; try { desiredLength = until(resultWithData, data, ended); } catch (errUntil) { doReject(errUntil, true); return true; } const resultLength = result ? result.length : 0; if (typeof desiredLe...
[ "function", "checkUntil", "(", "resultWithData", ",", "data", ",", "ended", ")", "{", "let", "desiredLength", ";", "try", "{", "desiredLength", "=", "until", "(", "resultWithData", ",", "data", ",", "ended", ")", ";", "}", "catch", "(", "errUntil", ")", ...
Calls the until function and handles its result. @return {boolean} <code>true</code> if done reading, <code>false</code> otherwise. @private
[ "Calls", "the", "until", "function", "and", "handles", "its", "result", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L242-L299
49,365
kevinoid/promised-read
index.js
read
function read(stream, size, options) { if (!options && typeof size === 'object') { options = size; size = null; } return readInternal(stream, size, undefined, options); }
javascript
function read(stream, size, options) { if (!options && typeof size === 'object') { options = size; size = null; } return readInternal(stream, size, undefined, options); }
[ "function", "read", "(", "stream", ",", "size", ",", "options", ")", "{", "if", "(", "!", "options", "&&", "typeof", "size", "===", "'object'", ")", "{", "options", "=", "size", ";", "size", "=", "null", ";", "}", "return", "readInternal", "(", "stre...
Reads from a stream.Readable. @param {stream.Readable} stream Stream from which to read. @param {number=} size Number of bytes to read. If <code>stream.read</code> is a function, <code>size</code> is passed to it, guaranteeing maximum result size. Otherwise, <code>'data'</code> events will be consumed until <code>siz...
[ "Reads", "from", "a", "stream", ".", "Readable", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L457-L463
49,366
kevinoid/promised-read
index.js
readUntil
function readUntil(stream, until, options) { if (typeof until !== 'function') { // Note: Synchronous Yaku emits unhandledRejection before returning. // Best current option is to use an async promise, even when flowing const ReadPromise = (options && options.Promise) || Promise; return ReadPromise.rej...
javascript
function readUntil(stream, until, options) { if (typeof until !== 'function') { // Note: Synchronous Yaku emits unhandledRejection before returning. // Best current option is to use an async promise, even when flowing const ReadPromise = (options && options.Promise) || Promise; return ReadPromise.rej...
[ "function", "readUntil", "(", "stream", ",", "until", ",", "options", ")", "{", "if", "(", "typeof", "until", "!==", "'function'", ")", "{", "// Note: Synchronous Yaku emits unhandledRejection before returning.", "// Best current option is to use an async promise, even when fl...
Reads from a stream.Readable until a given test is satisfied. @param {stream.Readable} stream Stream from which to read. @param {function((!Buffer|string|!Array), (Buffer|string|*)): number|boolean} test Test function called with the data read so far and the most recent chunk read. If it returns a negative or falsey v...
[ "Reads", "from", "a", "stream", ".", "Readable", "until", "a", "given", "test", "is", "satisfied", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L486-L494
49,367
kevinoid/promised-read
index.js
readTo
function readTo(stream, needle, options) { const endOK = Boolean(options && (options.endOK || options.endOk)); let needleForIndexOf; let needleLength; function until(result, chunk, ended) { if (ended) { return endOK ? (result ? result.length : 0) : -1; } if (Array.isArray(result)) { // ...
javascript
function readTo(stream, needle, options) { const endOK = Boolean(options && (options.endOK || options.endOk)); let needleForIndexOf; let needleLength; function until(result, chunk, ended) { if (ended) { return endOK ? (result ? result.length : 0) : -1; } if (Array.isArray(result)) { // ...
[ "function", "readTo", "(", "stream", ",", "needle", ",", "options", ")", "{", "const", "endOK", "=", "Boolean", "(", "options", "&&", "(", "options", ".", "endOK", "||", "options", ".", "endOk", ")", ")", ";", "let", "needleForIndexOf", ";", "let", "ne...
Reads from a stream.Readable until a given value is found. <p>This function calls {@link readUntil} with an <code>until</code> function which uses <code>.indexOf</code> to search for <code>needle</code>. When reading Buffers and performance is paramount, consider using {@link readUntil} directly with an optional func...
[ "Reads", "from", "a", "stream", ".", "Readable", "until", "a", "given", "value", "is", "found", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L529-L591
49,368
kevinoid/promised-read
index.js
readToEnd
function readToEnd(stream, options) { function until(result, chunk, ended) { return ended; } return readInternal(stream, undefined, until, options); }
javascript
function readToEnd(stream, options) { function until(result, chunk, ended) { return ended; } return readInternal(stream, undefined, until, options); }
[ "function", "readToEnd", "(", "stream", ",", "options", ")", "{", "function", "until", "(", "result", ",", "chunk", ",", "ended", ")", "{", "return", "ended", ";", "}", "return", "readInternal", "(", "stream", ",", "undefined", ",", "until", ",", "option...
Reads from a stream.Readable until 'end' is emitted. @param {stream.Readable} stream Stream from which to read. @param {ReadOptions=} options Options. @return {Promise<!Buffer|string|!Array>| CancellableReadPromise<!Buffer|string|!Array>} Promise with the data read, <code>null</code> if no data was read, or an <code>Er...
[ "Reads", "from", "a", "stream", ".", "Readable", "until", "end", "is", "emitted", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L604-L609
49,369
kevinoid/promised-read
index.js
readToMatch
function readToMatch(stream, regexp, options) { const endOK = Boolean(options && (options.endOK || options.endOk)); const maxMatchLen = Number(options && options.maxMatchLen); // Convert to RegExp where necessary, like String.prototype.match // Make sure RegExp has global flag so lastIndex will be set if (!(r...
javascript
function readToMatch(stream, regexp, options) { const endOK = Boolean(options && (options.endOK || options.endOk)); const maxMatchLen = Number(options && options.maxMatchLen); // Convert to RegExp where necessary, like String.prototype.match // Make sure RegExp has global flag so lastIndex will be set if (!(r...
[ "function", "readToMatch", "(", "stream", ",", "regexp", ",", "options", ")", "{", "const", "endOK", "=", "Boolean", "(", "options", "&&", "(", "options", ".", "endOK", "||", "options", ".", "endOk", ")", ")", ";", "const", "maxMatchLen", "=", "Number", ...
Reads from a stream.Readable until a given expression is matched. <p>This function calls {@link readUntil} with an <code>until</code> function which applies <code>regexp</code> to the data read.</p> <p>Doc note: options should be a ReadToMatchOptions type which extends ReadToOptions, but record types can't currently...
[ "Reads", "from", "a", "stream", ".", "Readable", "until", "a", "given", "expression", "is", "matched", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/index.js#L641-L678
49,370
HaroldPutman/hubot-taboo-topics
src/main.js
loadList
function loadList(brain) { const taboolist = brain.get("taboo"); if (taboolist != null) { for (let topic of taboolist) { taboo.set(topic, new RegExp(`\\b${topic}\\b`, "i")); } } }
javascript
function loadList(brain) { const taboolist = brain.get("taboo"); if (taboolist != null) { for (let topic of taboolist) { taboo.set(topic, new RegExp(`\\b${topic}\\b`, "i")); } } }
[ "function", "loadList", "(", "brain", ")", "{", "const", "taboolist", "=", "brain", ".", "get", "(", "\"taboo\"", ")", ";", "if", "(", "taboolist", "!=", "null", ")", "{", "for", "(", "let", "topic", "of", "taboolist", ")", "{", "taboo", ".", "set", ...
Recall the Taboo list from brain
[ "Recall", "the", "Taboo", "list", "from", "brain" ]
0868ce82cd259dd8701d4b069014d295811d6904
https://github.com/HaroldPutman/hubot-taboo-topics/blob/0868ce82cd259dd8701d4b069014d295811d6904/src/main.js#L44-L51
49,371
HaroldPutman/hubot-taboo-topics
src/main.js
saveList
function saveList(brain) { const taboolist = []; taboo.forEach((re, topic) => { taboolist.push(topic); }); brain.set("taboo", taboolist); }
javascript
function saveList(brain) { const taboolist = []; taboo.forEach((re, topic) => { taboolist.push(topic); }); brain.set("taboo", taboolist); }
[ "function", "saveList", "(", "brain", ")", "{", "const", "taboolist", "=", "[", "]", ";", "taboo", ".", "forEach", "(", "(", "re", ",", "topic", ")", "=>", "{", "taboolist", ".", "push", "(", "topic", ")", ";", "}", ")", ";", "brain", ".", "set",...
Stores the taboolist in brain.
[ "Stores", "the", "taboolist", "in", "brain", "." ]
0868ce82cd259dd8701d4b069014d295811d6904
https://github.com/HaroldPutman/hubot-taboo-topics/blob/0868ce82cd259dd8701d4b069014d295811d6904/src/main.js#L80-L86
49,372
HaroldPutman/hubot-taboo-topics
src/main.js
deleteTopic
function deleteTopic(res, topic) { const keyTopic = topic.toLowerCase(); if (taboo.delete(keyTopic)) { res.reply(capitalize(`${topic} is no longer taboo`)); saveList(res.robot.brain); } else { res.reply(`Oops, ${topic} is not taboo`); } }
javascript
function deleteTopic(res, topic) { const keyTopic = topic.toLowerCase(); if (taboo.delete(keyTopic)) { res.reply(capitalize(`${topic} is no longer taboo`)); saveList(res.robot.brain); } else { res.reply(`Oops, ${topic} is not taboo`); } }
[ "function", "deleteTopic", "(", "res", ",", "topic", ")", "{", "const", "keyTopic", "=", "topic", ".", "toLowerCase", "(", ")", ";", "if", "(", "taboo", ".", "delete", "(", "keyTopic", ")", ")", "{", "res", ".", "reply", "(", "capitalize", "(", "`", ...
Removes a topic from the taboo list.
[ "Removes", "a", "topic", "from", "the", "taboo", "list", "." ]
0868ce82cd259dd8701d4b069014d295811d6904
https://github.com/HaroldPutman/hubot-taboo-topics/blob/0868ce82cd259dd8701d4b069014d295811d6904/src/main.js#L91-L99
49,373
HaroldPutman/hubot-taboo-topics
src/main.js
addTopic
function addTopic(res, topic) { const keyTopic = topic.toLowerCase(); if (!taboo.has(keyTopic)) { taboo.set(keyTopic, new RegExp(`\\b${topic}\\b`, "i")); saveList(res.robot.brain); res.reply(capitalize(`${topic} is now taboo`)); } else { res.reply(`Oops, ${topic} is already taboo`); ...
javascript
function addTopic(res, topic) { const keyTopic = topic.toLowerCase(); if (!taboo.has(keyTopic)) { taboo.set(keyTopic, new RegExp(`\\b${topic}\\b`, "i")); saveList(res.robot.brain); res.reply(capitalize(`${topic} is now taboo`)); } else { res.reply(`Oops, ${topic} is already taboo`); ...
[ "function", "addTopic", "(", "res", ",", "topic", ")", "{", "const", "keyTopic", "=", "topic", ".", "toLowerCase", "(", ")", ";", "if", "(", "!", "taboo", ".", "has", "(", "keyTopic", ")", ")", "{", "taboo", ".", "set", "(", "keyTopic", ",", "new",...
Adds a new taboo topic.
[ "Adds", "a", "new", "taboo", "topic", "." ]
0868ce82cd259dd8701d4b069014d295811d6904
https://github.com/HaroldPutman/hubot-taboo-topics/blob/0868ce82cd259dd8701d4b069014d295811d6904/src/main.js#L104-L113
49,374
HaroldPutman/hubot-taboo-topics
src/main.js
listTopics
function listTopics(res) { loadList(res.robot.brain); // Not necessary, but helps for testing. if (taboo.size == 0) { res.reply("Nothing is taboo here."); } else { let topics = []; taboo.forEach((re, topic) => { topics.push(topic); }) res.reply("Taboo topics are: " + to...
javascript
function listTopics(res) { loadList(res.robot.brain); // Not necessary, but helps for testing. if (taboo.size == 0) { res.reply("Nothing is taboo here."); } else { let topics = []; taboo.forEach((re, topic) => { topics.push(topic); }) res.reply("Taboo topics are: " + to...
[ "function", "listTopics", "(", "res", ")", "{", "loadList", "(", "res", ".", "robot", ".", "brain", ")", ";", "// Not necessary, but helps for testing.", "if", "(", "taboo", ".", "size", "==", "0", ")", "{", "res", ".", "reply", "(", "\"Nothing is taboo here...
Lists all the taboo topics.
[ "Lists", "all", "the", "taboo", "topics", "." ]
0868ce82cd259dd8701d4b069014d295811d6904
https://github.com/HaroldPutman/hubot-taboo-topics/blob/0868ce82cd259dd8701d4b069014d295811d6904/src/main.js#L118-L129
49,375
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
extend
function extend(what, whit) { Object.keys(whit).forEach(function(key) { var def = whit[key]; if (what[key] === undefined) { if (def.get && def.set) { // TODO: look at element.dataset polyfill (iOS?) } else { what[key] = def; } } }); }
javascript
function extend(what, whit) { Object.keys(whit).forEach(function(key) { var def = whit[key]; if (what[key] === undefined) { if (def.get && def.set) { // TODO: look at element.dataset polyfill (iOS?) } else { what[key] = def; } } }); }
[ "function", "extend", "(", "what", ",", "whit", ")", "{", "Object", ".", "keys", "(", "whit", ")", ".", "forEach", "(", "function", "(", "key", ")", "{", "var", "def", "=", "whit", "[", "key", "]", ";", "if", "(", "what", "[", "key", "]", "==="...
Extend one object with another. @param {object} what Native prototype @param {object} whit Extension methods
[ "Extend", "one", "object", "with", "another", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L20-L31
49,376
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
strings
function strings() { extend(String.prototype, { trim: function() { return this.replace(/^\s*/, "").replace(/\s*$/, ""); }, repeat: function(n) { return new Array(n + 1).join(this); }, startsWith: function(sub) { return this.indexOf(sub) === 0; }, endsWith: function(sub) { sub = St...
javascript
function strings() { extend(String.prototype, { trim: function() { return this.replace(/^\s*/, "").replace(/\s*$/, ""); }, repeat: function(n) { return new Array(n + 1).join(this); }, startsWith: function(sub) { return this.indexOf(sub) === 0; }, endsWith: function(sub) { sub = St...
[ "function", "strings", "(", ")", "{", "extend", "(", "String", ".", "prototype", ",", "{", "trim", ":", "function", "(", ")", "{", "return", "this", ".", "replace", "(", "/", "^\\s*", "/", ",", "\"\"", ")", ".", "replace", "(", "/", "\\s*$", "/", ...
Patching `String.prototype`
[ "Patching", "String", ".", "prototype" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L36-L59
49,377
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
arrays
function arrays() { extend(Array, { every: function every(array, fun, thisp) { var res = true, len = array.length >>> 0; for (var i = 0; i < len; i++) { if (array[i] !== undefined) { if (!fun.call(thisp, array[i], i, array)) { res = false; break; } } } retur...
javascript
function arrays() { extend(Array, { every: function every(array, fun, thisp) { var res = true, len = array.length >>> 0; for (var i = 0; i < len; i++) { if (array[i] !== undefined) { if (!fun.call(thisp, array[i], i, array)) { res = false; break; } } } retur...
[ "function", "arrays", "(", ")", "{", "extend", "(", "Array", ",", "{", "every", ":", "function", "every", "(", "array", ",", "fun", ",", "thisp", ")", "{", "var", "res", "=", "true", ",", "len", "=", "array", ".", "length", ">>>", "0", ";", "for"...
Patching arrays.
[ "Patching", "arrays", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L64-L110
49,378
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(action, thisp) { var is = this.initialized; if (arguments.length) { if (is) { action.call(thisp); } else { this._initcallbacks = this._initcallbacks || []; this._initcallbacks.push(function() { if (gui.debug) { try { action.call(thisp); } catch (exceptio...
javascript
function(action, thisp) { var is = this.initialized; if (arguments.length) { if (is) { action.call(thisp); } else { this._initcallbacks = this._initcallbacks || []; this._initcallbacks.push(function() { if (gui.debug) { try { action.call(thisp); } catch (exceptio...
[ "function", "(", "action", ",", "thisp", ")", "{", "var", "is", "=", "this", ".", "initialized", ";", "if", "(", "arguments", ".", "length", ")", "{", "if", "(", "is", ")", "{", "action", ".", "call", "(", "thisp", ")", ";", "}", "else", "{", "...
Do something before the spirits get here. if that's already too late, just do it now. @param @optional {function} action @param @optional {object} thisp @returns {boolean} True when ready already
[ "Do", "something", "before", "the", "spirits", "get", "here", ".", "if", "that", "s", "already", "too", "late", "just", "do", "it", "now", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L531-L553
49,379
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(action, thisp) { this.init(action, thisp); if(gui.debug) { console.warn('gui.ready() is for spirits, use gui.init()'); } return false; }
javascript
function(action, thisp) { this.init(action, thisp); if(gui.debug) { console.warn('gui.ready() is for spirits, use gui.init()'); } return false; }
[ "function", "(", "action", ",", "thisp", ")", "{", "this", ".", "init", "(", "action", ",", "thisp", ")", ";", "if", "(", "gui", ".", "debug", ")", "{", "console", ".", "warn", "(", "'gui.ready() is for spirits, use gui.init()'", ")", ";", "}", "return",...
Featured in core-spirits@wunderbyte.com @param @optional {function} action @param @optional {object} thisp @returns {boolean} True when ready already (so false)
[ "Featured", "in", "core", "-", "spirits" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L561-L567
49,380
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(name, module) { var Module; if (gui.Type.isString(name) && name.length) { Module = gui.Module.extend(name, module || {}); module = gui.Module.$register(new Module(name)); return module; } else { throw new Error("Module needs an identity token"); } }
javascript
function(name, module) { var Module; if (gui.Type.isString(name) && name.length) { Module = gui.Module.extend(name, module || {}); module = gui.Module.$register(new Module(name)); return module; } else { throw new Error("Module needs an identity token"); } }
[ "function", "(", "name", ",", "module", ")", "{", "var", "Module", ";", "if", "(", "gui", ".", "Type", ".", "isString", "(", "name", ")", "&&", "name", ".", "length", ")", "{", "Module", "=", "gui", ".", "Module", ".", "extend", "(", "name", ",",...
Register module. @param {String} name @param {object} module @returns {gui.Module}
[ "Register", "module", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L575-L584
49,381
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(ns, members) { var no; if (gui.Type.isString(ns)) { no = gui.Object.lookup(ns); no = new gui.Namespace(ns); no = gui.Object.assert(ns, no); } else { throw new TypeError("Expected a namespace string"); } return gui.Object.extend(no, members || {}); }
javascript
function(ns, members) { var no; if (gui.Type.isString(ns)) { no = gui.Object.lookup(ns); no = new gui.Namespace(ns); no = gui.Object.assert(ns, no); } else { throw new TypeError("Expected a namespace string"); } return gui.Object.extend(no, members || {}); }
[ "function", "(", "ns", ",", "members", ")", "{", "var", "no", ";", "if", "(", "gui", ".", "Type", ".", "isString", "(", "ns", ")", ")", "{", "no", "=", "gui", ".", "Object", ".", "lookup", "(", "ns", ")", ";", "no", "=", "new", "gui", ".", ...
Declare namespace. Optionally add members. @param {String} ns @param {Map<String,object>} members @returns {gui.Namespace}
[ "Declare", "namespace", ".", "Optionally", "add", "members", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L622-L632
49,382
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(msg, arg) { if (gui.Type.isEvent(arg)) { arg = new gui.EventSummary(arg); } gui.Broadcast.dispatchGlobal(msg, arg); }
javascript
function(msg, arg) { if (gui.Type.isEvent(arg)) { arg = new gui.EventSummary(arg); } gui.Broadcast.dispatchGlobal(msg, arg); }
[ "function", "(", "msg", ",", "arg", ")", "{", "if", "(", "gui", ".", "Type", ".", "isEvent", "(", "arg", ")", ")", "{", "arg", "=", "new", "gui", ".", "EventSummary", "(", "arg", ")", ";", "}", "gui", ".", "Broadcast", ".", "dispatchGlobal", "(",...
Broadcast something globally. Events will be wrapped in an EventSummary. @param {String} message gui.BROADCAST_MOUSECLICK or similar @param @optional {object} arg This could well be a MouseEvent
[ "Broadcast", "something", "globally", ".", "Events", "will", "be", "wrapped", "in", "an", "EventSummary", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L639-L644
49,383
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(o, name) { gui.Object.each(o, function(key, value) { if (key !== "$superclass" && gui.Type.isConstructor(value)) { if (value.$classname === gui.Class.ANONYMOUS) { Object.defineProperty(value, '$classname', { value: name + "." + key, enumerable: true, writable: false ...
javascript
function(o, name) { gui.Object.each(o, function(key, value) { if (key !== "$superclass" && gui.Type.isConstructor(value)) { if (value.$classname === gui.Class.ANONYMOUS) { Object.defineProperty(value, '$classname', { value: name + "." + key, enumerable: true, writable: false ...
[ "function", "(", "o", ",", "name", ")", "{", "gui", ".", "Object", ".", "each", "(", "o", ",", "function", "(", "key", ",", "value", ")", "{", "if", "(", "key", "!==", "\"$superclass\"", "&&", "gui", ".", "Type", ".", "isConstructor", "(", "value",...
Name members recursively. @param {object|function} o @param {String} name
[ "Name", "members", "recursively", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L749-L762
49,384
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(string) { var hit = null, looks = false; if (gui.Type.isString(string)) { hit = this.extractKey(string); looks = hit && hit[0] === string; } return looks; }
javascript
function(string) { var hit = null, looks = false; if (gui.Type.isString(string)) { hit = this.extractKey(string); looks = hit && hit[0] === string; } return looks; }
[ "function", "(", "string", ")", "{", "var", "hit", "=", "null", ",", "looks", "=", "false", ";", "if", "(", "gui", ".", "Type", ".", "isString", "(", "string", ")", ")", "{", "hit", "=", "this", ".", "extractKey", "(", "string", ")", ";", "looks"...
String appears to be a generated key? We don't look it up in the key cache, so this method can be used to check a key that was generated in old session. @param {String} string @returns {boolean}
[ "String", "appears", "to", "be", "a", "generated", "key?", "We", "don", "t", "look", "it", "up", "in", "the", "key", "cache", "so", "this", "method", "can", "be", "used", "to", "check", "a", "key", "that", "was", "generated", "in", "old", "session", ...
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L811-L819
49,385
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(proto, props) { var resolved = {}; Object.keys(props).forEach(function(prop) { resolved[prop] = { value: props[prop], writable: true, enumerable: true, configurable: true }; }); return Object.create(proto, resolved); }
javascript
function(proto, props) { var resolved = {}; Object.keys(props).forEach(function(prop) { resolved[prop] = { value: props[prop], writable: true, enumerable: true, configurable: true }; }); return Object.create(proto, resolved); }
[ "function", "(", "proto", ",", "props", ")", "{", "var", "resolved", "=", "{", "}", ";", "Object", ".", "keys", "(", "props", ")", ".", "forEach", "(", "function", "(", "prop", ")", "{", "resolved", "[", "prop", "]", "=", "{", "value", ":", "prop...
Object.create with default property descriptors. @see http://wiki.ecmascript.org/doku.php?id=strawman:define_properties_operator @param {object} proto @param {object} props
[ "Object", ".", "create", "with", "default", "property", "descriptors", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L854-L865
49,386
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(source, domap, thisp) { var result = {}, mapping; this.each(source, function(key, value) { mapping = domap.call(thisp, key, value); if (mapping !== undefined) { result[key] = mapping; } }); return result; }
javascript
function(source, domap, thisp) { var result = {}, mapping; this.each(source, function(key, value) { mapping = domap.call(thisp, key, value); if (mapping !== undefined) { result[key] = mapping; } }); return result; }
[ "function", "(", "source", ",", "domap", ",", "thisp", ")", "{", "var", "result", "=", "{", "}", ",", "mapping", ";", "this", ".", "each", "(", "source", ",", "function", "(", "key", ",", "value", ")", "{", "mapping", "=", "domap", ".", "call", "...
Create new object by passing all property names and values through a resolver call. Eliminate values that map to `undefined`. @param {object} source @param {function} domap @param @optional {object} thisp @returns {object}
[ "Create", "new", "object", "by", "passing", "all", "property", "names", "and", "values", "through", "a", "resolver", "call", ".", "Eliminate", "values", "that", "map", "to", "undefined", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L957-L967
49,387
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(opath, context) { var result, struct = context || self; if (gui.Type.isString(opath)) { if (!opath.contains(".")) { result = struct[opath]; } else { var parts = opath.split("."); parts.every(function(part) { struct = struct[part]; return gui.Type.isDefined(struct); }); r...
javascript
function(opath, context) { var result, struct = context || self; if (gui.Type.isString(opath)) { if (!opath.contains(".")) { result = struct[opath]; } else { var parts = opath.split("."); parts.every(function(part) { struct = struct[part]; return gui.Type.isDefined(struct); }); r...
[ "function", "(", "opath", ",", "context", ")", "{", "var", "result", ",", "struct", "=", "context", "||", "self", ";", "if", "(", "gui", ".", "Type", ".", "isString", "(", "opath", ")", ")", "{", "if", "(", "!", "opath", ".", "contains", "(", "\"...
Lookup object for string of type "my.ns.Thing" in given context or this window. @param {String} opath Object path eg. "my.ns.Thing" @param @optional {Window} context @returns {object}
[ "Lookup", "object", "for", "string", "of", "type", "my", ".", "ns", ".", "Thing", "in", "given", "context", "or", "this", "window", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L975-L992
49,388
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(desc) { if (desc.value && gui.Type.isFunction(desc.value)) { if (desc.value.$hidden && desc.configurable) { desc.enumerable = false; } } return desc; }
javascript
function(desc) { if (desc.value && gui.Type.isFunction(desc.value)) { if (desc.value.$hidden && desc.configurable) { desc.enumerable = false; } } return desc; }
[ "function", "(", "desc", ")", "{", "if", "(", "desc", ".", "value", "&&", "gui", ".", "Type", ".", "isFunction", "(", "desc", ".", "value", ")", ")", "{", "if", "(", "desc", ".", "value", ".", "$hidden", "&&", "desc", ".", "configurable", ")", "{...
Modify method descriptor to hide from inspection. Do note that the method may still be called upon. @param {object} desc @returns {object}
[ "Modify", "method", "descriptor", "to", "hide", "from", "inspection", ".", "Do", "note", "that", "the", "method", "may", "still", "be", "called", "upon", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1117-L1124
49,389
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(o) { var type = ({}).toString.call(o).match(this._typeexp)[1].toLowerCase(); if (type === "domwindow" && String(typeof o) === "undefined") { type = "undefined"; // some kind of degenerate bug in Safari on iPad } return type; }
javascript
function(o) { var type = ({}).toString.call(o).match(this._typeexp)[1].toLowerCase(); if (type === "domwindow" && String(typeof o) === "undefined") { type = "undefined"; // some kind of degenerate bug in Safari on iPad } return type; }
[ "function", "(", "o", ")", "{", "var", "type", "=", "(", "{", "}", ")", ".", "toString", ".", "call", "(", "o", ")", ".", "match", "(", "this", ".", "_typeexp", ")", "[", "1", "]", ".", "toLowerCase", "(", ")", ";", "if", "(", "type", "===", ...
Get type of argument. Note that response may differ between user agents. @see http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator @param {object} o @returns {String}
[ "Get", "type", "of", "argument", ".", "Note", "that", "response", "may", "differ", "between", "user", "agents", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1140-L1146
49,390
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(o) { return o && o.document && o.location && o.alert && o.setInterval; }
javascript
function(o) { return o && o.document && o.location && o.alert && o.setInterval; }
[ "function", "(", "o", ")", "{", "return", "o", "&&", "o", ".", "document", "&&", "o", ".", "location", "&&", "o", ".", "alert", "&&", "o", ".", "setInterval", ";", "}" ]
Is Window object? @param {object} o @returns {boolean}
[ "Is", "Window", "object?" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1180-L1182
49,391
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(what) { return this.isFunction(what) && this.isObject(what.prototype) && Object.keys(what.prototype).length; }
javascript
function(what) { return this.isFunction(what) && this.isObject(what.prototype) && Object.keys(what.prototype).length; }
[ "function", "(", "what", ")", "{", "return", "this", ".", "isFunction", "(", "what", ")", "&&", "this", ".", "isObject", "(", "what", ".", "prototype", ")", "&&", "Object", ".", "keys", "(", "what", ".", "prototype", ")", ".", "length", ";", "}" ]
Is function fit to be invoked via the "new" operator? We assume so if the prototype reveals any properties. @param {function} what @returns {boolean}
[ "Is", "function", "fit", "to", "be", "invoked", "via", "the", "new", "operator?", "We", "assume", "so", "if", "the", "prototype", "reveals", "any", "properties", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1226-L1230
49,392
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(string) { var result = String(string); switch (result) { case "null": result = null; break; case "true": case "false": result = (result === "true"); break; default: if (String(parseInt(result, 10)) === result) { result = parseInt(result, 10); } else if (String(parse...
javascript
function(string) { var result = String(string); switch (result) { case "null": result = null; break; case "true": case "false": result = (result === "true"); break; default: if (String(parseInt(result, 10)) === result) { result = parseInt(result, 10); } else if (String(parse...
[ "function", "(", "string", ")", "{", "var", "result", "=", "String", "(", "string", ")", ";", "switch", "(", "result", ")", "{", "case", "\"null\"", ":", "result", "=", "null", ";", "break", ";", "case", "\"true\"", ":", "case", "\"false\"", ":", "re...
Autocast string to an inferred type. "123" will return a number, "false" will return a boolean. @param {String} string @returns {object}
[ "Autocast", "string", "to", "an", "inferred", "type", ".", "123", "will", "return", "a", "number", "false", "will", "return", "a", "boolean", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1265-L1284
49,393
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(/* ...types */) { var types = gui.Array.from(arguments); return function(action) { return function() { if (gui.Arguments._match(arguments, types)) { return action.apply(this, arguments); } }; }; }
javascript
function(/* ...types */) { var types = gui.Array.from(arguments); return function(action) { return function() { if (gui.Arguments._match(arguments, types)) { return action.apply(this, arguments); } }; }; }
[ "function", "(", "/* ...types */", ")", "{", "var", "types", "=", "gui", ".", "Array", ".", "from", "(", "arguments", ")", ";", "return", "function", "(", "action", ")", "{", "return", "function", "(", ")", "{", "if", "(", "gui", ".", "Arguments", "....
Forgiving arguments matcher. Ignores action if no match.
[ "Forgiving", "arguments", "matcher", ".", "Ignores", "action", "if", "no", "match", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1428-L1437
49,394
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(/* ...types */) { var types = gui.Array.from(arguments); return function(action) { return function() { if (gui.Arguments._validate(arguments, types)) { return action.apply(this, arguments); } else { gui.Arguments._abort(this); } }; }; }
javascript
function(/* ...types */) { var types = gui.Array.from(arguments); return function(action) { return function() { if (gui.Arguments._validate(arguments, types)) { return action.apply(this, arguments); } else { gui.Arguments._abort(this); } }; }; }
[ "function", "(", "/* ...types */", ")", "{", "var", "types", "=", "gui", ".", "Array", ".", "from", "(", "arguments", ")", ";", "return", "function", "(", "action", ")", "{", "return", "function", "(", ")", "{", "if", "(", "gui", ".", "Arguments", "....
Revengeful arguments validator. Throws an exception if no match.
[ "Revengeful", "arguments", "validator", ".", "Throws", "an", "exception", "if", "no", "match", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1443-L1454
49,395
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(xpect, arg, index) { var needs = !xpect.startsWith("("); var split = this._xtract(xpect, !needs).split("|"); var input = gui.Type.of(arg); var match = (xpect === "*" || (xpect === 'node' && arg && arg.nodeType) || (xpect === 'element' && arg && arg.nodeType === Node.ELEMENT_NODE) || (xpect =...
javascript
function(xpect, arg, index) { var needs = !xpect.startsWith("("); var split = this._xtract(xpect, !needs).split("|"); var input = gui.Type.of(arg); var match = (xpect === "*" || (xpect === 'node' && arg && arg.nodeType) || (xpect === 'element' && arg && arg.nodeType === Node.ELEMENT_NODE) || (xpect =...
[ "function", "(", "xpect", ",", "arg", ",", "index", ")", "{", "var", "needs", "=", "!", "xpect", ".", "startsWith", "(", "\"(\"", ")", ";", "var", "split", "=", "this", ".", "_xtract", "(", "xpect", ",", "!", "needs", ")", ".", "split", "(", "\"|...
Check if argument matches expected type. @param {string} xpect @param {object} arg @param {number} index @returns {boolean}
[ "Check", "if", "argument", "matches", "expected", "type", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1515-L1533
49,396
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(that) { var summ = this._bugsummary; var name = that.constructor.$classname || String(that); console.error([ "Bad argument " + summ.shift(), "for " + name + ":", "Expected " + summ.shift() + ",", "got " + summ.shift() + ":", summ.shift() ].join(" ")); }
javascript
function(that) { var summ = this._bugsummary; var name = that.constructor.$classname || String(that); console.error([ "Bad argument " + summ.shift(), "for " + name + ":", "Expected " + summ.shift() + ",", "got " + summ.shift() + ":", summ.shift() ].join(" ")); }
[ "function", "(", "that", ")", "{", "var", "summ", "=", "this", ".", "_bugsummary", ";", "var", "name", "=", "that", ".", "constructor", ".", "$classname", "||", "String", "(", "that", ")", ";", "console", ".", "error", "(", "[", "\"Bad argument \"", "+...
Throw exception. @TODO: Rig up to report offended methods name. @param {object} that @param {Array<String>} report
[ "Throw", "exception", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1541-L1551
49,397
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(name, params, body, context) { var F = context ? context.Function : Function; name = this.safename(name); params = params ? params.join(",") : ""; body = body || ""; return new F( "return function " + name + " ( " + params + " ) {" + body + "}" )(); }
javascript
function(name, params, body, context) { var F = context ? context.Function : Function; name = this.safename(name); params = params ? params.join(",") : ""; body = body || ""; return new F( "return function " + name + " ( " + params + " ) {" + body + "}" )(); }
[ "function", "(", "name", ",", "params", ",", "body", ",", "context", ")", "{", "var", "F", "=", "context", "?", "context", ".", "Function", ":", "Function", ";", "name", "=", "this", ".", "safename", "(", "name", ")", ";", "params", "=", "params", ...
Create named function. This may not be the most optimized thing to compile. @see https://mail.mozilla.org/pipermail/es-discuss/2009-March/008954.html @see http://wiki.ecmascript.org/doku.php?id=strawman:name_property_of_functions @param @optional {String} name @param @optional {Array<String>} params @param @optional {S...
[ "Create", "named", "function", ".", "This", "may", "not", "be", "the", "most", "optimized", "thing", "to", "compile", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1571-L1579
49,398
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function() { var b = this._breakdown_base(arguments); var C = this._createclass(null, b.proto, b.name); gui.Object.extend(C.prototype, b.protos); gui.Object.extend(C, b.statics); gui.Property.extendall(b.protos, C.prototype); if (b.recurring) { gui.Object.each(b.recurring, function(key, val) { var de...
javascript
function() { var b = this._breakdown_base(arguments); var C = this._createclass(null, b.proto, b.name); gui.Object.extend(C.prototype, b.protos); gui.Object.extend(C, b.statics); gui.Property.extendall(b.protos, C.prototype); if (b.recurring) { gui.Object.each(b.recurring, function(key, val) { var de...
[ "function", "(", ")", "{", "var", "b", "=", "this", ".", "_breakdown_base", "(", "arguments", ")", ";", "var", "C", "=", "this", ".", "_createclass", "(", "null", ",", "b", ".", "proto", ",", "b", ".", "name", ")", ";", "gui", ".", "Object", ".",...
Create constructor. Use method `extend` on the constructor to subclass further. @param @optional {String} name @param {object} proto Base prototype @param {object} protos Prototype extensions @param {object} recurring Constructor and subconstructor extensions @param {object} statics Constructor extensions @returns {fun...
[ "Create", "constructor", ".", "Use", "method", "extend", "on", "the", "constructor", "to", "subclass", "further", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1671-L1686
49,399
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-gui.js
function(SuperC, args) { args = this._breakdown_subs(args); return this._extendclass( SuperC, args.protos, args.recurring, args.statics, args.name ); }
javascript
function(SuperC, args) { args = this._breakdown_subs(args); return this._extendclass( SuperC, args.protos, args.recurring, args.statics, args.name ); }
[ "function", "(", "SuperC", ",", "args", ")", "{", "args", "=", "this", ".", "_breakdown_subs", "(", "args", ")", ";", "return", "this", ".", "_extendclass", "(", "SuperC", ",", "args", ".", "protos", ",", "args", ".", "recurring", ",", "args", ".", "...
Create subclass for given class. @param {funciton} SuperC @param {Object} args @return {function}
[ "Create", "subclass", "for", "given", "class", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-gui.js#L1826-L1835