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
51,400
slikts/delta-ticker
index.js
_start
function _start() { var now = Date.now(); var config = this._config; var missing = !config ? required : required.filter(function(key) { return config[key] === undefined; }); if (missing.length) { throw TypeError('Missing config properties: ' + missing.join(', ')); } if (this._...
javascript
function _start() { var now = Date.now(); var config = this._config; var missing = !config ? required : required.filter(function(key) { return config[key] === undefined; }); if (missing.length) { throw TypeError('Missing config properties: ' + missing.join(', ')); } if (this._...
[ "function", "_start", "(", ")", "{", "var", "now", "=", "Date", ".", "now", "(", ")", ";", "var", "config", "=", "this", ".", "_config", ";", "var", "missing", "=", "!", "config", "?", "required", ":", "required", ".", "filter", "(", "function", "(...
Used with config.limit Start the ticker, setting the timeout for the first tick. @returns {Ticker}
[ "Used", "with", "config", ".", "limit", "Start", "the", "ticker", "setting", "the", "timeout", "for", "the", "first", "tick", "." ]
8cab89af6fa175df5dabce17bf654d163578ce2e
https://github.com/slikts/delta-ticker/blob/8cab89af6fa175df5dabce17bf654d163578ce2e/index.js#L51-L73
51,401
slikts/delta-ticker
index.js
_stop
function _stop() { if (!this._started) { throw Error('Ticker not started'); } clearTimeout(this._timeout); delete this._started; delete this._before; delete this._count; if (this._config.stop) { this._config.stop(); } return this; }
javascript
function _stop() { if (!this._started) { throw Error('Ticker not started'); } clearTimeout(this._timeout); delete this._started; delete this._before; delete this._count; if (this._config.stop) { this._config.stop(); } return this; }
[ "function", "_stop", "(", ")", "{", "if", "(", "!", "this", ".", "_started", ")", "{", "throw", "Error", "(", "'Ticker not started'", ")", ";", "}", "clearTimeout", "(", "this", ".", "_timeout", ")", ";", "delete", "this", ".", "_started", ";", "delete...
Stop the ticker, clearing any currently set timeouts. @returns {Ticker}
[ "Stop", "the", "ticker", "clearing", "any", "currently", "set", "timeouts", "." ]
8cab89af6fa175df5dabce17bf654d163578ce2e
https://github.com/slikts/delta-ticker/blob/8cab89af6fa175df5dabce17bf654d163578ce2e/index.js#L79-L93
51,402
slikts/delta-ticker
index.js
_use
function _use(config) { var _config = this._config; Object.keys(config).forEach(function(key) { _config[key] = config[key]; }); return this; }
javascript
function _use(config) { var _config = this._config; Object.keys(config).forEach(function(key) { _config[key] = config[key]; }); return this; }
[ "function", "_use", "(", "config", ")", "{", "var", "_config", "=", "this", ".", "_config", ";", "Object", ".", "keys", "(", "config", ")", ".", "forEach", "(", "function", "(", "key", ")", "{", "_config", "[", "key", "]", "=", "config", "[", "key"...
Extend the ticker's config. @param {{ limit: Number, async: Boolean, task: Function, stop: Function }} config @returns {Ticker}
[ "Extend", "the", "ticker", "s", "config", "." ]
8cab89af6fa175df5dabce17bf654d163578ce2e
https://github.com/slikts/delta-ticker/blob/8cab89af6fa175df5dabce17bf654d163578ce2e/index.js#L99-L107
51,403
slikts/delta-ticker
index.js
_tick
function _tick() { var config = this._config; var now = Date.now(); var dt = now - this._before; if (!this._started) { // The ticker has been stopped return; } if (config.async) { config.task(this._tock, dt); } else { config.task(dt); this._tock(); } }
javascript
function _tick() { var config = this._config; var now = Date.now(); var dt = now - this._before; if (!this._started) { // The ticker has been stopped return; } if (config.async) { config.task(this._tock, dt); } else { config.task(dt); this._tock(); } }
[ "function", "_tick", "(", ")", "{", "var", "config", "=", "this", ".", "_config", ";", "var", "now", "=", "Date", ".", "now", "(", ")", ";", "var", "dt", "=", "now", "-", "this", ".", "_before", ";", "if", "(", "!", "this", ".", "_started", ")"...
The first part of an iteration that determines how to call the task
[ "The", "first", "part", "of", "an", "iteration", "that", "determines", "how", "to", "call", "the", "task" ]
8cab89af6fa175df5dabce17bf654d163578ce2e
https://github.com/slikts/delta-ticker/blob/8cab89af6fa175df5dabce17bf654d163578ce2e/index.js#L109-L125
51,404
slikts/delta-ticker
index.js
_tock
function _tock() { var config = this._config; var now = Date.now(); var taskTime = now - this._started; // The time it took to finish the last task var delay = Math.max(0, config.delay - (taskTime)); // Delay until the next task is run if (config.limit) { this._count += 1; if (this._co...
javascript
function _tock() { var config = this._config; var now = Date.now(); var taskTime = now - this._started; // The time it took to finish the last task var delay = Math.max(0, config.delay - (taskTime)); // Delay until the next task is run if (config.limit) { this._count += 1; if (this._co...
[ "function", "_tock", "(", ")", "{", "var", "config", "=", "this", ".", "_config", ";", "var", "now", "=", "Date", ".", "now", "(", ")", ";", "var", "taskTime", "=", "now", "-", "this", ".", "_started", ";", "// The time it took to finish the last task", ...
The second part of an iteration that is called after the task is done
[ "The", "second", "part", "of", "an", "iteration", "that", "is", "called", "after", "the", "task", "is", "done" ]
8cab89af6fa175df5dabce17bf654d163578ce2e
https://github.com/slikts/delta-ticker/blob/8cab89af6fa175df5dabce17bf654d163578ce2e/index.js#L128-L148
51,405
tolokoban/ToloFrameWork
ker/mod/interact.js
indexOfDeepestElement
function indexOfDeepestElement (elements) { var dropzone, deepestZone = elements[0], index = deepestZone? 0: -1, parent, deepestZoneParents = [], dropzoneParents = [], child, i, n; for (i = 1; i < elements.l...
javascript
function indexOfDeepestElement (elements) { var dropzone, deepestZone = elements[0], index = deepestZone? 0: -1, parent, deepestZoneParents = [], dropzoneParents = [], child, i, n; for (i = 1; i < elements.l...
[ "function", "indexOfDeepestElement", "(", "elements", ")", "{", "var", "dropzone", ",", "deepestZone", "=", "elements", "[", "0", "]", ",", "index", "=", "deepestZone", "?", "0", ":", "-", "1", ",", "parent", ",", "deepestZoneParents", "=", "[", "]", ","...
Test for the element that's "above" all other qualifiers
[ "Test", "for", "the", "element", "that", "s", "above", "all", "other", "qualifiers" ]
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/interact.js#L1064-L1164
51,406
tolokoban/ToloFrameWork
ker/mod/interact.js
function (pointer, event, eventTarget, curEventTarget, matches, matchElements) { var target = this.target; if (!this.prepared.name && this.mouse) { var action; // update pointer coords for defaultActionChecker to use this.setEventXY(this.curCoor...
javascript
function (pointer, event, eventTarget, curEventTarget, matches, matchElements) { var target = this.target; if (!this.prepared.name && this.mouse) { var action; // update pointer coords for defaultActionChecker to use this.setEventXY(this.curCoor...
[ "function", "(", "pointer", ",", "event", ",", "eventTarget", ",", "curEventTarget", ",", "matches", ",", "matchElements", ")", "{", "var", "target", "=", "this", ".", "target", ";", "if", "(", "!", "this", ".", "prepared", ".", "name", "&&", "this", "...
Check what action would be performed on pointerMove target if a mouse button were pressed and change the cursor accordingly
[ "Check", "what", "action", "would", "be", "performed", "on", "pointerMove", "target", "if", "a", "mouse", "button", "were", "pressed", "and", "change", "the", "cursor", "accordingly" ]
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/interact.js#L1402-L1431
51,407
tolokoban/ToloFrameWork
ker/mod/interact.js
function (dragElement) { // get dropzones and their elements that could receive the draggable var possibleDrops = this.collectDrops(dragElement, true); this.activeDrops.dropzones = possibleDrops.dropzones; this.activeDrops.elements = possibleDrops.elements; ...
javascript
function (dragElement) { // get dropzones and their elements that could receive the draggable var possibleDrops = this.collectDrops(dragElement, true); this.activeDrops.dropzones = possibleDrops.dropzones; this.activeDrops.elements = possibleDrops.elements; ...
[ "function", "(", "dragElement", ")", "{", "// get dropzones and their elements that could receive the draggable", "var", "possibleDrops", "=", "this", ".", "collectDrops", "(", "dragElement", ",", "true", ")", ";", "this", ".", "activeDrops", ".", "dropzones", "=", "p...
Collect a new set of possible drops and save them in activeDrops. setActiveDrops should always be called when a drag has just started or a drag event happens while dynamicDrop is true
[ "Collect", "a", "new", "set", "of", "possible", "drops", "and", "save", "them", "in", "activeDrops", ".", "setActiveDrops", "should", "always", "be", "called", "when", "a", "drag", "has", "just", "started", "or", "a", "drag", "event", "happens", "while", "...
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/interact.js#L2471-L2482
51,408
tolokoban/ToloFrameWork
ker/mod/interact.js
validateAction
function validateAction (action, interactable) { if (!isObject(action)) { return null; } var actionName = action.name, options = interactable.options; if (( (actionName === 'resize' && options.resize.enabled ) || (actionName === 'drag' && options.drag.enabl...
javascript
function validateAction (action, interactable) { if (!isObject(action)) { return null; } var actionName = action.name, options = interactable.options; if (( (actionName === 'resize' && options.resize.enabled ) || (actionName === 'drag' && options.drag.enabl...
[ "function", "validateAction", "(", "action", ",", "interactable", ")", "{", "if", "(", "!", "isObject", "(", "action", ")", ")", "{", "return", "null", ";", "}", "var", "actionName", "=", "action", ".", "name", ",", "options", "=", "interactable", ".", ...
Check if action is enabled globally and the current target supports it If so, return the validated action. Otherwise, return null
[ "Check", "if", "action", "is", "enabled", "globally", "and", "the", "current", "target", "supports", "it", "If", "so", "return", "the", "validated", "action", ".", "Otherwise", "return", "null" ]
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/interact.js#L3753-L3771
51,409
tolokoban/ToloFrameWork
ker/mod/interact.js
delegateListener
function delegateListener (event, useCapture) { var fakeEvent = {}, delegated = delegatedEvents[event.type], eventTarget = getActualElement(event.path ? event.path[0] : event.target), elemen...
javascript
function delegateListener (event, useCapture) { var fakeEvent = {}, delegated = delegatedEvents[event.type], eventTarget = getActualElement(event.path ? event.path[0] : event.target), elemen...
[ "function", "delegateListener", "(", "event", ",", "useCapture", ")", "{", "var", "fakeEvent", "=", "{", "}", ",", "delegated", "=", "delegatedEvents", "[", "event", ".", "type", "]", ",", "eventTarget", "=", "getActualElement", "(", "event", ".", "path", ...
bound to the interactable context when a DOM event listener is added to a selector interactable
[ "bound", "to", "the", "interactable", "context", "when", "a", "DOM", "event", "listener", "is", "added", "to", "a", "selector", "interactable" ]
730845a833a9660ebfdb60ad027ebaab5ac871b6
https://github.com/tolokoban/ToloFrameWork/blob/730845a833a9660ebfdb60ad027ebaab5ac871b6/ker/mod/interact.js#L3789-L3831
51,410
asavoy/grunt-requirejs-auto-bundles
lib/amd.js
modulePathToId
function modulePathToId(path) { // We can only transform if there's no plugin used. if (path.indexOf('!') === -1) { // If it ends with ".js", chop it off. var extension = '.js' if (path.slice(-extension.length) === '.js') { path = path.slice(0, path.length - extension.length)...
javascript
function modulePathToId(path) { // We can only transform if there's no plugin used. if (path.indexOf('!') === -1) { // If it ends with ".js", chop it off. var extension = '.js' if (path.slice(-extension.length) === '.js') { path = path.slice(0, path.length - extension.length)...
[ "function", "modulePathToId", "(", "path", ")", "{", "// We can only transform if there's no plugin used.", "if", "(", "path", ".", "indexOf", "(", "'!'", ")", "===", "-", "1", ")", "{", "// If it ends with \".js\", chop it off.", "var", "extension", "=", "'.js'", "...
Convert a module path into a module ID.
[ "Convert", "a", "module", "path", "into", "a", "module", "ID", "." ]
c0f587c9720943dd32098203d2c71ab1387f1700
https://github.com/asavoy/grunt-requirejs-auto-bundles/blob/c0f587c9720943dd32098203d2c71ab1387f1700/lib/amd.js#L9-L19
51,411
asavoy/grunt-requirejs-auto-bundles
lib/amd.js
moduleSize
function moduleSize(id, paths) { var path = id; var extension = '.js'; // Use `paths:` to resolve an alias. if (paths[id]) { path = paths[id]; } // Does the dependency reference a plugin? if (path.indexOf('!') !== -1) { // Split into plugin and path. var pathParts = p...
javascript
function moduleSize(id, paths) { var path = id; var extension = '.js'; // Use `paths:` to resolve an alias. if (paths[id]) { path = paths[id]; } // Does the dependency reference a plugin? if (path.indexOf('!') !== -1) { // Split into plugin and path. var pathParts = p...
[ "function", "moduleSize", "(", "id", ",", "paths", ")", "{", "var", "path", "=", "id", ";", "var", "extension", "=", "'.js'", ";", "// Use `paths:` to resolve an alias.", "if", "(", "paths", "[", "id", "]", ")", "{", "path", "=", "paths", "[", "id", "]...
Returns the size of a module given its ID. At best this can be considered an estimate because it will return the size before compression, and doesn't take into consideration the effect of plugins. If the module cannot be resolved to a file, returns null.
[ "Returns", "the", "size", "of", "a", "module", "given", "its", "ID", ".", "At", "best", "this", "can", "be", "considered", "an", "estimate", "because", "it", "will", "return", "the", "size", "before", "compression", "and", "doesn", "t", "take", "into", "...
c0f587c9720943dd32098203d2c71ab1387f1700
https://github.com/asavoy/grunt-requirejs-auto-bundles/blob/c0f587c9720943dd32098203d2c71ab1387f1700/lib/amd.js#L42-L77
51,412
jasonsites/proxy-es-aws
src/http/app.js
createHandler
function createHandler(options) { /** * Client request handler * Data from the incoming request (plus options) is forwarded to the AWS module */ return async (ctx) => { const { credentials, endpoint, region } = options const { rawBody: body, header: headers, method, url: path } = ctx.request c...
javascript
function createHandler(options) { /** * Client request handler * Data from the incoming request (plus options) is forwarded to the AWS module */ return async (ctx) => { const { credentials, endpoint, region } = options const { rawBody: body, header: headers, method, url: path } = ctx.request c...
[ "function", "createHandler", "(", "options", ")", "{", "/**\n * Client request handler\n * Data from the incoming request (plus options) is forwarded to the AWS module\n */", "return", "async", "(", "ctx", ")", "=>", "{", "const", "{", "credentials", ",", "endpoint", ",",...
Creates request handler middleware @param {Object} options.credentials - aws credentials object @param {Object} options.endpoint - aws elasticsearch endpoint @param {Object} options.region - aws region
[ "Creates", "request", "handler", "middleware" ]
b2625106d877fea76f74b0b88ed8568a8ff61612
https://github.com/jasonsites/proxy-es-aws/blob/b2625106d877fea76f74b0b88ed8568a8ff61612/src/http/app.js#L54-L74
51,413
jasonsites/proxy-es-aws
src/http/app.js
getInitOptions
async function getInitOptions(args) { const { debug, endpoint, host, port, profile, region } = args const options = { debug, host, port, profile, region } options.endpoint = getAWSEndpoint({ endpoint }) options.credentials = await getAWSCredentials() return options }
javascript
async function getInitOptions(args) { const { debug, endpoint, host, port, profile, region } = args const options = { debug, host, port, profile, region } options.endpoint = getAWSEndpoint({ endpoint }) options.credentials = await getAWSCredentials() return options }
[ "async", "function", "getInitOptions", "(", "args", ")", "{", "const", "{", "debug", ",", "endpoint", ",", "host", ",", "port", ",", "profile", ",", "region", "}", "=", "args", "const", "options", "=", "{", "debug", ",", "host", ",", "port", ",", "pr...
Composes server initialization options from CLI arguments @param {Boolean} args.debug - debug flag @param {String} args.endpoint - aws elasticsearch endpoint @param {String} args.host - proxy host @param {Number} args.port - proxy port @param {String} args.profile - aws credentials profile @param {Strin...
[ "Composes", "server", "initialization", "options", "from", "CLI", "arguments" ]
b2625106d877fea76f74b0b88ed8568a8ff61612
https://github.com/jasonsites/proxy-es-aws/blob/b2625106d877fea76f74b0b88ed8568a8ff61612/src/http/app.js#L86-L92
51,414
jasonsites/proxy-es-aws
src/http/app.js
registerListeners
function registerListeners() { const exit = function exit(signal) { console.log(chalk.bgBlack.yellow(`Received ${signal} => Exiting`)) process.exit() } const SIGABRT = 'SIGABRT' const SIGHUP = 'SIGHUP' const SIGINT = 'SIGINT' const SIGQUIT = 'SIGQUIT' const SIGTERM = 'SIGTERM' process.on(SIGABR...
javascript
function registerListeners() { const exit = function exit(signal) { console.log(chalk.bgBlack.yellow(`Received ${signal} => Exiting`)) process.exit() } const SIGABRT = 'SIGABRT' const SIGHUP = 'SIGHUP' const SIGINT = 'SIGINT' const SIGQUIT = 'SIGQUIT' const SIGTERM = 'SIGTERM' process.on(SIGABR...
[ "function", "registerListeners", "(", ")", "{", "const", "exit", "=", "function", "exit", "(", "signal", ")", "{", "console", ".", "log", "(", "chalk", ".", "bgBlack", ".", "yellow", "(", "`", "${", "signal", "}", "`", ")", ")", "process", ".", "exit...
Register process signal listeners @return {undefined}
[ "Register", "process", "signal", "listeners" ]
b2625106d877fea76f74b0b88ed8568a8ff61612
https://github.com/jasonsites/proxy-es-aws/blob/b2625106d877fea76f74b0b88ed8568a8ff61612/src/http/app.js#L98-L114
51,415
jasonsites/proxy-es-aws
src/http/app.js
stripProxyResHeaders
function stripProxyResHeaders(res) { return Object.entries(res.headers).reduce((memo, header) => { const [key, val] = header const invalid = [undefined, 'connection', 'content-encoding'] if (invalid.indexOf(key) === -1) { memo[key] = val // eslint-disable-line } return memo }, {}) }
javascript
function stripProxyResHeaders(res) { return Object.entries(res.headers).reduce((memo, header) => { const [key, val] = header const invalid = [undefined, 'connection', 'content-encoding'] if (invalid.indexOf(key) === -1) { memo[key] = val // eslint-disable-line } return memo }, {}) }
[ "function", "stripProxyResHeaders", "(", "res", ")", "{", "return", "Object", ".", "entries", "(", "res", ".", "headers", ")", ".", "reduce", "(", "(", "memo", ",", "header", ")", "=>", "{", "const", "[", "key", ",", "val", "]", "=", "header", "const...
Strip connection control and transport encoding headers from the proxy response @param {Object} res - proxy response @return {Object}
[ "Strip", "connection", "control", "and", "transport", "encoding", "headers", "from", "the", "proxy", "response" ]
b2625106d877fea76f74b0b88ed8568a8ff61612
https://github.com/jasonsites/proxy-es-aws/blob/b2625106d877fea76f74b0b88ed8568a8ff61612/src/http/app.js#L121-L130
51,416
goddyZhao/sf-transfer
lib/sf.js
transfer
function transfer(xmlFiles, output, dir, needAppend, _callback){ /** * If needAppend is true, output must be a file but not a directory */ Step( function(){ if(typeof output === 'undefined'){ output = path.dirname(xmlFiles[0]); } output = output.indexOf(path.sep) === 0 ? output :...
javascript
function transfer(xmlFiles, output, dir, needAppend, _callback){ /** * If needAppend is true, output must be a file but not a directory */ Step( function(){ if(typeof output === 'undefined'){ output = path.dirname(xmlFiles[0]); } output = output.indexOf(path.sep) === 0 ? output :...
[ "function", "transfer", "(", "xmlFiles", ",", "output", ",", "dir", ",", "needAppend", ",", "_callback", ")", "{", "/**\n * If needAppend is true, output must be a file but not a directory\n */", "Step", "(", "function", "(", ")", "{", "if", "(", "typeof", "output...
Transfer sf rules in inputs to nproxy rule file @param {Array} xmlFiles xml files @param {String} output output dir or file when append is true @param {String} dir dir in the rule files @param {Boolean} needAppend if true, the transfered rule will be appended
[ "Transfer", "sf", "rules", "in", "inputs", "to", "nproxy", "rule", "file" ]
23d5ebf109f3673b89e2b777e956d6e3eecbdff6
https://github.com/goddyZhao/sf-transfer/blob/23d5ebf109f3673b89e2b777e956d6e3eecbdff6/lib/sf.js#L19-L104
51,417
goddyZhao/sf-transfer
lib/sf.js
transferSingleFile
function transferSingleFile(sfXML, dir, callback){ var xmlParser; var groups; var responders = []; var fileList = []; var entry; var responder; var stat; if(typeof sfXML === 'undefined'){ throw new Error('No input file specified'); } if(!/\.xml$/.test(sfXML)){ throw new Error('Input file ...
javascript
function transferSingleFile(sfXML, dir, callback){ var xmlParser; var groups; var responders = []; var fileList = []; var entry; var responder; var stat; if(typeof sfXML === 'undefined'){ throw new Error('No input file specified'); } if(!/\.xml$/.test(sfXML)){ throw new Error('Input file ...
[ "function", "transferSingleFile", "(", "sfXML", ",", "dir", ",", "callback", ")", "{", "var", "xmlParser", ";", "var", "groups", ";", "var", "responders", "=", "[", "]", ";", "var", "fileList", "=", "[", "]", ";", "var", "entry", ";", "var", "responder...
Transfer the input xml to output js for nproxy @param {String} sfXML file path of sf combo configuration xml file @param {String} dir dir in the rule file
[ "Transfer", "the", "input", "xml", "to", "output", "js", "for", "nproxy" ]
23d5ebf109f3673b89e2b777e956d6e3eecbdff6
https://github.com/goddyZhao/sf-transfer/blob/23d5ebf109f3673b89e2b777e956d6e3eecbdff6/lib/sf.js#L112-L192
51,418
goddyZhao/sf-transfer
lib/sf.js
_getRuleAsString
function _getRuleAsString(responders, callback){ var respondersArr = []; var respondersLen = responders.length; var srcLen; var fileStr; responders.forEach(function(entry, i){ respondersArr.push(TAP + '{'); respondersArr.push(TAP + TAP + 'pattern: \'' + entry.pattern + '\',' + entry.comment); r...
javascript
function _getRuleAsString(responders, callback){ var respondersArr = []; var respondersLen = responders.length; var srcLen; var fileStr; responders.forEach(function(entry, i){ respondersArr.push(TAP + '{'); respondersArr.push(TAP + TAP + 'pattern: \'' + entry.pattern + '\',' + entry.comment); r...
[ "function", "_getRuleAsString", "(", "responders", ",", "callback", ")", "{", "var", "respondersArr", "=", "[", "]", ";", "var", "respondersLen", "=", "responders", ".", "length", ";", "var", "srcLen", ";", "var", "fileStr", ";", "responders", ".", "forEach"...
Get the transferd rules as a string @param {Object} responders the object of responder @param {Function} callback
[ "Get", "the", "transferd", "rules", "as", "a", "string" ]
23d5ebf109f3673b89e2b777e956d6e3eecbdff6
https://github.com/goddyZhao/sf-transfer/blob/23d5ebf109f3673b89e2b777e956d6e3eecbdff6/lib/sf.js#L200-L239
51,419
goddyZhao/sf-transfer
lib/sf.js
_append
function _append(target, rules, isTargetEmpty){ var concatedRules = []; var rulesContent; var l = rules.length; rules.forEach(function(rule, i){ if(i < l - 1){ concatedRules.push(rule + ','); }else{ concatedRules.push(rule + '/*{{more}}*/'); } }); if(isTargetEmpty){ rulesContent...
javascript
function _append(target, rules, isTargetEmpty){ var concatedRules = []; var rulesContent; var l = rules.length; rules.forEach(function(rule, i){ if(i < l - 1){ concatedRules.push(rule + ','); }else{ concatedRules.push(rule + '/*{{more}}*/'); } }); if(isTargetEmpty){ rulesContent...
[ "function", "_append", "(", "target", ",", "rules", ",", "isTargetEmpty", ")", "{", "var", "concatedRules", "=", "[", "]", ";", "var", "rulesContent", ";", "var", "l", "=", "rules", ".", "length", ";", "rules", ".", "forEach", "(", "function", "(", "ru...
Append rules to target one by one @param {String} target @param {Årray} rules @param {Boolean} isTargetEmpty whether the target is empty @api private
[ "Append", "rules", "to", "target", "one", "by", "one" ]
23d5ebf109f3673b89e2b777e956d6e3eecbdff6
https://github.com/goddyZhao/sf-transfer/blob/23d5ebf109f3673b89e2b777e956d6e3eecbdff6/lib/sf.js#L251-L270
51,420
vesln/copycat
index.js
end
function end() { var group = stack.pop(); if (!requests) return; var data = JSON.stringify(requests); var dest = path.join(options.fixtures, group + '.json'); fs.writeFileSync(dest, data, 'utf8'); requests = null; }
javascript
function end() { var group = stack.pop(); if (!requests) return; var data = JSON.stringify(requests); var dest = path.join(options.fixtures, group + '.json'); fs.writeFileSync(dest, data, 'utf8'); requests = null; }
[ "function", "end", "(", ")", "{", "var", "group", "=", "stack", ".", "pop", "(", ")", ";", "if", "(", "!", "requests", ")", "return", ";", "var", "data", "=", "JSON", ".", "stringify", "(", "requests", ")", ";", "var", "dest", "=", "path", ".", ...
End and store the last group. @api public
[ "End", "and", "store", "the", "last", "group", "." ]
a2d7b0172d06afd5d6018fc19990863584767cf8
https://github.com/vesln/copycat/blob/a2d7b0172d06afd5d6018fc19990863584767cf8/index.js#L61-L68
51,421
vesln/copycat
index.js
recorder
function recorder(opts, fn) { var group = stack[stack.length - 1]; var response = null; assert(group, 'please specify copycat group'); recordings = load(group) || []; recordings.forEach(function(recording) { if (!deepEqual(recording.opts, opts)) return; response = recording; }); if (response) {...
javascript
function recorder(opts, fn) { var group = stack[stack.length - 1]; var response = null; assert(group, 'please specify copycat group'); recordings = load(group) || []; recordings.forEach(function(recording) { if (!deepEqual(recording.opts, opts)) return; response = recording; }); if (response) {...
[ "function", "recorder", "(", "opts", ",", "fn", ")", "{", "var", "group", "=", "stack", "[", "stack", ".", "length", "-", "1", "]", ";", "var", "response", "=", "null", ";", "assert", "(", "group", ",", "'please specify copycat group'", ")", ";", "reco...
Request copycat. @param {Object} options @param {Function} fn @api public
[ "Request", "copycat", "." ]
a2d7b0172d06afd5d6018fc19990863584767cf8
https://github.com/vesln/copycat/blob/a2d7b0172d06afd5d6018fc19990863584767cf8/index.js#L78-L99
51,422
vesln/copycat
index.js
load
function load(group) { var dest = path.join(options.fixtures, group + '.json'); var ret = null; var json = null; try { json = fs.readFileSync(dest, 'utf8'); ret = JSON.parse(json); } catch (err) {} return ret; }
javascript
function load(group) { var dest = path.join(options.fixtures, group + '.json'); var ret = null; var json = null; try { json = fs.readFileSync(dest, 'utf8'); ret = JSON.parse(json); } catch (err) {} return ret; }
[ "function", "load", "(", "group", ")", "{", "var", "dest", "=", "path", ".", "join", "(", "options", ".", "fixtures", ",", "group", "+", "'.json'", ")", ";", "var", "ret", "=", "null", ";", "var", "json", "=", "null", ";", "try", "{", "json", "="...
Load stored requests and responses for `group`. @param {Strin} group @returns {Array} @api private
[ "Load", "stored", "requests", "and", "responses", "for", "group", "." ]
a2d7b0172d06afd5d6018fc19990863584767cf8
https://github.com/vesln/copycat/blob/a2d7b0172d06afd5d6018fc19990863584767cf8/index.js#L109-L120
51,423
node-neatly/neatly
lib/bootstrap.js
createRunQueue
function createRunQueue(modules) { return modules .map((mod) => mod._runQueue) .reduce((acc, res) => acc.concat(res), []); }
javascript
function createRunQueue(modules) { return modules .map((mod) => mod._runQueue) .reduce((acc, res) => acc.concat(res), []); }
[ "function", "createRunQueue", "(", "modules", ")", "{", "return", "modules", ".", "map", "(", "(", "mod", ")", "=>", "mod", ".", "_runQueue", ")", ".", "reduce", "(", "(", "acc", ",", "res", ")", "=>", "acc", ".", "concat", "(", "res", ")", ",", ...
Runs recursively through modules and their dependency-modules and creates an array with handlers to invoke later by app-instance after startup. @param {Object} module Module instance @return {Array} Array of run handlers.
[ "Runs", "recursively", "through", "modules", "and", "their", "dependency", "-", "modules", "and", "creates", "an", "array", "with", "handlers", "to", "invoke", "later", "by", "app", "-", "instance", "after", "startup", "." ]
732d9729bce84013b5516fe7c239dd672d138dd8
https://github.com/node-neatly/neatly/blob/732d9729bce84013b5516fe7c239dd672d138dd8/lib/bootstrap.js#L107-L113
51,424
rqt/github
build/api/repos/create.js
create
async function create(options) { const { org, name, description, homepage, license_template, gitignore_template, auto_init = false, } = options const p = org ? `orgs/${org}` : 'user' const endpoint = `/${p}/repos` const { body } = await this._request({ data: { name, ...
javascript
async function create(options) { const { org, name, description, homepage, license_template, gitignore_template, auto_init = false, } = options const p = org ? `orgs/${org}` : 'user' const endpoint = `/${p}/repos` const { body } = await this._request({ data: { name, ...
[ "async", "function", "create", "(", "options", ")", "{", "const", "{", "org", ",", "name", ",", "description", ",", "homepage", ",", "license_template", ",", "gitignore_template", ",", "auto_init", "=", "false", ",", "}", "=", "options", "const", "p", "=",...
Create a new repository for the authenticated user. @param {CreateRepository} options Options to create a repository. @param {string} [options.org] The organisation on which to create the repository (if not adding to the user account). @param {string} options.name The name of the repository. @param {string} [options.de...
[ "Create", "a", "new", "repository", "for", "the", "authenticated", "user", "." ]
e6d3cdd8633628cd4aba30e70d8258aa7f6f0c5a
https://github.com/rqt/github/blob/e6d3cdd8633628cd4aba30e70d8258aa7f6f0c5a/build/api/repos/create.js#L12-L38
51,425
kevinoid/promised-read
lib/timeout-error.js
TimeoutError
function TimeoutError(message) { // Like http://www.ecma-international.org/ecma-262/6.0/#sec-error-message if (!(this instanceof TimeoutError)) { return new TimeoutError(message); } Error.captureStackTrace(this, TimeoutError); if (message !== undefined) { Object.defineProperty(this, 'message', { value...
javascript
function TimeoutError(message) { // Like http://www.ecma-international.org/ecma-262/6.0/#sec-error-message if (!(this instanceof TimeoutError)) { return new TimeoutError(message); } Error.captureStackTrace(this, TimeoutError); if (message !== undefined) { Object.defineProperty(this, 'message', { value...
[ "function", "TimeoutError", "(", "message", ")", "{", "// Like http://www.ecma-international.org/ecma-262/6.0/#sec-error-message", "if", "(", "!", "(", "this", "instanceof", "TimeoutError", ")", ")", "{", "return", "new", "TimeoutError", "(", "message", ")", ";", "}",...
Constructs a TimeoutError. @class Represents an error caused by a timeout expiring. @constructor @param {string=} message Human-readable description of the error.
[ "Constructs", "a", "TimeoutError", "." ]
c6adf477f4a64d5142363d84f7f83f5f07b8f682
https://github.com/kevinoid/promised-read/blob/c6adf477f4a64d5142363d84f7f83f5f07b8f682/lib/timeout-error.js#L16-L27
51,426
mdasberg/grunt-code-quality-report
tasks/code_quality_report.js
parseCoverageResults
function parseCoverageResults(src) { var collector = new istanbul.Collector(); var utils = istanbul.utils; var results = []; grunt.file.expand({filter: 'isFile'}, src).forEach(function (file) { var browser = path.dirname(file).substring(path.dirname(file)...
javascript
function parseCoverageResults(src) { var collector = new istanbul.Collector(); var utils = istanbul.utils; var results = []; grunt.file.expand({filter: 'isFile'}, src).forEach(function (file) { var browser = path.dirname(file).substring(path.dirname(file)...
[ "function", "parseCoverageResults", "(", "src", ")", "{", "var", "collector", "=", "new", "istanbul", ".", "Collector", "(", ")", ";", "var", "utils", "=", "istanbul", ".", "utils", ";", "var", "results", "=", "[", "]", ";", "grunt", ".", "file", ".", ...
Parse the coverage results @param coverage The coverage location. @returns {{coverage: {}}}
[ "Parse", "the", "coverage", "results" ]
065f6e9356b0bbcb8d366e8ae9cbddbd623de872
https://github.com/mdasberg/grunt-code-quality-report/blob/065f6e9356b0bbcb8d366e8ae9cbddbd623de872/tasks/code_quality_report.js#L150-L169
51,427
mdasberg/grunt-code-quality-report
tasks/code_quality_report.js
parseJshintResults
function parseJshintResults(fileName, showDetails) { var result = {}; if (grunt.file.exists(fileName)) { var content = grunt.file.read(fileName); xml2js.parseString(content, {}, function (err, res) { var consoleStatements = content.match(/(cons...
javascript
function parseJshintResults(fileName, showDetails) { var result = {}; if (grunt.file.exists(fileName)) { var content = grunt.file.read(fileName); xml2js.parseString(content, {}, function (err, res) { var consoleStatements = content.match(/(cons...
[ "function", "parseJshintResults", "(", "fileName", ",", "showDetails", ")", "{", "var", "result", "=", "{", "}", ";", "if", "(", "grunt", ".", "file", ".", "exists", "(", "fileName", ")", ")", "{", "var", "content", "=", "grunt", ".", "file", ".", "r...
Parse the jshint results. @param fileName The filename. @returns {{junit: {}}}
[ "Parse", "the", "jshint", "results", "." ]
065f6e9356b0bbcb8d366e8ae9cbddbd623de872
https://github.com/mdasberg/grunt-code-quality-report/blob/065f6e9356b0bbcb8d366e8ae9cbddbd623de872/tasks/code_quality_report.js#L176-L205
51,428
mariusc23/express-query-date
lib/parse.js
parse
function parse(obj, options) { var result = {}, key, value, momentValue; for (key in obj) { if (obj.hasOwnProperty(key)) { value = obj[key]; if (typeof value === 'string' || typeof value === 'number') { momentValue = moment.call(null, value, options.formats, options.stric...
javascript
function parse(obj, options) { var result = {}, key, value, momentValue; for (key in obj) { if (obj.hasOwnProperty(key)) { value = obj[key]; if (typeof value === 'string' || typeof value === 'number') { momentValue = moment.call(null, value, options.formats, options.stric...
[ "function", "parse", "(", "obj", ",", "options", ")", "{", "var", "result", "=", "{", "}", ",", "key", ",", "value", ",", "momentValue", ";", "for", "(", "key", "in", "obj", ")", "{", "if", "(", "obj", ".", "hasOwnProperty", "(", "key", ")", ")",...
Attempts to recursively convert object properties to dates. @param {Object} obj - Object to iterate over. @param {Object} options - Options. @param {Array} options.formats - Array of formats moment should accept. @param {Boolean} options.strict - Whether moment should parse in s...
[ "Attempts", "to", "recursively", "convert", "object", "properties", "to", "dates", "." ]
7aae8448342f13130a3b52807638c34eef882825
https://github.com/mariusc23/express-query-date/blob/7aae8448342f13130a3b52807638c34eef882825/lib/parse.js#L13-L43
51,429
0x333333/wiki-infobox-parser-core
index.js
main
function main(content, callback) { parser(content, function(error, result) { if (error) { callback(error); } else { callback(null, result); } }); }
javascript
function main(content, callback) { parser(content, function(error, result) { if (error) { callback(error); } else { callback(null, result); } }); }
[ "function", "main", "(", "content", ",", "callback", ")", "{", "parser", "(", "content", ",", "function", "(", "error", ",", "result", ")", "{", "if", "(", "error", ")", "{", "callback", "(", "error", ")", ";", "}", "else", "{", "callback", "(", "n...
Wiki Infobox parser main function @method main @param {string} content wiki text to parse @param {function} callback callback function
[ "Wiki", "Infobox", "parser", "main", "function" ]
74fcd4387393b80940945c05f76f2ce8fe1be769
https://github.com/0x333333/wiki-infobox-parser-core/blob/74fcd4387393b80940945c05f76f2ce8fe1be769/index.js#L9-L17
51,430
byron-dupreez/aws-stream-consumer-core
persisting.js
toBatchStateItem
function toBatchStateItem(batch, context) { const states = batch.states; // const messages = batch.allMessages(); const messages = batch.messages; const rejectedMessages = batch.rejectedMessages; const unusableRecords = batch.unusableRecords; // Resolve the messages' states to be saved (if any) const mes...
javascript
function toBatchStateItem(batch, context) { const states = batch.states; // const messages = batch.allMessages(); const messages = batch.messages; const rejectedMessages = batch.rejectedMessages; const unusableRecords = batch.unusableRecords; // Resolve the messages' states to be saved (if any) const mes...
[ "function", "toBatchStateItem", "(", "batch", ",", "context", ")", "{", "const", "states", "=", "batch", ".", "states", ";", "// const messages = batch.allMessages();", "const", "messages", "=", "batch", ".", "messages", ";", "const", "rejectedMessages", "=", "bat...
Converts the given batch into a stream consumer batch state item to be subsequently persisted to DynamoDB. @param {Batch} batch - the batch to be converted into a batch state item @param {StreamProcessing} context - the context to use @returns {BatchStateItem} the stream consumer batch state item
[ "Converts", "the", "given", "batch", "into", "a", "stream", "consumer", "batch", "state", "item", "to", "be", "subsequently", "persisted", "to", "DynamoDB", "." ]
9b256084297f80d373bcf483aaf68a9da176b3d7
https://github.com/byron-dupreez/aws-stream-consumer-core/blob/9b256084297f80d373bcf483aaf68a9da176b3d7/persisting.js#L225-L254
51,431
byron-dupreez/aws-stream-consumer-core
persisting.js
toStorableMessageState
function toStorableMessageState(messageState, message, context) { if (!messageState) { context.warn(`Skipping save of state for message, since it has no state - message (${JSON.stringify(message)})`); return undefined; } // Convert the message's state into a safely storable object to get a clean, simplif...
javascript
function toStorableMessageState(messageState, message, context) { if (!messageState) { context.warn(`Skipping save of state for message, since it has no state - message (${JSON.stringify(message)})`); return undefined; } // Convert the message's state into a safely storable object to get a clean, simplif...
[ "function", "toStorableMessageState", "(", "messageState", ",", "message", ",", "context", ")", "{", "if", "(", "!", "messageState", ")", "{", "context", ".", "warn", "(", "`", "${", "JSON", ".", "stringify", "(", "message", ")", "}", "`", ")", ";", "r...
Converts the given message state into a storable version of itself. @param {MessageState} messageState @param {Message} message @param {StreamProcessing} context @return {MessageStateItem|undefined}
[ "Converts", "the", "given", "message", "state", "into", "a", "storable", "version", "of", "itself", "." ]
9b256084297f80d373bcf483aaf68a9da176b3d7
https://github.com/byron-dupreez/aws-stream-consumer-core/blob/9b256084297f80d373bcf483aaf68a9da176b3d7/persisting.js#L263-L299
51,432
byron-dupreez/aws-stream-consumer-core
persisting.js
toStorableUnusableRecordState
function toStorableUnusableRecordState(unusableRecordState, unusableRecord, context) { if (!unusableRecordState) { context.warn(`Skipping save of state for unusable record, since it has no state - record (${JSON.stringify(unusableRecord)})`); return undefined; } // Convert the record's state into a safel...
javascript
function toStorableUnusableRecordState(unusableRecordState, unusableRecord, context) { if (!unusableRecordState) { context.warn(`Skipping save of state for unusable record, since it has no state - record (${JSON.stringify(unusableRecord)})`); return undefined; } // Convert the record's state into a safel...
[ "function", "toStorableUnusableRecordState", "(", "unusableRecordState", ",", "unusableRecord", ",", "context", ")", "{", "if", "(", "!", "unusableRecordState", ")", "{", "context", ".", "warn", "(", "`", "${", "JSON", ".", "stringify", "(", "unusableRecord", ")...
Converts the given unusable record state into a storable version of itself. @param {UnusableRecordState} unusableRecordState @param {UnusableRecord|undefined} unusableRecord @param {StreamProcessing} context @return {UnusableRecordStateItem|undefined}
[ "Converts", "the", "given", "unusable", "record", "state", "into", "a", "storable", "version", "of", "itself", "." ]
9b256084297f80d373bcf483aaf68a9da176b3d7
https://github.com/byron-dupreez/aws-stream-consumer-core/blob/9b256084297f80d373bcf483aaf68a9da176b3d7/persisting.js#L308-L342
51,433
byron-dupreez/aws-stream-consumer-core
persisting.js
updateBatchWithPriorState
function updateBatchWithPriorState(batch, item, context) { restoreMessageAndRejectedMessageStates(batch, item, context); restoreUnusableRecordStates(batch, item, context); }
javascript
function updateBatchWithPriorState(batch, item, context) { restoreMessageAndRejectedMessageStates(batch, item, context); restoreUnusableRecordStates(batch, item, context); }
[ "function", "updateBatchWithPriorState", "(", "batch", ",", "item", ",", "context", ")", "{", "restoreMessageAndRejectedMessageStates", "(", "batch", ",", "item", ",", "context", ")", ";", "restoreUnusableRecordStates", "(", "batch", ",", "item", ",", "context", "...
Updates the given batch with the previous message states, previous unusable record states and previous batch state on the given item, which was loaded from the database. @param {Batch} batch - the batch to update @param {BatchStateItem} item - a previously loaded batch state item @param context
[ "Updates", "the", "given", "batch", "with", "the", "previous", "message", "states", "previous", "unusable", "record", "states", "and", "previous", "batch", "state", "on", "the", "given", "item", "which", "was", "loaded", "from", "the", "database", "." ]
9b256084297f80d373bcf483aaf68a9da176b3d7
https://github.com/byron-dupreez/aws-stream-consumer-core/blob/9b256084297f80d373bcf483aaf68a9da176b3d7/persisting.js#L447-L450
51,434
byron-dupreez/aws-stream-consumer-core
persisting.js
hasMessageIdentifier
function hasMessageIdentifier(msgState) { const md5s = msgState.md5s; return isNotBlank(msgState.eventID) || // isNotBlank(msgState.eventSeqNo) || isNotBlank(msgState.eventSubSeqNo) || (msgState.idVals && msgState.idVals.some(isNotBlank)) || ((msgState.keyVals && msgState.keyVals.some(isNotBlank)) && ...
javascript
function hasMessageIdentifier(msgState) { const md5s = msgState.md5s; return isNotBlank(msgState.eventID) || // isNotBlank(msgState.eventSeqNo) || isNotBlank(msgState.eventSubSeqNo) || (msgState.idVals && msgState.idVals.some(isNotBlank)) || ((msgState.keyVals && msgState.keyVals.some(isNotBlank)) && ...
[ "function", "hasMessageIdentifier", "(", "msgState", ")", "{", "const", "md5s", "=", "msgState", ".", "md5s", ";", "return", "isNotBlank", "(", "msgState", ".", "eventID", ")", "||", "// isNotBlank(msgState.eventSeqNo) || isNotBlank(msgState.eventSubSeqNo) ||", "(", "ms...
Returns true if the given message state has at least one non-blank identifier; otherwise false. @param {MessageState} msgState - the tracked state of a message @return {boolean}
[ "Returns", "true", "if", "the", "given", "message", "state", "has", "at", "least", "one", "non", "-", "blank", "identifier", ";", "otherwise", "false", "." ]
9b256084297f80d373bcf483aaf68a9da176b3d7
https://github.com/byron-dupreez/aws-stream-consumer-core/blob/9b256084297f80d373bcf483aaf68a9da176b3d7/persisting.js#L457-L464
51,435
byron-dupreez/aws-stream-consumer-core
persisting.js
hasUnusableRecordIdentifier
function hasUnusableRecordIdentifier(recState) { const md5s = recState.md5s; return isNotBlank(recState.eventID) || // isNotBlank(recState.eventSeqNo) || isNotBlank(recState.eventSubSeqNo) || (md5s && (isNotBlank(md5s.userRec) || isNotBlank(md5s.rec) || isNotBlank(md5s.data))); }
javascript
function hasUnusableRecordIdentifier(recState) { const md5s = recState.md5s; return isNotBlank(recState.eventID) || // isNotBlank(recState.eventSeqNo) || isNotBlank(recState.eventSubSeqNo) || (md5s && (isNotBlank(md5s.userRec) || isNotBlank(md5s.rec) || isNotBlank(md5s.data))); }
[ "function", "hasUnusableRecordIdentifier", "(", "recState", ")", "{", "const", "md5s", "=", "recState", ".", "md5s", ";", "return", "isNotBlank", "(", "recState", ".", "eventID", ")", "||", "// isNotBlank(recState.eventSeqNo) || isNotBlank(recState.eventSubSeqNo) ||", "("...
Returns true if the given unusable record state has at least one non-blank identifier; otherwise false. @param {UnusableRecordState} recState - the tracked state of an unusable record @return {boolean}
[ "Returns", "true", "if", "the", "given", "unusable", "record", "state", "has", "at", "least", "one", "non", "-", "blank", "identifier", ";", "otherwise", "false", "." ]
9b256084297f80d373bcf483aaf68a9da176b3d7
https://github.com/byron-dupreez/aws-stream-consumer-core/blob/9b256084297f80d373bcf483aaf68a9da176b3d7/persisting.js#L489-L493
51,436
appcelerator-archive/appc-connector-utils
lib/tools/dataValidator.js
validate
function validate (data, schema) { if (!data || !schema) { throw new Error('Trying to validate without passing data and schema') } return Joi.validate(data, schema) }
javascript
function validate (data, schema) { if (!data || !schema) { throw new Error('Trying to validate without passing data and schema') } return Joi.validate(data, schema) }
[ "function", "validate", "(", "data", ",", "schema", ")", "{", "if", "(", "!", "data", "||", "!", "schema", ")", "{", "throw", "new", "Error", "(", "'Trying to validate without passing data and schema'", ")", "}", "return", "Joi", ".", "validate", "(", "data"...
Validates data based on Joi schemas @param {Object} data the data to be validated @param {Object} schema the object schema specified in Joi against which data is validated
[ "Validates", "data", "based", "on", "Joi", "schemas" ]
4af3bb7d24c5780270d7ba0ec98017b1f58f1aa8
https://github.com/appcelerator-archive/appc-connector-utils/blob/4af3bb7d24c5780270d7ba0ec98017b1f58f1aa8/lib/tools/dataValidator.js#L13-L18
51,437
esiglabs/eslutils
build/validation.js
verifyChain
function verifyChain(certificate, chain, trustedCAs) { if (certificate === null) return Promise.resolve(false); return Promise.resolve().then(function () { var certificateChainEngine = new pkijs.CertificateChainValidationEngine({ certs: chain, trustedCerts: trustedCAs.filter(function (cert) { ...
javascript
function verifyChain(certificate, chain, trustedCAs) { if (certificate === null) return Promise.resolve(false); return Promise.resolve().then(function () { var certificateChainEngine = new pkijs.CertificateChainValidationEngine({ certs: chain, trustedCerts: trustedCAs.filter(function (cert) { ...
[ "function", "verifyChain", "(", "certificate", ",", "chain", ",", "trustedCAs", ")", "{", "if", "(", "certificate", "===", "null", ")", "return", "Promise", ".", "resolve", "(", "false", ")", ";", "return", "Promise", ".", "resolve", "(", ")", ".", "then...
Verify if a certificate chains to some trusted CAs. @param {pkijs.Certificate} certificate - The certificate that will be checked. @param {Array<pkijs.Certificate>} chain - Additional certificates in the chain. @param {Array<pkijs.Certificate>} trustedCAs - The trusted CAs @return {Promise<boolean>} A promise that is r...
[ "Verify", "if", "a", "certificate", "chains", "to", "some", "trusted", "CAs", "." ]
00ff5967fd37c27235e25e583ee17008d4c3ce8a
https://github.com/esiglabs/eslutils/blob/00ff5967fd37c27235e25e583ee17008d4c3ce8a/build/validation.js#L24-L42
51,438
prezzemolo/accettare
index.js
getProperties
function getProperties (header) { return header.split(',').map((split) => { const components = split.replace(/\s+/, '').split(';'); const priorityRegex = /^q=([0-1](\.[0-9]{1,3})?)$/; /* assign null to priority when invaild quarity values */ return { lang: components[0],...
javascript
function getProperties (header) { return header.split(',').map((split) => { const components = split.replace(/\s+/, '').split(';'); const priorityRegex = /^q=([0-1](\.[0-9]{1,3})?)$/; /* assign null to priority when invaild quarity values */ return { lang: components[0],...
[ "function", "getProperties", "(", "header", ")", "{", "return", "header", ".", "split", "(", "','", ")", ".", "map", "(", "(", "split", ")", "=>", "{", "const", "components", "=", "split", ".", "replace", "(", "/", "\\s+", "/", ",", "''", ")", ".",...
analyze HTTP accept-language header @param {string} header @return {array}
[ "analyze", "HTTP", "accept", "-", "language", "header" ]
8a75066f1ee69c2a6d282a424b8401208b9159d2
https://github.com/prezzemolo/accettare/blob/8a75066f1ee69c2a6d282a424b8401208b9159d2/index.js#L45-L60
51,439
prezzemolo/accettare
index.js
matchAccept
function matchAccept (properties, langs) { let match = null; let priority = 0; base: for(const lang of langs) { for (const property of properties) { if (property.priority === 0) { break; } if (priority < property.priority){ if (la...
javascript
function matchAccept (properties, langs) { let match = null; let priority = 0; base: for(const lang of langs) { for (const property of properties) { if (property.priority === 0) { break; } if (priority < property.priority){ if (la...
[ "function", "matchAccept", "(", "properties", ",", "langs", ")", "{", "let", "match", "=", "null", ";", "let", "priority", "=", "0", ";", "base", ":", "for", "(", "const", "lang", "of", "langs", ")", "{", "for", "(", "const", "property", "of", "prope...
search match by BCP47 Objects @param {Array} properties @param {Array} langs @return {string}
[ "search", "match", "by", "BCP47", "Objects" ]
8a75066f1ee69c2a6d282a424b8401208b9159d2
https://github.com/prezzemolo/accettare/blob/8a75066f1ee69c2a6d282a424b8401208b9159d2/index.js#L68-L94
51,440
nearform/docker-container
lib/dockerBuilder.js
function() { var stat = fs.existsSync('/var/run/docker.sock'); if (!stat) { stat = process.env.DOCKER_HOST || false; } return stat; }
javascript
function() { var stat = fs.existsSync('/var/run/docker.sock'); if (!stat) { stat = process.env.DOCKER_HOST || false; } return stat; }
[ "function", "(", ")", "{", "var", "stat", "=", "fs", ".", "existsSync", "(", "'/var/run/docker.sock'", ")", ";", "if", "(", "!", "stat", ")", "{", "stat", "=", "process", ".", "env", ".", "DOCKER_HOST", "||", "false", ";", "}", "return", "stat", ";",...
check that docker is able to run on this system
[ "check", "that", "docker", "is", "able", "to", "run", "on", "this", "system" ]
724ff6a9d8d3c116f9a6b8239594c4b5cd5e8e17
https://github.com/nearform/docker-container/blob/724ff6a9d8d3c116f9a6b8239594c4b5cd5e8e17/lib/dockerBuilder.js#L36-L42
51,441
vmarkdown/vremark-parse
packages/vremark-toc/mdast-util-toc/lib/contents.js
contents
function contents(map, tight) { var minDepth = Infinity; var index = -1; var length = map.length; var table; /* * Find minimum depth. */ while (++index < length) { if (map[index].depth < minDepth) { minDepth = map[index].depth; } } /* * Norma...
javascript
function contents(map, tight) { var minDepth = Infinity; var index = -1; var length = map.length; var table; /* * Find minimum depth. */ while (++index < length) { if (map[index].depth < minDepth) { minDepth = map[index].depth; } } /* * Norma...
[ "function", "contents", "(", "map", ",", "tight", ")", "{", "var", "minDepth", "=", "Infinity", ";", "var", "index", "=", "-", "1", ";", "var", "length", "=", "map", ".", "length", ";", "var", "table", ";", "/*\n * Find minimum depth.\n */", "while...
Transform a list of heading objects to a markdown list. @param {Array.<Object>} map - Heading-map to insert. @param {boolean?} [tight] - Prefer tight list-items. @return {Object} - List node.
[ "Transform", "a", "list", "of", "heading", "objects", "to", "a", "markdown", "list", "." ]
d7b353dcb5d021eeceb40f3c505ece893202db7a
https://github.com/vmarkdown/vremark-parse/blob/d7b353dcb5d021eeceb40f3c505ece893202db7a/packages/vremark-toc/mdast-util-toc/lib/contents.js#L23-L66
51,442
marcojonker/data-elevator
lib/utils/command-line-utils.js
function() { var cmdArguments = process.argv.slice(2) var lookup = { values: [], keyValues: {} }; cmdArguments.forEach(function(cmdArgument) { var keyValue = cmdArgument.split('='); //Flag of key value type if(typeof keyValue[0] === 'string' && keyValue[0].ch...
javascript
function() { var cmdArguments = process.argv.slice(2) var lookup = { values: [], keyValues: {} }; cmdArguments.forEach(function(cmdArgument) { var keyValue = cmdArgument.split('='); //Flag of key value type if(typeof keyValue[0] === 'string' && keyValue[0].ch...
[ "function", "(", ")", "{", "var", "cmdArguments", "=", "process", ".", "argv", ".", "slice", "(", "2", ")", "var", "lookup", "=", "{", "values", ":", "[", "]", ",", "keyValues", ":", "{", "}", "}", ";", "cmdArguments", ".", "forEach", "(", "functio...
Create lookup table for process arguments @result object
[ "Create", "lookup", "table", "for", "process", "arguments" ]
7d56e5b2e8ca24b9576066e5265713db6452f289
https://github.com/marcojonker/data-elevator/blob/7d56e5b2e8ca24b9576066e5265713db6452f289/lib/utils/command-line-utils.js#L25-L46
51,443
Psychopoulet/node-promfs
lib/extends/_directoryToStream.js
_directoryToStream
function _directoryToStream (directory, separator, callback) { if ("undefined" === typeof directory) { throw new ReferenceError("missing \"directory\" argument"); } else if ("string" !== typeof directory) { throw new TypeError("\"directory\" argument is not a string"); } else if ("" === dire...
javascript
function _directoryToStream (directory, separator, callback) { if ("undefined" === typeof directory) { throw new ReferenceError("missing \"directory\" argument"); } else if ("string" !== typeof directory) { throw new TypeError("\"directory\" argument is not a string"); } else if ("" === dire...
[ "function", "_directoryToStream", "(", "directory", ",", "separator", ",", "callback", ")", "{", "if", "(", "\"undefined\"", "===", "typeof", "directory", ")", "{", "throw", "new", "ReferenceError", "(", "\"missing \\\"directory\\\" argument\"", ")", ";", "}", "el...
methods Async directoryToStream @param {string} directory : directory to work with @param {string} separator : used to separate content (can be "") @param {function|null} callback : operation's result @returns {void}
[ "methods", "Async", "directoryToStream" ]
016e272fc58c6ef6eae5ea551a0e8873f0ac20cc
https://github.com/Psychopoulet/node-promfs/blob/016e272fc58c6ef6eae5ea551a0e8873f0ac20cc/lib/extends/_directoryToStream.js#L23-L51
51,444
dominhhai/express-authen
index.js
requireLogin
function requireLogin (options) { // merge with default options options = mergeOptions({ 'login': '/login', 'home': '/', 'user': 'user', 'referer': 'referer', 'excepts': [] }, options) // add login to except page options.excepts.push(options.login) return function(req, res, next) { var url = req.orig...
javascript
function requireLogin (options) { // merge with default options options = mergeOptions({ 'login': '/login', 'home': '/', 'user': 'user', 'referer': 'referer', 'excepts': [] }, options) // add login to except page options.excepts.push(options.login) return function(req, res, next) { var url = req.orig...
[ "function", "requireLogin", "(", "options", ")", "{", "// merge with default options", "options", "=", "mergeOptions", "(", "{", "'login'", ":", "'/login'", ",", "'home'", ":", "'/'", ",", "'user'", ":", "'user'", ",", "'referer'", ":", "'referer'", ",", "'exc...
Control direct page when require auth. 1. Auto redirect to login page when non-logged in user access the required-auth page 2. Save the referer into session @param {Object} middleware options @login: login page path @home: default redirected page after logged-in @excepts: non-required auth page @user: session' key for...
[ "Control", "direct", "page", "when", "require", "auth", ".", "1", ".", "Auto", "redirect", "to", "login", "page", "when", "non", "-", "logged", "in", "user", "access", "the", "required", "-", "auth", "page", "2", ".", "Save", "the", "referer", "into", ...
4ad4ee97087544a17c9cd87fb15c4abb06dfefcc
https://github.com/dominhhai/express-authen/blob/4ad4ee97087544a17c9cd87fb15c4abb06dfefcc/index.js#L26-L59
51,445
realm-js/realm-router
backend.js
Dispatcher
function Dispatcher(req, res, next) { _classCallCheck(this, Dispatcher); this.req = req; this.res = res; this.next = next; }
javascript
function Dispatcher(req, res, next) { _classCallCheck(this, Dispatcher); this.req = req; this.res = res; this.next = next; }
[ "function", "Dispatcher", "(", "req", ",", "res", ",", "next", ")", "{", "_classCallCheck", "(", "this", ",", "Dispatcher", ")", ";", "this", ".", "req", "=", "req", ";", "this", ".", "res", "=", "res", ";", "this", ".", "next", "=", "next", ";", ...
constructor - description @param {type} req description @param {type} res description @param {type} next description @return {type} description
[ "constructor", "-", "description" ]
91c1d8b69c4b29fd5791cc98b8403cda038b544f
https://github.com/realm-js/realm-router/blob/91c1d8b69c4b29fd5791cc98b8403cda038b544f/backend.js#L113-L119
51,446
create-conform/allume
bin/allume.js
getUrlParameters
function getUrlParameters() { var params = [ "allume" ]; location.search.substr(1).split("&").forEach(function (part) { if (!part) return; var item = part.split("="); params.push(decodeURIComponent(item[0])); }); return params; }
javascript
function getUrlParameters() { var params = [ "allume" ]; location.search.substr(1).split("&").forEach(function (part) { if (!part) return; var item = part.split("="); params.push(decodeURIComponent(item[0])); }); return params; }
[ "function", "getUrlParameters", "(", ")", "{", "var", "params", "=", "[", "\"allume\"", "]", ";", "location", ".", "search", ".", "substr", "(", "1", ")", ".", "split", "(", "\"&\"", ")", ".", "forEach", "(", "function", "(", "part", ")", "{", "if", ...
getUrlParameters Returns url parameters if running inside browser, else returns an array containing one string; which is the name of the command invoked 'allume' to be compatible with CLI runtimes.
[ "getUrlParameters", "Returns", "url", "parameters", "if", "running", "inside", "browser", "else", "returns", "an", "array", "containing", "one", "string", ";", "which", "is", "the", "name", "of", "the", "command", "invoked", "allume", "to", "be", "compatible", ...
5fdc87804f1e2309c155d001e64d23029c781491
https://github.com/create-conform/allume/blob/5fdc87804f1e2309c155d001e64d23029c781491/bin/allume.js#L77-L85
51,447
create-conform/allume
bin/allume.js
getNodeParameters
function getNodeParameters() { return typeof process !== "undefined" && process.argv && process.argv.length > 1 ? process.argv.slice(1) : null; }
javascript
function getNodeParameters() { return typeof process !== "undefined" && process.argv && process.argv.length > 1 ? process.argv.slice(1) : null; }
[ "function", "getNodeParameters", "(", ")", "{", "return", "typeof", "process", "!==", "\"undefined\"", "&&", "process", ".", "argv", "&&", "process", ".", "argv", ".", "length", ">", "1", "?", "process", ".", "argv", ".", "slice", "(", "1", ")", ":", "...
getNodeParameters Returns cli parameters when running from inside node.js, else returns null.
[ "getNodeParameters", "Returns", "cli", "parameters", "when", "running", "from", "inside", "node", ".", "js", "else", "returns", "null", "." ]
5fdc87804f1e2309c155d001e64d23029c781491
https://github.com/create-conform/allume/blob/5fdc87804f1e2309c155d001e64d23029c781491/bin/allume.js#L106-L108
51,448
redisjs/jsr-server
lib/command/pubsub/pubsub.js
channels
function channels(req, res) { res.send(null, this.state.pubsub.getChannels(req.args[0])); }
javascript
function channels(req, res) { res.send(null, this.state.pubsub.getChannels(req.args[0])); }
[ "function", "channels", "(", "req", ",", "res", ")", "{", "res", ".", "send", "(", "null", ",", "this", ".", "state", ".", "pubsub", ".", "getChannels", "(", "req", ".", "args", "[", "0", "]", ")", ")", ";", "}" ]
Respond to the CHANNELS subcommand.
[ "Respond", "to", "the", "CHANNELS", "subcommand", "." ]
49413052d3039524fbdd2ade0ef9bae26cb4d647
https://github.com/redisjs/jsr-server/blob/49413052d3039524fbdd2ade0ef9bae26cb4d647/lib/command/pubsub/pubsub.js#L19-L21
51,449
redisjs/jsr-server
lib/command/pubsub/pubsub.js
numsub
function numsub(req, res) { res.send(null, this.state.pubsub.getChannelList(req.args)); }
javascript
function numsub(req, res) { res.send(null, this.state.pubsub.getChannelList(req.args)); }
[ "function", "numsub", "(", "req", ",", "res", ")", "{", "res", ".", "send", "(", "null", ",", "this", ".", "state", ".", "pubsub", ".", "getChannelList", "(", "req", ".", "args", ")", ")", ";", "}" ]
Respond to the NUMSUB subcommand.
[ "Respond", "to", "the", "NUMSUB", "subcommand", "." ]
49413052d3039524fbdd2ade0ef9bae26cb4d647
https://github.com/redisjs/jsr-server/blob/49413052d3039524fbdd2ade0ef9bae26cb4d647/lib/command/pubsub/pubsub.js#L26-L28
51,450
redisjs/jsr-server
lib/command/pubsub/pubsub.js
validate
function validate(cmd, args, info) { AbstractCommand.prototype.validate.apply(this, arguments); var sub = info.command.sub , cmd = sub.cmd , args = sub.args if(('' + cmd) === Constants.SUBCOMMAND.pubsub.channels.name) { if(args.length > 1) { throw UnknownSubcommand; } } }
javascript
function validate(cmd, args, info) { AbstractCommand.prototype.validate.apply(this, arguments); var sub = info.command.sub , cmd = sub.cmd , args = sub.args if(('' + cmd) === Constants.SUBCOMMAND.pubsub.channels.name) { if(args.length > 1) { throw UnknownSubcommand; } } }
[ "function", "validate", "(", "cmd", ",", "args", ",", "info", ")", "{", "AbstractCommand", ".", "prototype", ".", "validate", ".", "apply", "(", "this", ",", "arguments", ")", ";", "var", "sub", "=", "info", ".", "command", ".", "sub", ",", "cmd", "=...
Validate the PUBSUB subcommands.
[ "Validate", "the", "PUBSUB", "subcommands", "." ]
49413052d3039524fbdd2ade0ef9bae26cb4d647
https://github.com/redisjs/jsr-server/blob/49413052d3039524fbdd2ade0ef9bae26cb4d647/lib/command/pubsub/pubsub.js#L40-L50
51,451
Nazariglez/perenquen
lib/pixi/src/filters/gray/GrayFilter.js
GrayFilter
function GrayFilter() { core.AbstractFilter.call(this, // vertex shader null, // fragment shader fs.readFileSync(__dirname + '/gray.frag', 'utf8'), // set the uniforms { gray: { type: '1f', value: 1 } } ); }
javascript
function GrayFilter() { core.AbstractFilter.call(this, // vertex shader null, // fragment shader fs.readFileSync(__dirname + '/gray.frag', 'utf8'), // set the uniforms { gray: { type: '1f', value: 1 } } ); }
[ "function", "GrayFilter", "(", ")", "{", "core", ".", "AbstractFilter", ".", "call", "(", "this", ",", "// vertex shader", "null", ",", "// fragment shader", "fs", ".", "readFileSync", "(", "__dirname", "+", "'/gray.frag'", ",", "'utf8'", ")", ",", "// set the...
This greyscales the palette of your Display Objects. @class @extends AbstractFilter @memberof PIXI.filters
[ "This", "greyscales", "the", "palette", "of", "your", "Display", "Objects", "." ]
e023964d05afeefebdcac4e2044819fdfa3899ae
https://github.com/Nazariglez/perenquen/blob/e023964d05afeefebdcac4e2044819fdfa3899ae/lib/pixi/src/filters/gray/GrayFilter.js#L12-L24
51,452
Nazariglez/perenquen
lib/pixi/src/core/textures/Texture.js
Texture
function Texture(baseTexture, frame, crop, trim, rotate) { EventEmitter.call(this); /** * Does this Texture have any frame data assigned to it? * * @member {boolean} */ this.noFrame = false; if (!frame) { this.noFrame = true; frame = new math.Rectangle(0, 0, 1, ...
javascript
function Texture(baseTexture, frame, crop, trim, rotate) { EventEmitter.call(this); /** * Does this Texture have any frame data assigned to it? * * @member {boolean} */ this.noFrame = false; if (!frame) { this.noFrame = true; frame = new math.Rectangle(0, 0, 1, ...
[ "function", "Texture", "(", "baseTexture", ",", "frame", ",", "crop", ",", "trim", ",", "rotate", ")", "{", "EventEmitter", ".", "call", "(", "this", ")", ";", "/**\n * Does this Texture have any frame data assigned to it?\n *\n * @member {boolean}\n */", ...
A texture stores the information that represents an image or part of an image. It cannot be added to the display list directly. Instead use it as the texture for a Sprite. If no frame is provided then the whole image is used. You can directly create a texture from an image and then reuse it multiple times like this : ...
[ "A", "texture", "stores", "the", "information", "that", "represents", "an", "image", "or", "part", "of", "an", "image", ".", "It", "cannot", "be", "added", "to", "the", "display", "list", "directly", ".", "Instead", "use", "it", "as", "the", "texture", "...
e023964d05afeefebdcac4e2044819fdfa3899ae
https://github.com/Nazariglez/perenquen/blob/e023964d05afeefebdcac4e2044819fdfa3899ae/lib/pixi/src/core/textures/Texture.js#L28-L141
51,453
mobilehero-archive/aplus-babel
aplus-babel.js
plugin
function plugin(params) { logger = params.logger; params.dirname = params.dirname ? _.template(params.dirname)(params) : params.event.dir.resourcesPlatform; logger.trace("running babel in directory: " + params.dirname); _.defaults(params, { options: {}, includes: ["**/*.js", "!backbone.js"] }); if (params...
javascript
function plugin(params) { logger = params.logger; params.dirname = params.dirname ? _.template(params.dirname)(params) : params.event.dir.resourcesPlatform; logger.trace("running babel in directory: " + params.dirname); _.defaults(params, { options: {}, includes: ["**/*.js", "!backbone.js"] }); if (params...
[ "function", "plugin", "(", "params", ")", "{", "logger", "=", "params", ".", "logger", ";", "params", ".", "dirname", "=", "params", ".", "dirname", "?", "_", ".", "template", "(", "params", ".", "dirname", ")", "(", "params", ")", ":", "params", "."...
Run babel tranformations on Alloy source code @param {Object} params - parameters available for executing of Alloy+ plugin. @param {Object} params.event - Provides a set of objects and values which may be useful for building tasks: @param {Object} params.event.alloyConfig - Contains Alloy compiler configuration inform...
[ "Run", "babel", "tranformations", "on", "Alloy", "source", "code" ]
83c8bca88e9059a60e3bc960bdfaefd7475c8042
https://github.com/mobilehero-archive/aplus-babel/blob/83c8bca88e9059a60e3bc960bdfaefd7475c8042/aplus-babel.js#L84-L104
51,454
mobilehero-archive/aplus-babel
aplus-babel.js
transformFile
function transformFile(filepath, options) { logger.trace("transforming file - " + filepath); var content = fs.readFileSync(filepath, 'utf8'); var result = transformCode(content, options); fs.writeFileSync(filepath, result); }
javascript
function transformFile(filepath, options) { logger.trace("transforming file - " + filepath); var content = fs.readFileSync(filepath, 'utf8'); var result = transformCode(content, options); fs.writeFileSync(filepath, result); }
[ "function", "transformFile", "(", "filepath", ",", "options", ")", "{", "logger", ".", "trace", "(", "\"transforming file - \"", "+", "filepath", ")", ";", "var", "content", "=", "fs", ".", "readFileSync", "(", "filepath", ",", "'utf8'", ")", ";", "var", "...
Transform a file with babeljs using babel config @param {string} filepath - absolute path of the file to be transformed @param {Object} options - babel configuration object (see http://babeljs.io/docs/usage/options/) @param {string[]} [options.presets=[]] - List of presets (a set of plugins) to load and use.. @param {...
[ "Transform", "a", "file", "with", "babeljs", "using", "babel", "config" ]
83c8bca88e9059a60e3bc960bdfaefd7475c8042
https://github.com/mobilehero-archive/aplus-babel/blob/83c8bca88e9059a60e3bc960bdfaefd7475c8042/aplus-babel.js#L197-L202
51,455
mobilehero-archive/aplus-babel
aplus-babel.js
transformCode
function transformCode(code, options) { var result = babel.transform(code, options); var modified = result.code; return modified; }
javascript
function transformCode(code, options) { var result = babel.transform(code, options); var modified = result.code; return modified; }
[ "function", "transformCode", "(", "code", ",", "options", ")", "{", "var", "result", "=", "babel", ".", "transform", "(", "code", ",", "options", ")", ";", "var", "modified", "=", "result", ".", "code", ";", "return", "modified", ";", "}" ]
Transform the code with bablejs using babel config. @param {string} code - code to transform using babeljs @param {Object} options - babel configuration object (see http://babeljs.io/docs/usage/options/) @param {string[]} [options.presets=[]] - List of presets (a set of plugins) to load and use.. @param {string[]} [op...
[ "Transform", "the", "code", "with", "bablejs", "using", "babel", "config", "." ]
83c8bca88e9059a60e3bc960bdfaefd7475c8042
https://github.com/mobilehero-archive/aplus-babel/blob/83c8bca88e9059a60e3bc960bdfaefd7475c8042/aplus-babel.js#L218-L222
51,456
benaston/kwire
dist/kwire.js
kwire
function kwire(appRoot, globalShadow) { appRoot = appRoot == null ? {} : appRoot; globalShadow = globalShadow || window; if (typeof appRoot !== 'object') { throw 'root object must be an object.' } if (isServerSide() || isUsingRequireJS() || rootIsAlreadyConfigured(globalShadow)) { return; } ...
javascript
function kwire(appRoot, globalShadow) { appRoot = appRoot == null ? {} : appRoot; globalShadow = globalShadow || window; if (typeof appRoot !== 'object') { throw 'root object must be an object.' } if (isServerSide() || isUsingRequireJS() || rootIsAlreadyConfigured(globalShadow)) { return; } ...
[ "function", "kwire", "(", "appRoot", ",", "globalShadow", ")", "{", "appRoot", "=", "appRoot", "==", "null", "?", "{", "}", ":", "appRoot", ";", "globalShadow", "=", "globalShadow", "||", "window", ";", "if", "(", "typeof", "appRoot", "!==", "'object'", ...
Augments the window object with a module and a require property to emulate CommonJS in the browser. @param {Object} appRoot The object to use as the root object for your 'modules' reqistered with kwire. @param {Object} globalShadow An object to shadow the global object for testing purposes.
[ "Augments", "the", "window", "object", "with", "a", "module", "and", "a", "require", "property", "to", "emulate", "CommonJS", "in", "the", "browser", "." ]
96e852221a71a9c6b52d59b49d4d16b47e259c0c
https://github.com/benaston/kwire/blob/96e852221a71a9c6b52d59b49d4d16b47e259c0c/dist/kwire.js#L19-L80
51,457
JerryC8080/skipper-upyun
standalone/build-upyun-receiver-stream.js
getInstance
function getInstance(options) { var bucket = options.bucket; var upyunInstance = instances[bucket]; // If can not found instance, then new one. if (!upyunInstance) { instances[bucket] = upyunInstance = new UPYUN(options.bucket, options.operator, options.password, options.endpoing, options.apiVersion); } ...
javascript
function getInstance(options) { var bucket = options.bucket; var upyunInstance = instances[bucket]; // If can not found instance, then new one. if (!upyunInstance) { instances[bucket] = upyunInstance = new UPYUN(options.bucket, options.operator, options.password, options.endpoing, options.apiVersion); } ...
[ "function", "getInstance", "(", "options", ")", "{", "var", "bucket", "=", "options", ".", "bucket", ";", "var", "upyunInstance", "=", "instances", "[", "bucket", "]", ";", "// If can not found instance, then new one.", "if", "(", "!", "upyunInstance", ")", "{",...
Get upyun instance
[ "Get", "upyun", "instance" ]
97a4445e3c4913d26f0c6a131386fff34ef8c76c
https://github.com/JerryC8080/skipper-upyun/blob/97a4445e3c4913d26f0c6a131386fff34ef8c76c/standalone/build-upyun-receiver-stream.js#L21-L31
51,458
JerryC8080/skipper-upyun
standalone/build-upyun-receiver-stream.js
uploadToUpyun
function uploadToUpyun(path, file, __newFile, done) { var options = this.options; var upyun = getInstance(options); upyun.uploadFile(path, file, __newFile.headers['content-type'], true, function (err, data) { if (err) { return done(err); } if (!data) { return done(new Error('Upload failed!...
javascript
function uploadToUpyun(path, file, __newFile, done) { var options = this.options; var upyun = getInstance(options); upyun.uploadFile(path, file, __newFile.headers['content-type'], true, function (err, data) { if (err) { return done(err); } if (!data) { return done(new Error('Upload failed!...
[ "function", "uploadToUpyun", "(", "path", ",", "file", ",", "__newFile", ",", "done", ")", "{", "var", "options", "=", "this", ".", "options", ";", "var", "upyun", "=", "getInstance", "(", "options", ")", ";", "upyun", ".", "uploadFile", "(", "path", "...
Upload the file to remote service of upyun @param {} path @param {} file @param {} __newFile @param {} done
[ "Upload", "the", "file", "to", "remote", "service", "of", "upyun" ]
97a4445e3c4913d26f0c6a131386fff34ef8c76c
https://github.com/JerryC8080/skipper-upyun/blob/97a4445e3c4913d26f0c6a131386fff34ef8c76c/standalone/build-upyun-receiver-stream.js#L40-L56
51,459
JerryC8080/skipper-upyun
standalone/build-upyun-receiver-stream.js
buildUpyunReceiverStream
function buildUpyunReceiverStream(opts) { var options = opts || {}; _.defaults(options, { endpoing: 'v0', apiVersion: 'legacy', // Upload limit (in bytes) // defaults to ~15MB maxBytes: 15000000, // Upload limit for per coming file (in bytes) // falsy means no limit perMaxBytes: ...
javascript
function buildUpyunReceiverStream(opts) { var options = opts || {}; _.defaults(options, { endpoing: 'v0', apiVersion: 'legacy', // Upload limit (in bytes) // defaults to ~15MB maxBytes: 15000000, // Upload limit for per coming file (in bytes) // falsy means no limit perMaxBytes: ...
[ "function", "buildUpyunReceiverStream", "(", "opts", ")", "{", "var", "options", "=", "opts", "||", "{", "}", ";", "_", ".", "defaults", "(", "options", ",", "{", "endpoing", ":", "'v0'", ",", "apiVersion", ":", "'legacy'", ",", "// Upload limit (in bytes)",...
A upyun receiver for Skipper that writes Upstreams to upyun at the configured path. @param {Object} opts @return {Stream.Writable}
[ "A", "upyun", "receiver", "for", "Skipper", "that", "writes", "Upstreams", "to", "upyun", "at", "the", "configured", "path", "." ]
97a4445e3c4913d26f0c6a131386fff34ef8c76c
https://github.com/JerryC8080/skipper-upyun/blob/97a4445e3c4913d26f0c6a131386fff34ef8c76c/standalone/build-upyun-receiver-stream.js#L105-L144
51,460
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(o) { return gui.Type.isGuiClass(o) && gui.Class.ancestorsAndSelf(o).some(function(C) { return C === edb.Object || C === edb.Array; }); }
javascript
function(o) { return gui.Type.isGuiClass(o) && gui.Class.ancestorsAndSelf(o).some(function(C) { return C === edb.Object || C === edb.Array; }); }
[ "function", "(", "o", ")", "{", "return", "gui", ".", "Type", ".", "isGuiClass", "(", "o", ")", "&&", "gui", ".", "Class", ".", "ancestorsAndSelf", "(", "o", ")", ".", "some", "(", "function", "(", "C", ")", "{", "return", "C", "===", "edb", ".",...
Something is a Type constructor? @param {object} o @returns {boolean}
[ "Something", "is", "a", "Type", "constructor?" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L187-L192
51,461
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function() { return Array.map(this, function(thing) { if (edb.Type.is(thing)) { return thing.toJSON(); } return thing; }); }
javascript
function() { return Array.map(this, function(thing) { if (edb.Type.is(thing)) { return thing.toJSON(); } return thing; }); }
[ "function", "(", ")", "{", "return", "Array", ".", "map", "(", "this", ",", "function", "(", "thing", ")", "{", "if", "(", "edb", ".", "Type", ".", "is", "(", "thing", ")", ")", "{", "return", "thing", ".", "toJSON", "(", ")", ";", "}", "return...
Create true array without expando properties, recursively normalizing nested EDB types. Returns the type of array we would typically transmit back to the server or something. @returns {Array}
[ "Create", "true", "array", "without", "expando", "properties", "recursively", "normalizing", "nested", "EDB", "types", ".", "Returns", "the", "type", "of", "array", "we", "would", "typically", "transmit", "back", "to", "the", "server", "or", "something", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L746-L753
51,462
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
observes
function observes(array) { var key = array.$instanceid; return edb.Array._observers[key] ? true : false; }
javascript
function observes(array) { var key = array.$instanceid; return edb.Array._observers[key] ? true : false; }
[ "function", "observes", "(", "array", ")", "{", "var", "key", "=", "array", ".", "$instanceid", ";", "return", "edb", ".", "Array", ".", "_observers", "[", "key", "]", "?", "true", ":", "false", ";", "}" ]
Array is being observed? @param {edb.Array} array @returns {boolean}
[ "Array", "is", "being", "observed?" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L786-L789
51,463
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(tick) { var snapshot, handlers, observers = this._observers; if (tick.type === edb.TICK_PUBLISH_CHANGES) { snapshot = gui.Object.copy(this._changes); this._changes = Object.create(null); gui.Object.each(snapshot, function(instanceid, changes) { if ((handlers = observers[instanceid])) { ha...
javascript
function(tick) { var snapshot, handlers, observers = this._observers; if (tick.type === edb.TICK_PUBLISH_CHANGES) { snapshot = gui.Object.copy(this._changes); this._changes = Object.create(null); gui.Object.each(snapshot, function(instanceid, changes) { if ((handlers = observers[instanceid])) { ha...
[ "function", "(", "tick", ")", "{", "var", "snapshot", ",", "handlers", ",", "observers", "=", "this", ".", "_observers", ";", "if", "(", "tick", ".", "type", "===", "edb", ".", "TICK_PUBLISH_CHANGES", ")", "{", "snapshot", "=", "gui", ".", "Object", "....
Publishing change summaries async. @param {gui.Tick} tick
[ "Publishing", "change", "summaries", "async", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L822-L835
51,464
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
decorateAccess
function decorateAccess(proto, methods) { methods.forEach(function(method) { proto[method] = beforeaccess(proto[method]); }); }
javascript
function decorateAccess(proto, methods) { methods.forEach(function(method) { proto[method] = beforeaccess(proto[method]); }); }
[ "function", "decorateAccess", "(", "proto", ",", "methods", ")", "{", "methods", ".", "forEach", "(", "function", "(", "method", ")", "{", "proto", "[", "method", "]", "=", "beforeaccess", "(", "proto", "[", "method", "]", ")", ";", "}", ")", ";", "}...
Decorate getter methods on prototype. @param {object} proto Prototype to decorate @param {Array<String>} methods List of method names @returns {object}
[ "Decorate", "getter", "methods", "on", "prototype", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L906-L910
51,465
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
lookupDescriptor
function lookupDescriptor(proto, key) { if (proto.hasOwnProperty(key)) { return Object.getOwnPropertyDescriptor(proto, key); } else if ((proto = Object.getPrototypeOf(proto))) { return lookupDescriptor(proto, key); } else { return null; } }
javascript
function lookupDescriptor(proto, key) { if (proto.hasOwnProperty(key)) { return Object.getOwnPropertyDescriptor(proto, key); } else if ((proto = Object.getPrototypeOf(proto))) { return lookupDescriptor(proto, key); } else { return null; } }
[ "function", "lookupDescriptor", "(", "proto", ",", "key", ")", "{", "if", "(", "proto", ".", "hasOwnProperty", "(", "key", ")", ")", "{", "return", "Object", ".", "getOwnPropertyDescriptor", "(", "proto", ",", "key", ")", ";", "}", "else", "if", "(", "...
Lookup property descriptor for key. @param {object} proto @param {string} key @returns {object}
[ "Lookup", "property", "descriptor", "for", "key", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1053-L1061
51,466
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
guidedconvert
function guidedconvert(args, array) { return args.map(function(o) { if (o !== undefined) { if (gui.Type.isConstructor(array.$of)) { o = constructas(array.$of, o); } else { o = filterfrom(function(x) { return array.$of(x); }, o); } } return o; }); }
javascript
function guidedconvert(args, array) { return args.map(function(o) { if (o !== undefined) { if (gui.Type.isConstructor(array.$of)) { o = constructas(array.$of, o); } else { o = filterfrom(function(x) { return array.$of(x); }, o); } } return o; }); }
[ "function", "guidedconvert", "(", "args", ",", "array", ")", "{", "return", "args", ".", "map", "(", "function", "(", "o", ")", "{", "if", "(", "o", "!==", "undefined", ")", "{", "if", "(", "gui", ".", "Type", ".", "isConstructor", "(", "array", "....
Convert via constructor or via filter function which returns a constructor. @param {Array} args @param {edb.Array} array @returns {Array<edb.Type>}
[ "Convert", "via", "constructor", "or", "via", "filter", "function", "which", "returns", "a", "constructor", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1244-L1257
51,467
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(array, args) { args = gui.Array.from(args); if (!gui.Type.isNull(array.$of)) { if (gui.Type.isFunction(array.$of)) { return guidedconvert(args, array); } else { var type = gui.Type.of(array.$of); throw new Error(array + ' cannot be $of ' + type); } } else { return autoco...
javascript
function(array, args) { args = gui.Array.from(args); if (!gui.Type.isNull(array.$of)) { if (gui.Type.isFunction(array.$of)) { return guidedconvert(args, array); } else { var type = gui.Type.of(array.$of); throw new Error(array + ' cannot be $of ' + type); } } else { return autoco...
[ "function", "(", "array", ",", "args", ")", "{", "args", "=", "gui", ".", "Array", ".", "from", "(", "args", ")", ";", "if", "(", "!", "gui", ".", "Type", ".", "isNull", "(", "array", ".", "$of", ")", ")", "{", "if", "(", "gui", ".", "Type", ...
Convert arguments. @param {edb.Array} array @param {Arguments|array} args @returns {Array}
[ "Convert", "arguments", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1310-L1322
51,468
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
getter
function getter(key, base) { return function() { var result = base.apply(this); if (edb.$accessaware && !suspend) { edb.Object.$onaccess(this, key); } return result; }; }
javascript
function getter(key, base) { return function() { var result = base.apply(this); if (edb.$accessaware && !suspend) { edb.Object.$onaccess(this, key); } return result; }; }
[ "function", "getter", "(", "key", ",", "base", ")", "{", "return", "function", "(", ")", "{", "var", "result", "=", "base", ".", "apply", "(", "this", ")", ";", "if", "(", "edb", ".", "$accessaware", "&&", "!", "suspend", ")", "{", "edb", ".", "O...
Create observable getter for key. @param {String} key @param {function} base @returns {function}
[ "Create", "observable", "getter", "for", "key", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1347-L1355
51,469
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(type, target) { var handler, input = this._configure(type.constructor, type); if (target) { console.error("Deprecated API is deprecated", target.spirit); if ((handler = target.$oninput || target.oninput)) { handler.call(target, input); } } else { gui.Broadcast.dispatch(edb.BROADCAST_OUTPU...
javascript
function(type, target) { var handler, input = this._configure(type.constructor, type); if (target) { console.error("Deprecated API is deprecated", target.spirit); if ((handler = target.$oninput || target.oninput)) { handler.call(target, input); } } else { gui.Broadcast.dispatch(edb.BROADCAST_OUTPU...
[ "function", "(", "type", ",", "target", ")", "{", "var", "handler", ",", "input", "=", "this", ".", "_configure", "(", "type", ".", "constructor", ",", "type", ")", ";", "if", "(", "target", ")", "{", "console", ".", "error", "(", "\"Deprecated API is ...
Output Type instance. @returns {edb.Object|edb.Array} @param @optional {object} target TODO: rename to 'output'?
[ "Output", "Type", "instance", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1649-L1659
51,470
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(Type) { if (Type) { if (this._map) { var classid = Type.$classid; var typeobj = this._map[classid]; return typeobj ? true : false; } return false; } else { throw new Error("Something is undefined"); } }
javascript
function(Type) { if (Type) { if (this._map) { var classid = Type.$classid; var typeobj = this._map[classid]; return typeobj ? true : false; } return false; } else { throw new Error("Something is undefined"); } }
[ "function", "(", "Type", ")", "{", "if", "(", "Type", ")", "{", "if", "(", "this", ".", "_map", ")", "{", "var", "classid", "=", "Type", ".", "$classid", ";", "var", "typeobj", "=", "this", ".", "_map", "[", "classid", "]", ";", "return", "typeob...
Instance of given Type has been output to context? @param {function} type Type constructor @returns {boolean}
[ "Instance", "of", "given", "Type", "has", "been", "output", "to", "context?" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1681-L1692
51,471
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(Type, type) { var classid = Type.$classid; this._map[classid] = type; return new edb.Input(Type, type); }
javascript
function(Type, type) { var classid = Type.$classid; this._map[classid] = type; return new edb.Input(Type, type); }
[ "function", "(", "Type", ",", "type", ")", "{", "var", "classid", "=", "Type", ".", "$classid", ";", "this", ".", "_map", "[", "classid", "]", "=", "type", ";", "return", "new", "edb", ".", "Input", "(", "Type", ",", "type", ")", ";", "}" ]
Configure Type instance for output. @param {function} Type constructor @param {edb.Object|edb.Array} type instance @returns {edb.Input}
[ "Configure", "Type", "instance", "for", "output", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1709-L1713
51,472
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(type, filter, tabs) { if (isType(type)) { return JSON.stringify(parse(type), filter, tabs); } else { throw new TypeError("Expected edb.Object|edb.Array"); } }
javascript
function(type, filter, tabs) { if (isType(type)) { return JSON.stringify(parse(type), filter, tabs); } else { throw new TypeError("Expected edb.Object|edb.Array"); } }
[ "function", "(", "type", ",", "filter", ",", "tabs", ")", "{", "if", "(", "isType", "(", "type", ")", ")", "{", "return", "JSON", ".", "stringify", "(", "parse", "(", "type", ")", ",", "filter", ",", "tabs", ")", ";", "}", "else", "{", "throw", ...
Serialize type. @param {edb.Object|edb.Array} type @param @optional {function} filter @param @optional {String|number} tabs @returns {String}
[ "Serialize", "type", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1818-L1824
51,473
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
asObject
function asObject(type) { var map = gui.Object.map(type, mapObject, type); return { $object: gui.Object.extend({ $classname: type.$classname, $instanceid: type.$instanceid, $originalid: type.$originalid }, map) }; }
javascript
function asObject(type) { var map = gui.Object.map(type, mapObject, type); return { $object: gui.Object.extend({ $classname: type.$classname, $instanceid: type.$instanceid, $originalid: type.$originalid }, map) }; }
[ "function", "asObject", "(", "type", ")", "{", "var", "map", "=", "gui", ".", "Object", ".", "map", "(", "type", ",", "mapObject", ",", "type", ")", ";", "return", "{", "$object", ":", "gui", ".", "Object", ".", "extend", "(", "{", "$classname", ":...
Compute object node. @param {edb.Object|edb.Array} type @returns {object}
[ "Compute", "object", "node", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1863-L1872
51,474
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
mapObject
function mapObject(key, value) { var c = key.charAt(0); if (c === "_" || c === "$") { return undefined; } else if (isArray(this) && key.match(INTRINSIC)) { return undefined; } else if (isType(value)) { return parse(value); } else if (gui.Type.isComplex(value)) { switch (value.constructor) { ca...
javascript
function mapObject(key, value) { var c = key.charAt(0); if (c === "_" || c === "$") { return undefined; } else if (isArray(this) && key.match(INTRINSIC)) { return undefined; } else if (isType(value)) { return parse(value); } else if (gui.Type.isComplex(value)) { switch (value.constructor) { ca...
[ "function", "mapObject", "(", "key", ",", "value", ")", "{", "var", "c", "=", "key", ".", "charAt", "(", "0", ")", ";", "if", "(", "c", "===", "\"_\"", "||", "c", "===", "\"$\"", ")", "{", "return", "undefined", ";", "}", "else", "if", "(", "is...
Map the object properties of a type. - Skip private (underscore) fields. - Skip all array intrinsic properties. - Skip what looks like instance objects. - Skip getters and setters. @param {String} key @param {object} value
[ "Map", "the", "object", "properties", "of", "a", "type", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1895-L1920
51,475
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
mapArray
function mapArray(type) { return Array.map(type, function(thing) { return isType(thing) ? parse(thing) : thing; }); }
javascript
function mapArray(type) { return Array.map(type, function(thing) { return isType(thing) ? parse(thing) : thing; }); }
[ "function", "mapArray", "(", "type", ")", "{", "return", "Array", ".", "map", "(", "type", ",", "function", "(", "thing", ")", "{", "return", "isType", "(", "thing", ")", "?", "parse", "(", "thing", ")", ":", "thing", ";", "}", ")", ";", "}" ]
Map array members. @param {edb.Array} type
[ "Map", "array", "members", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L1926-L1930
51,476
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(input) { var needstesting = !this._matches.length; if (needstesting || this._matches.every(function(match) { return match.$instanceid !== input.$instanceid; })) { return this._maybeinput(input); } return false; }
javascript
function(input) { var needstesting = !this._matches.length; if (needstesting || this._matches.every(function(match) { return match.$instanceid !== input.$instanceid; })) { return this._maybeinput(input); } return false; }
[ "function", "(", "input", ")", "{", "var", "needstesting", "=", "!", "this", ".", "_matches", ".", "length", ";", "if", "(", "needstesting", "||", "this", ".", "_matches", ".", "every", "(", "function", "(", "match", ")", "{", "return", "match", ".", ...
Collect matching input. @param {edb.Input} input
[ "Collect", "matching", "input", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2153-L2161
51,477
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(types, handler, required) { types.forEach(function(Type) { if (gui.Type.isDefined(Type)) { this._addchecks(Type.$classid, [handler]); this._watches.push(Type); if (required) { this._needing.push(Type); } } else { throw new TypeError("Could not register input for undefined Type"...
javascript
function(types, handler, required) { types.forEach(function(Type) { if (gui.Type.isDefined(Type)) { this._addchecks(Type.$classid, [handler]); this._watches.push(Type); if (required) { this._needing.push(Type); } } else { throw new TypeError("Could not register input for undefined Type"...
[ "function", "(", "types", ",", "handler", ",", "required", ")", "{", "types", ".", "forEach", "(", "function", "(", "Type", ")", "{", "if", "(", "gui", ".", "Type", ".", "isDefined", "(", "Type", ")", ")", "{", "this", ".", "_addchecks", "(", "Type...
Add input handler for types. @param {Array<function>} types @param {IInputHandler} handler @param {boolean} required
[ "Add", "input", "handler", "for", "types", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2206-L2225
51,478
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(types, handler) { types.forEach(function(Type) { gui.Array.remove(this._watches, Type); gui.Array.remove(this._needing, Type); this._removechecks(Type.$classid, [handler]); if (!this._watches.length) { this._subscribe(false); } }, this); }
javascript
function(types, handler) { types.forEach(function(Type) { gui.Array.remove(this._watches, Type); gui.Array.remove(this._needing, Type); this._removechecks(Type.$classid, [handler]); if (!this._watches.length) { this._subscribe(false); } }, this); }
[ "function", "(", "types", ",", "handler", ")", "{", "types", ".", "forEach", "(", "function", "(", "Type", ")", "{", "gui", ".", "Array", ".", "remove", "(", "this", ".", "_watches", ",", "Type", ")", ";", "gui", ".", "Array", ".", "remove", "(", ...
Remove input handler for types. @param {Array<function>} types @param {IInputHandler} handler
[ "Remove", "input", "handler", "for", "types", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2232-L2241
51,479
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(input) { var best = edb.InputPlugin._bestmatch(input.type, this._watches, true); if (best) { this._updatematch(input, best); this.done = this._done(); this._updatehandlers(input); return true; } return false; }
javascript
function(input) { var best = edb.InputPlugin._bestmatch(input.type, this._watches, true); if (best) { this._updatematch(input, best); this.done = this._done(); this._updatehandlers(input); return true; } return false; }
[ "function", "(", "input", ")", "{", "var", "best", "=", "edb", ".", "InputPlugin", ".", "_bestmatch", "(", "input", ".", "type", ",", "this", ".", "_watches", ",", "true", ")", ";", "if", "(", "best", ")", "{", "this", ".", "_updatematch", "(", "in...
If input matches registered type, update handlers. @param {edb.Input} input
[ "If", "input", "matches", "registered", "type", "update", "handlers", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2247-L2256
51,480
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(input) { var matches = this._matches; var watches = this._watches; var best = edb.InputPlugin._bestmatch(input.type, watches, true); if (best) { var oldinput = matches.filter(function(input) { return input.type === best; })[0]; var index = matches.indexOf(oldinput); matches.splice(index...
javascript
function(input) { var matches = this._matches; var watches = this._watches; var best = edb.InputPlugin._bestmatch(input.type, watches, true); if (best) { var oldinput = matches.filter(function(input) { return input.type === best; })[0]; var index = matches.indexOf(oldinput); matches.splice(index...
[ "function", "(", "input", ")", "{", "var", "matches", "=", "this", ".", "_matches", ";", "var", "watches", "=", "this", ".", "_watches", ";", "var", "best", "=", "edb", ".", "InputPlugin", ".", "_bestmatch", "(", "input", ".", "type", ",", "watches", ...
Evaluate revoked output. @param {edb.Input} input
[ "Evaluate", "revoked", "output", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2262-L2278
51,481
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(input) { gui.Class.ancestorsAndSelf(input.type, function(Type) { var list = this._trackedtypes[Type.$classid]; if (list) { list.forEach(function(checks) { var handler = checks[0]; handler.oninput(input); }); } }, this); }
javascript
function(input) { gui.Class.ancestorsAndSelf(input.type, function(Type) { var list = this._trackedtypes[Type.$classid]; if (list) { list.forEach(function(checks) { var handler = checks[0]; handler.oninput(input); }); } }, this); }
[ "function", "(", "input", ")", "{", "gui", ".", "Class", ".", "ancestorsAndSelf", "(", "input", ".", "type", ",", "function", "(", "Type", ")", "{", "var", "list", "=", "this", ".", "_trackedtypes", "[", "Type", ".", "$classid", "]", ";", "if", "(", ...
Update input handlers. @param {edb.Input} input
[ "Update", "input", "handlers", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2307-L2317
51,482
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function() { var needs = this._needing; var haves = this._matches; return needs.every(function(Type) { return haves.some(function(input) { return (input.data instanceof Type); }); }); }
javascript
function() { var needs = this._needing; var haves = this._matches; return needs.every(function(Type) { return haves.some(function(input) { return (input.data instanceof Type); }); }); }
[ "function", "(", ")", "{", "var", "needs", "=", "this", ".", "_needing", ";", "var", "haves", "=", "this", ".", "_matches", ";", "return", "needs", ".", "every", "(", "function", "(", "Type", ")", "{", "return", "haves", ".", "some", "(", "function",...
All required inputs has been aquired? @returns {boolean}
[ "All", "required", "inputs", "has", "been", "aquired?" ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2323-L2331
51,483
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(arg, context) { switch (gui.Type.of(arg)) { case "function": return [arg]; case "string": return this._breakarray(arg.split(" "), context); case "object": console.error("Expected function. Got object."); } }
javascript
function(arg, context) { switch (gui.Type.of(arg)) { case "function": return [arg]; case "string": return this._breakarray(arg.split(" "), context); case "object": console.error("Expected function. Got object."); } }
[ "function", "(", "arg", ",", "context", ")", "{", "switch", "(", "gui", ".", "Type", ".", "of", "(", "arg", ")", ")", "{", "case", "\"function\"", ":", "return", "[", "arg", "]", ";", "case", "\"string\"", ":", "return", "this", ".", "_breakarray", ...
Breakdown unarray. @param {function|String|object} arg @returns {Array<function>} @param {Window} context @returns {Array<function>}
[ "Breakdown", "unarray", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2384-L2393
51,484
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(target, types, up, action) { types.forEach(function(type) { action(type, this._rateone( up ? target : type, up ? type : target )); }, this); }
javascript
function(target, types, up, action) { types.forEach(function(type) { action(type, this._rateone( up ? target : type, up ? type : target )); }, this); }
[ "function", "(", "target", ",", "types", ",", "up", ",", "action", ")", "{", "types", ".", "forEach", "(", "function", "(", "type", ")", "{", "action", "(", "type", ",", "this", ".", "_rateone", "(", "up", "?", "target", ":", "type", ",", "up", "...
Rate all types. @param {function} t @param {Array<function>} types @param {boolean} up Rate ancestor? @param {function} action
[ "Rate", "all", "types", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2421-L2427
51,485
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(id) { var config, script; return { as: function($edbml) { config = edbml.$runtimeconfigure($edbml); script = gui.Object.assert(id, config); script.$bind = function() { console.error('Deprecated API is deprecated: $bind'); }; script.lock = function(out) { return script({ ...
javascript
function(id) { var config, script; return { as: function($edbml) { config = edbml.$runtimeconfigure($edbml); script = gui.Object.assert(id, config); script.$bind = function() { console.error('Deprecated API is deprecated: $bind'); }; script.lock = function(out) { return script({ ...
[ "function", "(", "id", ")", "{", "var", "config", ",", "script", ";", "return", "{", "as", ":", "function", "(", "$edbml", ")", "{", "config", "=", "edbml", ".", "$runtimeconfigure", "(", "$edbml", ")", ";", "script", "=", "gui", ".", "Object", ".", ...
EDBML script declaration micro DSL. @param {String} id
[ "EDBML", "script", "declaration", "micro", "DSL", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2506-L2526
51,486
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function($edbml) { return function configured($in) { $edbml.$out = ($in && $in.$out) ? $in.$out : new edbml.Out(); $edbml.$att = new edbml.Att(); $edbml.$input = function(Type) { return this.script.$input.get(Type); }.bind(this); return $edbml.apply(this, arguments); }; }
javascript
function($edbml) { return function configured($in) { $edbml.$out = ($in && $in.$out) ? $in.$out : new edbml.Out(); $edbml.$att = new edbml.Att(); $edbml.$input = function(Type) { return this.script.$input.get(Type); }.bind(this); return $edbml.apply(this, arguments); }; }
[ "function", "(", "$edbml", ")", "{", "return", "function", "configured", "(", "$in", ")", "{", "$edbml", ".", "$out", "=", "(", "$in", "&&", "$in", ".", "$out", ")", "?", "$in", ".", "$out", ":", "new", "edbml", ".", "Out", "(", ")", ";", "$edbml...
Configure EDBML function for runtime use. Note that `this` refers to the spirit instance here. @see {ts.gui.ScriptPlugin#_runtimeconfigure} @param {function} $edbml The (compiled) function as served to the page @returns {function}
[ "Configure", "EDBML", "function", "for", "runtime", "use", ".", "Note", "that", "this", "refers", "to", "the", "spirit", "instance", "here", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2581-L2590
51,487
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(func, thisp) { var key = gui.KeyMaster.generateKey(); this._invokables[key] = function(value, checked) { return func.apply(thisp, [gui.Type.cast(value), checked]); }; return key; }
javascript
function(func, thisp) { var key = gui.KeyMaster.generateKey(); this._invokables[key] = function(value, checked) { return func.apply(thisp, [gui.Type.cast(value), checked]); }; return key; }
[ "function", "(", "func", ",", "thisp", ")", "{", "var", "key", "=", "gui", ".", "KeyMaster", ".", "generateKey", "(", ")", ";", "this", ".", "_invokables", "[", "key", "]", "=", "function", "(", "value", ",", "checked", ")", "{", "return", "func", ...
Map function to generated key and return the key. @param {function} func @param {object} thisp @returns {String}
[ "Map", "function", "to", "generated", "key", "and", "return", "the", "key", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2614-L2620
51,488
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(e) { this._latestevent = e ? { type: e.type, value: e.target.value, checked: e.target.checked } : null; }
javascript
function(e) { this._latestevent = e ? { type: e.type, value: e.target.value, checked: e.target.checked } : null; }
[ "function", "(", "e", ")", "{", "this", ".", "_latestevent", "=", "e", "?", "{", "type", ":", "e", ".", "type", ",", "value", ":", "e", ".", "target", ".", "value", ",", "checked", ":", "e", ".", "target", ".", "checked", "}", ":", "null", ";",...
Keep a log on the latest DOM event. Perhaps it's because events don't take to async implementation, though it's probably so we can send it to sandbox. @param {Event} e
[ "Keep", "a", "log", "on", "the", "latest", "DOM", "event", ".", "Perhaps", "it", "s", "because", "events", "don", "t", "take", "to", "async", "implementation", "though", "it", "s", "probably", "so", "we", "can", "send", "it", "to", "sandbox", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2701-L2707
51,489
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function() { var html = ""; gui.Object.nonmethods(this).forEach(function(att) { html += this._out(att); }, this); return html; }
javascript
function() { var html = ""; gui.Object.nonmethods(this).forEach(function(att) { html += this._out(att); }, this); return html; }
[ "function", "(", ")", "{", "var", "html", "=", "\"\"", ";", "gui", ".", "Object", ".", "nonmethods", "(", "this", ")", ".", "forEach", "(", "function", "(", "att", ")", "{", "html", "+=", "this", ".", "_out", "(", "att", ")", ";", "}", ",", "th...
Resolve all key-values to HTML attribute declarations. @returns {String}
[ "Resolve", "all", "key", "-", "values", "to", "HTML", "attribute", "declarations", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L2772-L2778
51,490
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(html) { this._newdom = this._parse(html); this._crawl(this._newdom, this._olddom, this._newdom, this._keyid, {}); this._olddom = this._newdom; }
javascript
function(html) { this._newdom = this._parse(html); this._crawl(this._newdom, this._olddom, this._newdom, this._keyid, {}); this._olddom = this._newdom; }
[ "function", "(", "html", ")", "{", "this", ".", "_newdom", "=", "this", ".", "_parse", "(", "html", ")", ";", "this", ".", "_crawl", "(", "this", ".", "_newdom", ",", "this", ".", "_olddom", ",", "this", ".", "_newdom", ",", "this", ".", "_keyid", ...
Next update. @param {String} html
[ "Next", "update", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3052-L3056
51,491
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(newnode, oldnode, lastnode, id, ids) { var result = true, oldid = this._assistant.id(oldnode); if ((result = this._check(newnode, oldnode, lastnode, id, ids))) { if (oldid) { ids = gui.Object.copy(ids); lastnode = newnode; ids[oldid] = true; id = oldid; } result = this._crawl(ne...
javascript
function(newnode, oldnode, lastnode, id, ids) { var result = true, oldid = this._assistant.id(oldnode); if ((result = this._check(newnode, oldnode, lastnode, id, ids))) { if (oldid) { ids = gui.Object.copy(ids); lastnode = newnode; ids[oldid] = true; id = oldid; } result = this._crawl(ne...
[ "function", "(", "newnode", ",", "oldnode", ",", "lastnode", ",", "id", ",", "ids", ")", "{", "var", "result", "=", "true", ",", "oldid", "=", "this", ".", "_assistant", ".", "id", "(", "oldnode", ")", ";", "if", "(", "(", "result", "=", "this", ...
Scan elements. @param {Element} newnode @param {Element} oldnode @param {Element} lastnode @param {String} id @param {Map<String,boolean>} ids @returns {boolean}
[ "Scan", "elements", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3107-L3120
51,492
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(newnode, oldnode, ids) { var result = true; var update = null; if (this._attschanged(newnode.attributes, oldnode.attributes, ids)) { var newid = this._assistant.id(newnode); var oldid = this._assistant.id(oldnode); if (newid && newid === oldid) { update = new edbml.AttsUpdate(this._doc).setu...
javascript
function(newnode, oldnode, ids) { var result = true; var update = null; if (this._attschanged(newnode.attributes, oldnode.attributes, ids)) { var newid = this._assistant.id(newnode); var oldid = this._assistant.id(oldnode); if (newid && newid === oldid) { update = new edbml.AttsUpdate(this._doc).setu...
[ "function", "(", "newnode", ",", "oldnode", ",", "ids", ")", "{", "var", "result", "=", "true", ";", "var", "update", "=", "null", ";", "if", "(", "this", ".", "_attschanged", "(", "newnode", ".", "attributes", ",", "oldnode", ".", "attributes", ",", ...
Same id trigges attribute synchronization; different id triggers hard update of ancestor. @param {Element} newnode @param {Element} oldnode @param {Map<String,boolean>} ids @returns {boolean} When false, replace "hard" and stop crawling.
[ "Same", "id", "trigges", "attribute", "synchronization", ";", "different", "id", "triggers", "hard", "update", "of", "ancestor", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3194-L3208
51,493
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(newnode, oldnode) { if (newnode && oldnode) { return newnode.id && newnode.id === oldnode.id && this._maybesoft(newnode) && this._maybesoft(oldnode); } else { return Array.every(newnode.childNodes, function(node) { var res = true; switch (node.nodeType) { case Node.TEXT_NODE: ...
javascript
function(newnode, oldnode) { if (newnode && oldnode) { return newnode.id && newnode.id === oldnode.id && this._maybesoft(newnode) && this._maybesoft(oldnode); } else { return Array.every(newnode.childNodes, function(node) { var res = true; switch (node.nodeType) { case Node.TEXT_NODE: ...
[ "function", "(", "newnode", ",", "oldnode", ")", "{", "if", "(", "newnode", "&&", "oldnode", ")", "{", "return", "newnode", ".", "id", "&&", "newnode", ".", "id", "===", "oldnode", ".", "id", "&&", "this", ".", "_maybesoft", "(", "newnode", ")", "&&"...
Are element children candidates for "soft" sibling updates? 1) Both parents must have the same ID 2) All children must have a specified ID 3) All children must be elements or whitespace-only textnodes @param {Element} newnode @param {Element} oldnode @return {boolean}
[ "Are", "element", "children", "candidates", "for", "soft", "sibling", "updates?", "1", ")", "Both", "parents", "must", "have", "the", "same", "ID", "2", ")", "All", "children", "must", "have", "a", "specified", "ID", "3", ")", "All", "children", "must", ...
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3267-L3286
51,494
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(newnode, oldnode, ids) { var updates = []; var news = this._assistant.index(newnode.childNodes); var olds = this._assistant.index(oldnode.childNodes); /* * Add elements? */ var child = newnode.lastElementChild, topid = this._assistant.id(oldnode), oldid = null, newid = null; while (c...
javascript
function(newnode, oldnode, ids) { var updates = []; var news = this._assistant.index(newnode.childNodes); var olds = this._assistant.index(oldnode.childNodes); /* * Add elements? */ var child = newnode.lastElementChild, topid = this._assistant.id(oldnode), oldid = null, newid = null; while (c...
[ "function", "(", "newnode", ",", "oldnode", ",", "ids", ")", "{", "var", "updates", "=", "[", "]", ";", "var", "news", "=", "this", ".", "_assistant", ".", "index", "(", "newnode", ".", "childNodes", ")", ";", "var", "olds", "=", "this", ".", "_ass...
Update "soft" siblings. @param {Element} newnode @param {Element} oldnode @param {Map<String,boolean>} ids @return {boolean}
[ "Update", "soft", "siblings", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3321-L3372
51,495
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(update, ids) { this._updates.push(update); if (update.type === edbml.Update.TYPE_HARD) { this._hardupdates[update.id] = true; } else { update.ids = ids || {}; } return this; }
javascript
function(update, ids) { this._updates.push(update); if (update.type === edbml.Update.TYPE_HARD) { this._hardupdates[update.id] = true; } else { update.ids = ids || {}; } return this; }
[ "function", "(", "update", ",", "ids", ")", "{", "this", ".", "_updates", ".", "push", "(", "update", ")", ";", "if", "(", "update", ".", "type", "===", "edbml", ".", "Update", ".", "TYPE_HARD", ")", "{", "this", ".", "_hardupdates", "[", "update", ...
Collect update candidate. All updates may not be evaluated, see below. @param {edbml.Update} update @param {Map<String,boolean>} ids Indexing ID of ancestor elements @returns {edbml.UpdateCollector}
[ "Collect", "update", "candidate", ".", "All", "updates", "may", "not", "be", "evaluated", "see", "below", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3399-L3407
51,496
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function(report) { if (edbml.debug) { if (gui.KeyMaster.isKey(this.id)) { report = report.replace(this.id, "(anonymous)"); } console.debug(report); } }
javascript
function(report) { if (edbml.debug) { if (gui.KeyMaster.isKey(this.id)) { report = report.replace(this.id, "(anonymous)"); } console.debug(report); } }
[ "function", "(", "report", ")", "{", "if", "(", "edbml", ".", "debug", ")", "{", "if", "(", "gui", ".", "KeyMaster", ".", "isKey", "(", "this", ".", "id", ")", ")", "{", "report", "=", "report", ".", "replace", "(", "this", ".", "id", ",", "\"(...
Report update in debug mode. @param {String} report
[ "Report", "update", "in", "debug", "mode", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3596-L3603
51,497
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function() { edbml.Update.prototype.update.call(this); var element = this.element(); if (this._beforeUpdate(element)) { this._update(element); this._afterUpdate(element); this._report(); } }
javascript
function() { edbml.Update.prototype.update.call(this); var element = this.element(); if (this._beforeUpdate(element)) { this._update(element); this._afterUpdate(element); this._report(); } }
[ "function", "(", ")", "{", "edbml", ".", "Update", ".", "prototype", ".", "update", ".", "call", "(", "this", ")", ";", "var", "element", "=", "this", ".", "element", "(", ")", ";", "if", "(", "this", ".", "_beforeUpdate", "(", "element", ")", ")",...
Update attributes.
[ "Update", "attributes", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3713-L3721
51,498
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function() { var summary = this._summary.join(', '); var message = 'edbml.AttsUpdate "#' + this.id + '" ' + summary; edbml.Update.prototype._report.call(this, message); // TODO: this would break super keyword algorithm!!! // edbml.Update.prototype._report.call(this, edbml.AttsUpdate \# + // this.id + \ + t...
javascript
function() { var summary = this._summary.join(', '); var message = 'edbml.AttsUpdate "#' + this.id + '" ' + summary; edbml.Update.prototype._report.call(this, message); // TODO: this would break super keyword algorithm!!! // edbml.Update.prototype._report.call(this, edbml.AttsUpdate \# + // this.id + \ + t...
[ "function", "(", ")", "{", "var", "summary", "=", "this", ".", "_summary", ".", "join", "(", "', '", ")", ";", "var", "message", "=", "'edbml.AttsUpdate \"#'", "+", "this", ".", "id", "+", "'\" '", "+", "summary", ";", "edbml", ".", "Update", ".", "p...
Debug changes.
[ "Debug", "changes", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3818-L3825
51,499
wunderbyte/grunt-spiritual-dox
src/js/libs/spiritual-edb.js
function() { edbml.Update.prototype.update.call(this); var element = this.element(); if (element && this._beforeUpdate(element)) { //gui.DOMPlugin.html ( element, this.xelement.outerHTML ); gui.DOMPlugin.html(element, this.xelement.innerHTML); this._afterUpdate(element); this._report(); } }
javascript
function() { edbml.Update.prototype.update.call(this); var element = this.element(); if (element && this._beforeUpdate(element)) { //gui.DOMPlugin.html ( element, this.xelement.outerHTML ); gui.DOMPlugin.html(element, this.xelement.innerHTML); this._afterUpdate(element); this._report(); } }
[ "function", "(", ")", "{", "edbml", ".", "Update", ".", "prototype", ".", "update", ".", "call", "(", "this", ")", ";", "var", "element", "=", "this", ".", "element", "(", ")", ";", "if", "(", "element", "&&", "this", ".", "_beforeUpdate", "(", "el...
Replace target subtree.
[ "Replace", "target", "subtree", "." ]
5afcfe31ddbf7d654166aa15b938553b61de5811
https://github.com/wunderbyte/grunt-spiritual-dox/blob/5afcfe31ddbf7d654166aa15b938553b61de5811/src/js/libs/spiritual-edb.js#L3864-L3873