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
partition
stringclasses
1 value
metadelta/metadelta
packages/solver/lib/solveEquation/stepThrough.js
step
function step(equation, symbolName) { const solveFunctions = [ // ensure the symbol is always on the left node EquationOperations.ensureSymbolInLeftNode, // get rid of denominators that have the symbol EquationOperations.removeSymbolFromDenominator, // remove the symbol from the right side Equ...
javascript
function step(equation, symbolName) { const solveFunctions = [ // ensure the symbol is always on the left node EquationOperations.ensureSymbolInLeftNode, // get rid of denominators that have the symbol EquationOperations.removeSymbolFromDenominator, // remove the symbol from the right side Equ...
[ "function", "step", "(", "equation", ",", "symbolName", ")", "{", "const", "solveFunctions", "=", "[", "// ensure the symbol is always on the left node", "EquationOperations", ".", "ensureSymbolInLeftNode", ",", "// get rid of denominators that have the symbol", "EquationOperatio...
Given a symbol and an equation, performs a single step to solve for the symbol. Returns an Status object.
[ "Given", "a", "symbol", "and", "an", "equation", "performs", "a", "single", "step", "to", "solve", "for", "the", "symbol", ".", "Returns", "an", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/solveEquation/stepThrough.js#L160-L180
train
metadelta/metadelta
packages/solver/lib/solveEquation/stepThrough.js
addSimplificationSteps
function addSimplificationSteps(steps, equation, debug=false) { let oldEquation = equation.clone(); const leftSteps = simplifyExpressionNode(equation.leftNode, false); const leftSubSteps = []; for (let i = 0; i < leftSteps.length; i++) { const step = leftSteps[i]; leftSubSteps.push(EquationStatus.addLe...
javascript
function addSimplificationSteps(steps, equation, debug=false) { let oldEquation = equation.clone(); const leftSteps = simplifyExpressionNode(equation.leftNode, false); const leftSubSteps = []; for (let i = 0; i < leftSteps.length; i++) { const step = leftSteps[i]; leftSubSteps.push(EquationStatus.addLe...
[ "function", "addSimplificationSteps", "(", "steps", ",", "equation", ",", "debug", "=", "false", ")", "{", "let", "oldEquation", "=", "equation", ".", "clone", "(", ")", ";", "const", "leftSteps", "=", "simplifyExpressionNode", "(", "equation", ".", "leftNode"...
Simplifies the equation and returns the simplification steps
[ "Simplifies", "the", "equation", "and", "returns", "the", "simplification", "steps" ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/solveEquation/stepThrough.js#L183-L251
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/basicsSearch/reduceZeroDividedByAnything.js
reduceZeroDividedByAnything
function reduceZeroDividedByAnything(node) { if (node.op !== '/') { return Node.Status.noChange(node); } if (node.args[0].value === '0') { const newNode = Node.Creator.constant(0); return Node.Status.nodeChanged( ChangeTypes.REDUCE_ZERO_NUMERATOR, node, newNode); } else { return Node.Sta...
javascript
function reduceZeroDividedByAnything(node) { if (node.op !== '/') { return Node.Status.noChange(node); } if (node.args[0].value === '0') { const newNode = Node.Creator.constant(0); return Node.Status.nodeChanged( ChangeTypes.REDUCE_ZERO_NUMERATOR, node, newNode); } else { return Node.Sta...
[ "function", "reduceZeroDividedByAnything", "(", "node", ")", "{", "if", "(", "node", ".", "op", "!==", "'/'", ")", "{", "return", "Node", ".", "Status", ".", "noChange", "(", "node", ")", ";", "}", "if", "(", "node", ".", "args", "[", "0", "]", "."...
If `node` is a fraction with 0 as the numerator, reduce the node to 0. Returns a Node.Status object.
[ "If", "node", "is", "a", "fraction", "with", "0", "as", "the", "numerator", "reduce", "the", "node", "to", "0", ".", "Returns", "a", "Node", ".", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/basicsSearch/reduceZeroDividedByAnything.js#L8-L20
train
Corey600/zoodubbo
lib/register.js
Register
function Register(client, path) { if (!(this instanceof Register)) return new Register(client); EventEmitter.call(this); this._client = client; this._path = path; // Register status. Supported 'unwatched' / 'pending' / 'watched'. this._status = 'unwatched'; this._watcher = this._watcher.bind(this); }
javascript
function Register(client, path) { if (!(this instanceof Register)) return new Register(client); EventEmitter.call(this); this._client = client; this._path = path; // Register status. Supported 'unwatched' / 'pending' / 'watched'. this._status = 'unwatched'; this._watcher = this._watcher.bind(this); }
[ "function", "Register", "(", "client", ",", "path", ")", "{", "if", "(", "!", "(", "this", "instanceof", "Register", ")", ")", "return", "new", "Register", "(", "client", ")", ";", "EventEmitter", ".", "call", "(", "this", ")", ";", "this", ".", "_cl...
Constructor of Register. @param client // The Client instance of zookeeper. @param path // The path of zookeeper node. @returns {Register} @constructor
[ "Constructor", "of", "Register", "." ]
c5700687898c82c18d1326ecaccc33fa20269b72
https://github.com/Corey600/zoodubbo/blob/c5700687898c82c18d1326ecaccc33fa20269b72/lib/register.js#L19-L28
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/basicsSearch/removeDivisionByOne.js
removeDivisionByOne
function removeDivisionByOne(node) { if (node.op !== '/') { return Node.Status.noChange(node); } const denominator = node.args[1]; if (!Node.Type.isConstant(denominator)) { return Node.Status.noChange(node); } let numerator = clone(node.args[0]); // if denominator is -1, we make the numerator neg...
javascript
function removeDivisionByOne(node) { if (node.op !== '/') { return Node.Status.noChange(node); } const denominator = node.args[1]; if (!Node.Type.isConstant(denominator)) { return Node.Status.noChange(node); } let numerator = clone(node.args[0]); // if denominator is -1, we make the numerator neg...
[ "function", "removeDivisionByOne", "(", "node", ")", "{", "if", "(", "node", ".", "op", "!==", "'/'", ")", "{", "return", "Node", ".", "Status", ".", "noChange", "(", "node", ")", ";", "}", "const", "denominator", "=", "node", ".", "args", "[", "1", ...
If `node` is a division operation of something by 1 or -1, we can remove the denominator. Returns a Node.Status object.
[ "If", "node", "is", "a", "division", "operation", "of", "something", "by", "1", "or", "-", "1", "we", "can", "remove", "the", "denominator", ".", "Returns", "a", "Node", ".", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/basicsSearch/removeDivisionByOne.js#L10-L41
train
gunjandatta/sprest-react
build/webparts/wp.js
function (wp) { var element = props.onRenderDisplayElement ? props.onRenderDisplayElement(wp) : null; if (element == null) { // Default the element element = props.displayElement ? React.createElement(props.displayElement, { cfg: wp.cfg }) : null; } // See if the ...
javascript
function (wp) { var element = props.onRenderDisplayElement ? props.onRenderDisplayElement(wp) : null; if (element == null) { // Default the element element = props.displayElement ? React.createElement(props.displayElement, { cfg: wp.cfg }) : null; } // See if the ...
[ "function", "(", "wp", ")", "{", "var", "element", "=", "props", ".", "onRenderDisplayElement", "?", "props", ".", "onRenderDisplayElement", "(", "wp", ")", ":", "null", ";", "if", "(", "element", "==", "null", ")", "{", "// Default the element", "element", ...
The render display component
[ "The", "render", "display", "component" ]
df7c1d7353ec3ad2c66db90f94b5c0054eb13229
https://github.com/gunjandatta/sprest-react/blob/df7c1d7353ec3ad2c66db90f94b5c0054eb13229/build/webparts/wp.js#L12-L23
train
gunjandatta/sprest-react
build/webparts/wp.js
function (wp) { var element = props.onRenderEditElement ? props.onRenderEditElement(wp) : null; if (element == null) { // Default the element element = props.editElement ? React.createElement(props.editElement, { cfg: wp.cfg, cfgElementId: props.cfgElementId }) : null; } ...
javascript
function (wp) { var element = props.onRenderEditElement ? props.onRenderEditElement(wp) : null; if (element == null) { // Default the element element = props.editElement ? React.createElement(props.editElement, { cfg: wp.cfg, cfgElementId: props.cfgElementId }) : null; } ...
[ "function", "(", "wp", ")", "{", "var", "element", "=", "props", ".", "onRenderEditElement", "?", "props", ".", "onRenderEditElement", "(", "wp", ")", ":", "null", ";", "if", "(", "element", "==", "null", ")", "{", "// Default the element", "element", "=",...
The render edit component
[ "The", "render", "edit", "component" ]
df7c1d7353ec3ad2c66db90f94b5c0054eb13229
https://github.com/gunjandatta/sprest-react/blob/df7c1d7353ec3ad2c66db90f94b5c0054eb13229/build/webparts/wp.js#L25-L36
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/stepThrough.js
stepThrough
function stepThrough(node, debug=false) { if (debug) { // eslint-disable-next-line console.log('\n\nSimplifying: ' + print(node, false, true)); } if(checks.hasUnsupportedNodes(node)) { return []; } let nodeStatus; const steps = []; const originalExpressionStr = print(node); const MAX_STEP...
javascript
function stepThrough(node, debug=false) { if (debug) { // eslint-disable-next-line console.log('\n\nSimplifying: ' + print(node, false, true)); } if(checks.hasUnsupportedNodes(node)) { return []; } let nodeStatus; const steps = []; const originalExpressionStr = print(node); const MAX_STEP...
[ "function", "stepThrough", "(", "node", ",", "debug", "=", "false", ")", "{", "if", "(", "debug", ")", "{", "// eslint-disable-next-line", "console", ".", "log", "(", "'\\n\\nSimplifying: '", "+", "print", "(", "node", ",", "false", ",", "true", ")", ")", ...
Given a mathjs expression node, steps through simplifying the expression. Returns a list of details about each step.
[ "Given", "a", "mathjs", "expression", "node", "steps", "through", "simplifying", "the", "expression", ".", "Returns", "a", "list", "of", "details", "about", "each", "step", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/stepThrough.js#L24-L59
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/stepThrough.js
step
function step(node) { let nodeStatus; node = flattenOperands(node); node = removeUnnecessaryParens(node, true); const simplificationTreeSearches = [ // Basic simplifications that we always try first e.g. (...)^0 => 1 basicsSearch, // Simplify any division chains so there's at most one division ope...
javascript
function step(node) { let nodeStatus; node = flattenOperands(node); node = removeUnnecessaryParens(node, true); const simplificationTreeSearches = [ // Basic simplifications that we always try first e.g. (...)^0 => 1 basicsSearch, // Simplify any division chains so there's at most one division ope...
[ "function", "step", "(", "node", ")", "{", "let", "nodeStatus", ";", "node", "=", "flattenOperands", "(", "node", ")", ";", "node", "=", "removeUnnecessaryParens", "(", "node", ",", "true", ")", ";", "const", "simplificationTreeSearches", "=", "[", "// Basic...
Given a mathjs expression node, performs a single step to simplify the expression. Returns a Node.Status object.
[ "Given", "a", "mathjs", "expression", "node", "performs", "a", "single", "step", "to", "simplify", "the", "expression", ".", "Returns", "a", "Node", ".", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/stepThrough.js#L63-L108
train
dylansmith/node-exif-renamer
lib/exif-renamer.js
function(errOrMessage, result) { var err = (errOrMessage instanceof Error) ? errOrMessage : new Error(errOrMessage); result = result || {}; result.error = err; result.status = 'error'; err.result = result; return err; }
javascript
function(errOrMessage, result) { var err = (errOrMessage instanceof Error) ? errOrMessage : new Error(errOrMessage); result = result || {}; result.error = err; result.status = 'error'; err.result = result; return err; }
[ "function", "(", "errOrMessage", ",", "result", ")", "{", "var", "err", "=", "(", "errOrMessage", "instanceof", "Error", ")", "?", "errOrMessage", ":", "new", "Error", "(", "errOrMessage", ")", ";", "result", "=", "result", "||", "{", "}", ";", "result",...
Generates a standardised Error object @param {Error|String} errOrMessage @param {Object} result @return {Error}
[ "Generates", "a", "standardised", "Error", "object" ]
47da224c84dc5d28d74877d6ef07c1c995ffc03c
https://github.com/dylansmith/node-exif-renamer/blob/47da224c84dc5d28d74877d6ef07c1c995ffc03c/lib/exif-renamer.js#L57-L64
train
dylansmith/node-exif-renamer
lib/exif-renamer.js
function(filepath, index) { index = index || 1; var params = this.get_path_info(filepath); params.index = index; var newpath = Handlebars.compile(this.config.sequential_template)(params); return (fs.existsSync(newpath)) ? this.get_sequential_filepath(filepath, index + 1) : newpat...
javascript
function(filepath, index) { index = index || 1; var params = this.get_path_info(filepath); params.index = index; var newpath = Handlebars.compile(this.config.sequential_template)(params); return (fs.existsSync(newpath)) ? this.get_sequential_filepath(filepath, index + 1) : newpat...
[ "function", "(", "filepath", ",", "index", ")", "{", "index", "=", "index", "||", "1", ";", "var", "params", "=", "this", ".", "get_path_info", "(", "filepath", ")", ";", "params", ".", "index", "=", "index", ";", "var", "newpath", "=", "Handlebars", ...
Returns the next available sequential filename for a given conflicting filepath @param {String} filepath @return {String}
[ "Returns", "the", "next", "available", "sequential", "filename", "for", "a", "given", "conflicting", "filepath" ]
47da224c84dc5d28d74877d6ef07c1c995ffc03c
https://github.com/dylansmith/node-exif-renamer/blob/47da224c84dc5d28d74877d6ef07c1c995ffc03c/lib/exif-renamer.js#L199-L205
train
YR/express-client
src/lib/history.js
sameOrigin
function sameOrigin(url) { let origin = `${location.protocol}//${location.hostname}`; if (location.port) { origin += `:${location.port}`; } return url && url.indexOf(origin) === 0; }
javascript
function sameOrigin(url) { let origin = `${location.protocol}//${location.hostname}`; if (location.port) { origin += `:${location.port}`; } return url && url.indexOf(origin) === 0; }
[ "function", "sameOrigin", "(", "url", ")", "{", "let", "origin", "=", "`", "${", "location", ".", "protocol", "}", "${", "location", ".", "hostname", "}", "`", ";", "if", "(", "location", ".", "port", ")", "{", "origin", "+=", "`", "${", "location", ...
Check if 'url' is from same origin @param {String} url @returns {Boolean}
[ "Check", "if", "url", "is", "from", "same", "origin" ]
784fb68453dd57dc24a42ce4ae439c4e77886115
https://github.com/YR/express-client/blob/784fb68453dd57dc24a42ce4ae439c4e77886115/src/lib/history.js#L301-L308
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/collectAndCombineSearch/addLikeTerms.js
addLikeTerms
function addLikeTerms(node, polynomialOnly=false) { if (!Node.Type.isOperator(node)) { return Node.Status.noChange(node); } let status; if (!polynomialOnly) { status = evaluateConstantSum(node); if (status.hasChanged()) { return status; } } status = addLikePolynomialTerms(node); if...
javascript
function addLikeTerms(node, polynomialOnly=false) { if (!Node.Type.isOperator(node)) { return Node.Status.noChange(node); } let status; if (!polynomialOnly) { status = evaluateConstantSum(node); if (status.hasChanged()) { return status; } } status = addLikePolynomialTerms(node); if...
[ "function", "addLikeTerms", "(", "node", ",", "polynomialOnly", "=", "false", ")", "{", "if", "(", "!", "Node", ".", "Type", ".", "isOperator", "(", "node", ")", ")", "{", "return", "Node", ".", "Status", ".", "noChange", "(", "node", ")", ";", "}", ...
Adds a list of nodes that are polynomial terms. Returns a Node.Status object.
[ "Adds", "a", "list", "of", "nodes", "that", "are", "polynomial", "terms", ".", "Returns", "a", "Node", ".", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/collectAndCombineSearch/addLikeTerms.js#L10-L29
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/simplify.js
simplify
function simplify(node, debug=false) { if(checks.hasUnsupportedNodes(node)) { return node; } const steps = stepThrough(node, debug); let simplifiedNode; if (steps.length > 0) { simplifiedNode = steps.pop().newNode; } else { // removing parens isn't counted as a step, so try it here simpli...
javascript
function simplify(node, debug=false) { if(checks.hasUnsupportedNodes(node)) { return node; } const steps = stepThrough(node, debug); let simplifiedNode; if (steps.length > 0) { simplifiedNode = steps.pop().newNode; } else { // removing parens isn't counted as a step, so try it here simpli...
[ "function", "simplify", "(", "node", ",", "debug", "=", "false", ")", "{", "if", "(", "checks", ".", "hasUnsupportedNodes", "(", "node", ")", ")", "{", "return", "node", ";", "}", "const", "steps", "=", "stepThrough", "(", "node", ",", "debug", ")", ...
Given a mathjs expression node, steps through simplifying the expression. Returns the simplified expression node.
[ "Given", "a", "mathjs", "expression", "node", "steps", "through", "simplifying", "the", "expression", ".", "Returns", "the", "simplified", "expression", "node", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/simplify.js#L14-L30
train
solderjs/osx-wifi-volume-remote
lib/osascript-vol-ctrl.js
get
function get(cb) { getRaw(function (err, num, muted) { timeouts.push(setTimeout(function () { cb(err, num, muted); }), 0); }); }
javascript
function get(cb) { getRaw(function (err, num, muted) { timeouts.push(setTimeout(function () { cb(err, num, muted); }), 0); }); }
[ "function", "get", "(", "cb", ")", "{", "getRaw", "(", "function", "(", "err", ",", "num", ",", "muted", ")", "{", "timeouts", ".", "push", "(", "setTimeout", "(", "function", "(", ")", "{", "cb", "(", "err", ",", "num", ",", "muted", ")", ";", ...
get pushes a timeout, which makes it get cancelled
[ "get", "pushes", "a", "timeout", "which", "makes", "it", "get", "cancelled" ]
a0d1fabb3e76d5fbc1b8fc41ee7b3fb68f2a7899
https://github.com/solderjs/osx-wifi-volume-remote/blob/a0d1fabb3e76d5fbc1b8fc41ee7b3fb68f2a7899/lib/osascript-vol-ctrl.js#L112-L118
train
mikolalysenko/dynamic-forest
dgraph.js
raiseLevel
function raiseLevel(edge) { var s = edge.s var t = edge.t //Update position in edge lists removeEdge(s, edge) removeEdge(t, edge) edge.level += 1 elist.insert(s.adjacent, edge) elist.insert(t.adjacent, edge) //Update flags for s if(s.euler.length <= edge.level) { s.euler.push(createEulerVert...
javascript
function raiseLevel(edge) { var s = edge.s var t = edge.t //Update position in edge lists removeEdge(s, edge) removeEdge(t, edge) edge.level += 1 elist.insert(s.adjacent, edge) elist.insert(t.adjacent, edge) //Update flags for s if(s.euler.length <= edge.level) { s.euler.push(createEulerVert...
[ "function", "raiseLevel", "(", "edge", ")", "{", "var", "s", "=", "edge", ".", "s", "var", "t", "=", "edge", ".", "t", "//Update position in edge lists", "removeEdge", "(", "s", ",", "edge", ")", "removeEdge", "(", "t", ",", "edge", ")", "edge", ".", ...
Raise the level of an edge, optionally inserting into higher level trees
[ "Raise", "the", "level", "of", "an", "edge", "optionally", "inserting", "into", "higher", "level", "trees" ]
321072cb8372961c0485bd86f6b5823325d7463b
https://github.com/mikolalysenko/dynamic-forest/blob/321072cb8372961c0485bd86f6b5823325d7463b/dgraph.js#L13-L42
train
mikolalysenko/dynamic-forest
dgraph.js
removeEdge
function removeEdge(vertex, edge) { var adj = vertex.adjacent var idx = elist.index(adj, edge) adj.splice(idx, 1) //Check if flag needs to be updated if(!((idx < adj.length && adj[idx].level === edge.level) || (idx > 0 && adj[idx-1].level === edge.level))) { vertex.euler[edge.level].setFlag(false) ...
javascript
function removeEdge(vertex, edge) { var adj = vertex.adjacent var idx = elist.index(adj, edge) adj.splice(idx, 1) //Check if flag needs to be updated if(!((idx < adj.length && adj[idx].level === edge.level) || (idx > 0 && adj[idx-1].level === edge.level))) { vertex.euler[edge.level].setFlag(false) ...
[ "function", "removeEdge", "(", "vertex", ",", "edge", ")", "{", "var", "adj", "=", "vertex", ".", "adjacent", "var", "idx", "=", "elist", ".", "index", "(", "adj", ",", "edge", ")", "adj", ".", "splice", "(", "idx", ",", "1", ")", "//Check if flag ne...
Remove edge from list and update flags
[ "Remove", "edge", "from", "list", "and", "update", "flags" ]
321072cb8372961c0485bd86f6b5823325d7463b
https://github.com/mikolalysenko/dynamic-forest/blob/321072cb8372961c0485bd86f6b5823325d7463b/dgraph.js#L45-L54
train
mikolalysenko/dynamic-forest
dgraph.js
link
function link(edge) { var es = edge.s.euler var et = edge.t.euler var euler = new Array(edge.level+1) for(var i=0; i<euler.length; ++i) { if(es.length <= i) { es.push(createEulerVertex(edge.s)) } if(et.length <= i) { et.push(createEulerVertex(edge.t)) } euler[i] = es[i].link(et[i...
javascript
function link(edge) { var es = edge.s.euler var et = edge.t.euler var euler = new Array(edge.level+1) for(var i=0; i<euler.length; ++i) { if(es.length <= i) { es.push(createEulerVertex(edge.s)) } if(et.length <= i) { et.push(createEulerVertex(edge.t)) } euler[i] = es[i].link(et[i...
[ "function", "link", "(", "edge", ")", "{", "var", "es", "=", "edge", ".", "s", ".", "euler", "var", "et", "=", "edge", ".", "t", ".", "euler", "var", "euler", "=", "new", "Array", "(", "edge", ".", "level", "+", "1", ")", "for", "(", "var", "...
Add an edge to all spanning forests with level <= edge.level
[ "Add", "an", "edge", "to", "all", "spanning", "forests", "with", "level", "<", "=", "edge", ".", "level" ]
321072cb8372961c0485bd86f6b5823325d7463b
https://github.com/mikolalysenko/dynamic-forest/blob/321072cb8372961c0485bd86f6b5823325d7463b/dgraph.js#L57-L71
train
mikolalysenko/dynamic-forest
dgraph.js
visit
function visit(node) { if(node.flag) { var v = node.value.value var adj = v.adjacent for(var ptr=elist.level(adj, level); ptr<adj.length && adj[ptr].level === level; ++ptr) { var e = adj[ptr] var es = e.s var et = e.t if(es.euler[level].path(et.euler[level])) { ...
javascript
function visit(node) { if(node.flag) { var v = node.value.value var adj = v.adjacent for(var ptr=elist.level(adj, level); ptr<adj.length && adj[ptr].level === level; ++ptr) { var e = adj[ptr] var es = e.s var et = e.t if(es.euler[level].path(et.euler[level])) { ...
[ "function", "visit", "(", "node", ")", "{", "if", "(", "node", ".", "flag", ")", "{", "var", "v", "=", "node", ".", "value", ".", "value", "var", "adj", "=", "v", ".", "adjacent", "for", "(", "var", "ptr", "=", "elist", ".", "level", "(", "adj"...
Search over tv for edge connecting to tw
[ "Search", "over", "tv", "for", "edge", "connecting", "to", "tw" ]
321072cb8372961c0485bd86f6b5823325d7463b
https://github.com/mikolalysenko/dynamic-forest/blob/321072cb8372961c0485bd86f6b5823325d7463b/dgraph.js#L97-L126
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/basicsSearch/removeMultiplicationByNegativeOne.js
removeMultiplicationByNegativeOne
function removeMultiplicationByNegativeOne(node) { if (node.op !== '*') { return Node.Status.noChange(node); } const minusOneIndex = node.args.findIndex(arg => { return Node.Type.isConstant(arg) && arg.value === '-1'; }); if (minusOneIndex < 0) { return Node.Status.noChange(node); } // We mig...
javascript
function removeMultiplicationByNegativeOne(node) { if (node.op !== '*') { return Node.Status.noChange(node); } const minusOneIndex = node.args.findIndex(arg => { return Node.Type.isConstant(arg) && arg.value === '-1'; }); if (minusOneIndex < 0) { return Node.Status.noChange(node); } // We mig...
[ "function", "removeMultiplicationByNegativeOne", "(", "node", ")", "{", "if", "(", "node", ".", "op", "!==", "'*'", ")", "{", "return", "Node", ".", "Status", ".", "noChange", "(", "node", ")", ";", "}", "const", "minusOneIndex", "=", "node", ".", "args"...
If `node` is a multiplication node with -1 as one of its operands, and a non constant as the next operand, remove -1 from the operands list and make the next term have a unary minus. Returns a Node.Status object.
[ "If", "node", "is", "a", "multiplication", "node", "with", "-", "1", "as", "one", "of", "its", "operands", "and", "a", "non", "constant", "as", "the", "next", "operand", "remove", "-", "1", "from", "the", "operands", "list", "and", "make", "the", "next...
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/basicsSearch/removeMultiplicationByNegativeOne.js#L12-L55
train
metadelta/metadelta
packages/solver/lib/Symbols.js
isSymbolTerm
function isSymbolTerm(node, symbolName) { if (Node.PolynomialTerm.isPolynomialTerm(node)) { const polyTerm = new Node.PolynomialTerm(node); if (polyTerm.getSymbolName() === symbolName) { return true; } } return false; }
javascript
function isSymbolTerm(node, symbolName) { if (Node.PolynomialTerm.isPolynomialTerm(node)) { const polyTerm = new Node.PolynomialTerm(node); if (polyTerm.getSymbolName() === symbolName) { return true; } } return false; }
[ "function", "isSymbolTerm", "(", "node", ",", "symbolName", ")", "{", "if", "(", "Node", ".", "PolynomialTerm", ".", "isPolynomialTerm", "(", "node", ")", ")", "{", "const", "polyTerm", "=", "new", "Node", ".", "PolynomialTerm", "(", "node", ")", ";", "i...
Returns if `node` is a polynomial term with symbol `symbolName`
[ "Returns", "if", "node", "is", "a", "polynomial", "term", "with", "symbol", "symbolName" ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/Symbols.js#L67-L75
train
Corey600/zoodubbo
index.js
ZD
function ZD(conf) { if (!(this instanceof ZD)) return new ZD(conf); var config = ('string' === typeof conf) ? { conn: conf } : (conf || {}); this.dubbo = config.dubbo; this.client = zookeeper.createClient(config.conn, { sessionTimeout: config.sessionTimeout, spinDelay: config.spinDelay, retries: con...
javascript
function ZD(conf) { if (!(this instanceof ZD)) return new ZD(conf); var config = ('string' === typeof conf) ? { conn: conf } : (conf || {}); this.dubbo = config.dubbo; this.client = zookeeper.createClient(config.conn, { sessionTimeout: config.sessionTimeout, spinDelay: config.spinDelay, retries: con...
[ "function", "ZD", "(", "conf", ")", "{", "if", "(", "!", "(", "this", "instanceof", "ZD", ")", ")", "return", "new", "ZD", "(", "conf", ")", ";", "var", "config", "=", "(", "'string'", "===", "typeof", "conf", ")", "?", "{", "conn", ":", "conf", ...
Constructor of ZD. @param {String|Object} conf // A String of host:port pairs or an object to set options. { dubbo: String // Dubbo version information. // The following content could reference: // https://github.com/alexguan/node-zookeeper-client#client-createclientconnectionstring-options conn: String, // Comm...
[ "Constructor", "of", "ZD", "." ]
c5700687898c82c18d1326ecaccc33fa20269b72
https://github.com/Corey600/zoodubbo/blob/c5700687898c82c18d1326ecaccc33fa20269b72/index.js#L31-L40
train
telegraph/trello-client
lib/trello.js
validateConfig
function validateConfig(config){ let errors = []; if( !config.key ){ errors.push('Missing config \'config.key\' - Undefined Trello Key'); } if( !config.token ){ errors.push('Missing config \'config.token\' - Undefined Trello Token'); } return errors; }
javascript
function validateConfig(config){ let errors = []; if( !config.key ){ errors.push('Missing config \'config.key\' - Undefined Trello Key'); } if( !config.token ){ errors.push('Missing config \'config.token\' - Undefined Trello Token'); } return errors; }
[ "function", "validateConfig", "(", "config", ")", "{", "let", "errors", "=", "[", "]", ";", "if", "(", "!", "config", ".", "key", ")", "{", "errors", ".", "push", "(", "'Missing config \\'config.key\\' - Undefined Trello Key'", ")", ";", "}", "if", "(", "!...
Validates the configuration object. @param {Object} config @param {String} config.key @param {String} config.token @return {Array<String>}
[ "Validates", "the", "configuration", "object", "." ]
949c0bc4b5b2717bda3d8d83ebcb9be65aa40b0b
https://github.com/telegraph/trello-client/blob/949c0bc4b5b2717bda3d8d83ebcb9be65aa40b0b/lib/trello.js#L20-L30
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
downloadFile
function downloadFile(url, outputPath) { const dir = path.dirname(outputPath); if (!fs.existsSync(dir)) { fs.mkdirSync(dir); } return new Promise((resolve, reject) => { const file = fs.createWriteStream(outputPath); const sendReq = request.get(url); sendReq.pipe(file); sendReq .on("response", (response...
javascript
function downloadFile(url, outputPath) { const dir = path.dirname(outputPath); if (!fs.existsSync(dir)) { fs.mkdirSync(dir); } return new Promise((resolve, reject) => { const file = fs.createWriteStream(outputPath); const sendReq = request.get(url); sendReq.pipe(file); sendReq .on("response", (response...
[ "function", "downloadFile", "(", "url", ",", "outputPath", ")", "{", "const", "dir", "=", "path", ".", "dirname", "(", "outputPath", ")", ";", "if", "(", "!", "fs", ".", "existsSync", "(", "dir", ")", ")", "{", "fs", ".", "mkdirSync", "(", "dir", "...
Downloads the URL as a file @param {string} url @param {string} outputPath @return {Promise<void>}
[ "Downloads", "the", "URL", "as", "a", "file" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L49-L86
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
createProject
function createProject(zipFile) { return cocoonSDK.ProjectAPI.createFromZipUpload(zipFile) .catch((error) => { console.error("Project couldn't be created."); console.trace(error); throw error; }); }
javascript
function createProject(zipFile) { return cocoonSDK.ProjectAPI.createFromZipUpload(zipFile) .catch((error) => { console.error("Project couldn't be created."); console.trace(error); throw error; }); }
[ "function", "createProject", "(", "zipFile", ")", "{", "return", "cocoonSDK", ".", "ProjectAPI", ".", "createFromZipUpload", "(", "zipFile", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "error", "(", "\"Project couldn't be created.\"", ...
Creates a new Cocoon Project from a zip file @param {File} zipFile @return {Promise<Project>}
[ "Creates", "a", "new", "Cocoon", "Project", "from", "a", "zip", "file" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L108-L115
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
updateConfig
function updateConfig(configXml, project) { return project.updateConfigXml(configXml) .catch((error) => { console.error("Project config with ID: " + project.id + " couldn't be updated."); console.trace(error); throw error; }); }
javascript
function updateConfig(configXml, project) { return project.updateConfigXml(configXml) .catch((error) => { console.error("Project config with ID: " + project.id + " couldn't be updated."); console.trace(error); throw error; }); }
[ "function", "updateConfig", "(", "configXml", ",", "project", ")", "{", "return", "project", ".", "updateConfigXml", "(", "configXml", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "error", "(", "\"Project config with ID: \"", "+", "p...
Updates the config.xml of the project with the one provided @param {string} configXml @param {Project} project @return {Promise<void>}
[ "Updates", "the", "config", ".", "xml", "of", "the", "project", "with", "the", "one", "provided" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L123-L130
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
updateConfigWithId
function updateConfigWithId(configXml, projectId) { return fetchProject(projectId) .then((project) => { return updateConfig(configXml, project); }) .catch((error) => { console.trace(error); throw error; }); }
javascript
function updateConfigWithId(configXml, projectId) { return fetchProject(projectId) .then((project) => { return updateConfig(configXml, project); }) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "updateConfigWithId", "(", "configXml", ",", "projectId", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "updateConfig", "(", "configXml", ",", "project", ")", ";", "}", ")...
Updates the config.xml of the project with the same ID with the XML provided @param {string} configXml @param {string} projectId @return {Promise<void>}
[ "Updates", "the", "config", ".", "xml", "of", "the", "project", "with", "the", "same", "ID", "with", "the", "XML", "provided" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L138-L147
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
deleteProject
function deleteProject(project) { return project.delete() .catch((error) => { console.error("Project with ID: " + project.id + " couldn't be deleted."); console.trace(error); throw error; }); }
javascript
function deleteProject(project) { return project.delete() .catch((error) => { console.error("Project with ID: " + project.id + " couldn't be deleted."); console.trace(error); throw error; }); }
[ "function", "deleteProject", "(", "project", ")", "{", "return", "project", ".", "delete", "(", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "error", "(", "\"Project with ID: \"", "+", "project", ".", "id", "+", "\" couldn't be del...
Deletes the project @param {Project} project @return {Promise<void>}
[ "Deletes", "the", "project" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L154-L161
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
deleteProjectWithId
function deleteProjectWithId(projectId) { return fetchProject(projectId) .then(deleteProject) .catch((error) => { console.trace(error); throw error; }); }
javascript
function deleteProjectWithId(projectId) { return fetchProject(projectId) .then(deleteProject) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "deleteProjectWithId", "(", "projectId", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "deleteProject", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "trace", "(", "error", ")", ";", "thr...
Deletes the project associated with the ID @param {string} projectId @return {Promise<void>}
[ "Deletes", "the", "project", "associated", "with", "the", "ID" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L168-L175
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
createProjectWithConfig
function createProjectWithConfig(zipFile, configXml) { return createProject(zipFile) .then((project) => { return updateConfig(configXml, project) .then(() => { return project; }) .catch((errorFromUpdate) => { deleteProject(project) .then(() => { console.error("The project with ID: " + project.id ...
javascript
function createProjectWithConfig(zipFile, configXml) { return createProject(zipFile) .then((project) => { return updateConfig(configXml, project) .then(() => { return project; }) .catch((errorFromUpdate) => { deleteProject(project) .then(() => { console.error("The project with ID: " + project.id ...
[ "function", "createProjectWithConfig", "(", "zipFile", ",", "configXml", ")", "{", "return", "createProject", "(", "zipFile", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "updateConfig", "(", "configXml", ",", "project", ")", ".", "then",...
Creates a new Cocoon Project from a zip file and a config XML @param {File} zipFile @param {string} configXml @return {Promise<Project>}
[ "Creates", "a", "new", "Cocoon", "Project", "from", "a", "zip", "file", "and", "a", "config", "XML" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L183-L207
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
updateSource
function updateSource(zipFile, project) { return project.updateZip(zipFile) .catch((error) => { console.error("Project source with ID: " + project.id + " couldn't be updated."); console.trace(error); throw error; }); }
javascript
function updateSource(zipFile, project) { return project.updateZip(zipFile) .catch((error) => { console.error("Project source with ID: " + project.id + " couldn't be updated."); console.trace(error); throw error; }); }
[ "function", "updateSource", "(", "zipFile", ",", "project", ")", "{", "return", "project", ".", "updateZip", "(", "zipFile", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "error", "(", "\"Project source with ID: \"", "+", "project", ...
Uploads the zip file as the new source code of the project @param {File} zipFile @param {Project} project @return {Promise<void>}
[ "Uploads", "the", "zip", "file", "as", "the", "new", "source", "code", "of", "the", "project" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L215-L222
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
updateSourceWithId
function updateSourceWithId(zipFile, projectId) { return fetchProject(projectId) .then((project) => { return updateSource(zipFile, project); }) .catch((error) => { console.trace(error); throw error; }); }
javascript
function updateSourceWithId(zipFile, projectId) { return fetchProject(projectId) .then((project) => { return updateSource(zipFile, project); }) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "updateSourceWithId", "(", "zipFile", ",", "projectId", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "updateSource", "(", "zipFile", ",", "project", ")", ";", "}", ")", ...
Uploads the zip file as the new source code of the project with the same ID @param {File} zipFile @param {string} projectId @return {Promise<void>}
[ "Uploads", "the", "zip", "file", "as", "the", "new", "source", "code", "of", "the", "project", "with", "the", "same", "ID" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L230-L239
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
compileProject
function compileProject(project) { return project.compile() .catch((error) => { console.error("Project " + project.name + " with ID: " + project.id + " couldn't be compiled."); console.trace(error); throw error; }); }
javascript
function compileProject(project) { return project.compile() .catch((error) => { console.error("Project " + project.name + " with ID: " + project.id + " couldn't be compiled."); console.trace(error); throw error; }); }
[ "function", "compileProject", "(", "project", ")", "{", "return", "project", ".", "compile", "(", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "error", "(", "\"Project \"", "+", "project", ".", "name", "+", "\" with ID: \"", "+",...
Places the project in the compilation queue @param {Project} project @return {Promise<void>}
[ "Places", "the", "project", "in", "the", "compilation", "queue" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L246-L253
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
compileProjectWithId
function compileProjectWithId(projectId) { return fetchProject(projectId) .then(compileProject) .catch((error) => { console.trace(error); throw error; }); }
javascript
function compileProjectWithId(projectId) { return fetchProject(projectId) .then(compileProject) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "compileProjectWithId", "(", "projectId", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "compileProject", ")", ".", "catch", "(", "(", "error", ")", "=>", "{", "console", ".", "trace", "(", "error", ")", ";", "t...
Places the project associated with the ID in the compilation queue @param {string} projectId @return {Promise<void>}
[ "Places", "the", "project", "associated", "with", "the", "ID", "in", "the", "compilation", "queue" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L260-L267
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
waitForCompletion
function waitForCompletion(project) { return new Promise((resolve, reject) => { let warned = false; project.refreshUntilCompleted((completed, error) => { if (!error) { if (completed) { if (warned) { readLine.clearLine(process.stdout); // clear "Waiting" line readLine.cursorTo(process.stdou...
javascript
function waitForCompletion(project) { return new Promise((resolve, reject) => { let warned = false; project.refreshUntilCompleted((completed, error) => { if (!error) { if (completed) { if (warned) { readLine.clearLine(process.stdout); // clear "Waiting" line readLine.cursorTo(process.stdou...
[ "function", "waitForCompletion", "(", "project", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "let", "warned", "=", "false", ";", "project", ".", "refreshUntilCompleted", "(", "(", "completed", ",", "error", ")"...
Waits for the project to finish compiling. Then calls the callback @param {Project} project @return {Promise<void>}
[ "Waits", "for", "the", "project", "to", "finish", "compiling", ".", "Then", "calls", "the", "callback" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L274-L297
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
downloadProjectCompilation
function downloadProjectCompilation(project, platform, outputDir) { return waitForCompletion(project) .then(() => { if (project.compilations[platform]) { if (project.compilations[platform].isReady()) { return downloadFile(project.compilations[platform].downloadLink, outputDir + "/" + project.name + "-" ...
javascript
function downloadProjectCompilation(project, platform, outputDir) { return waitForCompletion(project) .then(() => { if (project.compilations[platform]) { if (project.compilations[platform].isReady()) { return downloadFile(project.compilations[platform].downloadLink, outputDir + "/" + project.name + "-" ...
[ "function", "downloadProjectCompilation", "(", "project", ",", "platform", ",", "outputDir", ")", "{", "return", "waitForCompletion", "(", "project", ")", ".", "then", "(", "(", ")", "=>", "{", "if", "(", "project", ".", "compilations", "[", "platform", "]",...
Downloads the result of the latest platform compilation of the project @param {Project} project @param {string} platform @param {string} outputDir @return {Promise<void>}
[ "Downloads", "the", "result", "of", "the", "latest", "platform", "compilation", "of", "the", "project" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L306-L337
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
downloadProjectCompilationWithId
function downloadProjectCompilationWithId(projectId, platform, outputDir) { return fetchProject(projectId) .then((project) => { return downloadProjectCompilation(project, platform, outputDir); }) .catch((error) => { console.trace(error); throw error; }); }
javascript
function downloadProjectCompilationWithId(projectId, platform, outputDir) { return fetchProject(projectId) .then((project) => { return downloadProjectCompilation(project, platform, outputDir); }) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "downloadProjectCompilationWithId", "(", "projectId", ",", "platform", ",", "outputDir", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "downloadProjectCompilation", "(", "project"...
Downloads the result of the latest platform compilation of the project with the ID provided @param {string} projectId @param {string} platform @param {string} outputDir @return {Promise<void>}
[ "Downloads", "the", "result", "of", "the", "latest", "platform", "compilation", "of", "the", "project", "with", "the", "ID", "provided" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L346-L355
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
downloadProjectCompilations
function downloadProjectCompilations(project, outputDir) { const promises = []; for (const platform in project.compilations) { if (!project.compilations.hasOwnProperty(platform)) { continue; } promises.push(downloadProjectCompilation(project, platform, outputDir).catch(() => { return undefined; })); } ...
javascript
function downloadProjectCompilations(project, outputDir) { const promises = []; for (const platform in project.compilations) { if (!project.compilations.hasOwnProperty(platform)) { continue; } promises.push(downloadProjectCompilation(project, platform, outputDir).catch(() => { return undefined; })); } ...
[ "function", "downloadProjectCompilations", "(", "project", ",", "outputDir", ")", "{", "const", "promises", "=", "[", "]", ";", "for", "(", "const", "platform", "in", "project", ".", "compilations", ")", "{", "if", "(", "!", "project", ".", "compilations", ...
Downloads the results of the latest compilation of the project @param {Project} project @param {string} outputDir @return {Promise<void>}
[ "Downloads", "the", "results", "of", "the", "latest", "compilation", "of", "the", "project" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L363-L374
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
downloadProjectCompilationsWithId
function downloadProjectCompilationsWithId(projectId, outputDir) { return fetchProject(projectId) .then((project) => { return downloadProjectCompilations(project, outputDir); }) .catch((error) => { console.trace(error); throw error; }); }
javascript
function downloadProjectCompilationsWithId(projectId, outputDir) { return fetchProject(projectId) .then((project) => { return downloadProjectCompilations(project, outputDir); }) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "downloadProjectCompilationsWithId", "(", "projectId", ",", "outputDir", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "downloadProjectCompilations", "(", "project", ",", "outputD...
Downloads the results of the latest compilation of the project with the ID provided @param {string} projectId @param {string} outputDir @return {Promise<void>}
[ "Downloads", "the", "results", "of", "the", "latest", "compilation", "of", "the", "project", "with", "the", "ID", "provided" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L382-L391
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
checkProjectCompilationWithId
function checkProjectCompilationWithId(projectId, platform) { return fetchProject(projectId) .then((project) => { return checkProjectCompilation(project, platform); }) .catch((error) => { console.trace(error); throw error; }); }
javascript
function checkProjectCompilationWithId(projectId, platform) { return fetchProject(projectId) .then((project) => { return checkProjectCompilation(project, platform); }) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "checkProjectCompilationWithId", "(", "projectId", ",", "platform", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "checkProjectCompilation", "(", "project", ",", "platform", ")"...
Logs the result of the latest platform compilation of the project with the ID provided @param {string} projectId @param {string} platform @return {Promise<void>}
[ "Logs", "the", "result", "of", "the", "latest", "platform", "compilation", "of", "the", "project", "with", "the", "ID", "provided" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L432-L441
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
checkProjectCompilations
function checkProjectCompilations(project) { return waitForCompletion(project) .then(() => { for (const platform in project.compilations) { if (!project.compilations.hasOwnProperty(platform)) { continue; } const compilation = project.compilations[platform]; if (compilation.isReady()) { console.i...
javascript
function checkProjectCompilations(project) { return waitForCompletion(project) .then(() => { for (const platform in project.compilations) { if (!project.compilations.hasOwnProperty(platform)) { continue; } const compilation = project.compilations[platform]; if (compilation.isReady()) { console.i...
[ "function", "checkProjectCompilations", "(", "project", ")", "{", "return", "waitForCompletion", "(", "project", ")", ".", "then", "(", "(", ")", "=>", "{", "for", "(", "const", "platform", "in", "project", ".", "compilations", ")", "{", "if", "(", "!", ...
Logs the results of the latest compilation of the project @param {Project} project @return {Promise<void>}
[ "Logs", "the", "results", "of", "the", "latest", "compilation", "of", "the", "project" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L448-L473
train
CocoonIO/cocoon-cloud-sdk
sample/gulp/gulpfile.js
checkProjectCompilationsWithId
function checkProjectCompilationsWithId(projectId) { return fetchProject(projectId) .then((project) => { return checkProjectCompilations(project); }) .catch((error) => { console.trace(error); throw error; }); }
javascript
function checkProjectCompilationsWithId(projectId) { return fetchProject(projectId) .then((project) => { return checkProjectCompilations(project); }) .catch((error) => { console.trace(error); throw error; }); }
[ "function", "checkProjectCompilationsWithId", "(", "projectId", ")", "{", "return", "fetchProject", "(", "projectId", ")", ".", "then", "(", "(", "project", ")", "=>", "{", "return", "checkProjectCompilations", "(", "project", ")", ";", "}", ")", ".", "catch",...
Logs the results of the latest compilation of the project with the ID provided @param {string} projectId @return {Promise<void>}
[ "Logs", "the", "results", "of", "the", "latest", "compilation", "of", "the", "project", "with", "the", "ID", "provided" ]
b583faf2f3e21c3317358953494930af0cae0a3e
https://github.com/CocoonIO/cocoon-cloud-sdk/blob/b583faf2f3e21c3317358953494930af0cae0a3e/sample/gulp/gulpfile.js#L480-L489
train
roemhildtg/spectre-canjs
sp-form/demo/full/fixtures.js
getBase64
function getBase64 (file) { var reader = new FileReader(); reader.readAsDataURL(file); reader.onerror = function (error) { console.log('Error: ', error); }; return reader; }
javascript
function getBase64 (file) { var reader = new FileReader(); reader.readAsDataURL(file); reader.onerror = function (error) { console.log('Error: ', error); }; return reader; }
[ "function", "getBase64", "(", "file", ")", "{", "var", "reader", "=", "new", "FileReader", "(", ")", ";", "reader", ".", "readAsDataURL", "(", "file", ")", ";", "reader", ".", "onerror", "=", "function", "(", "error", ")", "{", "console", ".", "log", ...
this example uses fixtures to catch requests and simulate file upload server
[ "this", "example", "uses", "fixtures", "to", "catch", "requests", "and", "simulate", "file", "upload", "server" ]
5ae3b9a8454ba279c1e04dc3ca7943a72edbeb12
https://github.com/roemhildtg/spectre-canjs/blob/5ae3b9a8454ba279c1e04dc3ca7943a72edbeb12/sp-form/demo/full/fixtures.js#L4-L11
train
mphasize/sails-generate-ember-blueprints
templates/basic/api/blueprints/_util/actionUtil.js
function ( model, records, associations, sideload ) { sideload = sideload || false; var plural = Array.isArray( records ) ? true : false; var documentIdentifier = plural ? pluralize( model.globalId ) : model.globalId; //turn id into camelCase for ember documentIdentifier = camelCase(documentIdent...
javascript
function ( model, records, associations, sideload ) { sideload = sideload || false; var plural = Array.isArray( records ) ? true : false; var documentIdentifier = plural ? pluralize( model.globalId ) : model.globalId; //turn id into camelCase for ember documentIdentifier = camelCase(documentIdent...
[ "function", "(", "model", ",", "records", ",", "associations", ",", "sideload", ")", "{", "sideload", "=", "sideload", "||", "false", ";", "var", "plural", "=", "Array", ".", "isArray", "(", "records", ")", "?", "true", ":", "false", ";", "var", "docum...
Prepare records and populated associations to be consumed by Ember's DS.RESTAdapter @param {Collection} model Waterline collection object (returned from parseModel) @param {Array|Object} records A record or an array of records returned from a Waterline query @param {Associations} associations Definition of the associa...
[ "Prepare", "records", "and", "populated", "associations", "to", "be", "consumed", "by", "Ember", "s", "DS", ".", "RESTAdapter" ]
c85211c58e806b538f000d6f4f1a2b0cbe72d8c9
https://github.com/mphasize/sails-generate-ember-blueprints/blob/c85211c58e806b538f000d6f4f1a2b0cbe72d8c9/templates/basic/api/blueprints/_util/actionUtil.js#L42-L116
train
IndigoUnited/automaton
lib/grunt/worker.js
resetKeepAlive
function resetKeepAlive() { if (keepAliveTimeoutId) { clearTimeout(keepAliveTimeoutId); } keepAliveTimeoutId = setTimeout(function () { exit.call(process, 1); }, keepAliveTimeout); }
javascript
function resetKeepAlive() { if (keepAliveTimeoutId) { clearTimeout(keepAliveTimeoutId); } keepAliveTimeoutId = setTimeout(function () { exit.call(process, 1); }, keepAliveTimeout); }
[ "function", "resetKeepAlive", "(", ")", "{", "if", "(", "keepAliveTimeoutId", ")", "{", "clearTimeout", "(", "keepAliveTimeoutId", ")", ";", "}", "keepAliveTimeoutId", "=", "setTimeout", "(", "function", "(", ")", "{", "exit", ".", "call", "(", "process", ",...
function to reset the keep alive timeout once a keep alive message from the parent is received
[ "function", "to", "reset", "the", "keep", "alive", "timeout", "once", "a", "keep", "alive", "message", "from", "the", "parent", "is", "received" ]
3e86a76374a288e4f125b3e4994c9738f79c7028
https://github.com/IndigoUnited/automaton/blob/3e86a76374a288e4f125b3e4994c9738f79c7028/lib/grunt/worker.js#L27-L35
train
SAP/yaas-nodejs-client-sdk
yaas-pubsub.js
fixEventPayload
function fixEventPayload(events) { return new Promise(function (resolve, reject) { events.forEach(function(event) { try { event.payload = JSON.parse(event.payload); } catch (e) { console.log('Could not parse payload'); return reject(new...
javascript
function fixEventPayload(events) { return new Promise(function (resolve, reject) { events.forEach(function(event) { try { event.payload = JSON.parse(event.payload); } catch (e) { console.log('Could not parse payload'); return reject(new...
[ "function", "fixEventPayload", "(", "events", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "events", ".", "forEach", "(", "function", "(", "event", ")", "{", "try", "{", "event", ".", "payload", "=", "...
Convert PubSub event payloads into proper nested JSON
[ "Convert", "PubSub", "event", "payloads", "into", "proper", "nested", "JSON" ]
cb4de0048492f51b2fd1488c4d115f373f6cd98f
https://github.com/SAP/yaas-nodejs-client-sdk/blob/cb4de0048492f51b2fd1488c4d115f373f6cd98f/yaas-pubsub.js#L8-L20
train
SAP/yaas-nodejs-client-sdk
examples/checkout.js
getToken
function getToken(stripeCredentials) { return new Promise(function (resolve, reject) { var required = [ "stripe_secret", "credit_card_number", "credit_card_cvc", "credit_card_expiry_month", "credit_card_expiry_year" ]; if (stripeC...
javascript
function getToken(stripeCredentials) { return new Promise(function (resolve, reject) { var required = [ "stripe_secret", "credit_card_number", "credit_card_cvc", "credit_card_expiry_month", "credit_card_expiry_year" ]; if (stripeC...
[ "function", "getToken", "(", "stripeCredentials", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "var", "required", "=", "[", "\"stripe_secret\"", ",", "\"credit_card_number\"", ",", "\"credit_card_cvc\"", ",", "\...
helper function to get a stripe token
[ "helper", "function", "to", "get", "a", "stripe", "token" ]
cb4de0048492f51b2fd1488c4d115f373f6cd98f
https://github.com/SAP/yaas-nodejs-client-sdk/blob/cb4de0048492f51b2fd1488c4d115f373f6cd98f/examples/checkout.js#L141-L175
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/functionsSearch/index.js
functions
function functions(node) { if (!Node.Type.isFunction(node)) { return Node.Status.noChange(node); } for (let i = 0; i < FUNCTIONS.length; i++) { const nodeStatus = FUNCTIONS[i](node); if (nodeStatus.hasChanged()) { return nodeStatus; } } return Node.Status.noChange(node); }
javascript
function functions(node) { if (!Node.Type.isFunction(node)) { return Node.Status.noChange(node); } for (let i = 0; i < FUNCTIONS.length; i++) { const nodeStatus = FUNCTIONS[i](node); if (nodeStatus.hasChanged()) { return nodeStatus; } } return Node.Status.noChange(node); }
[ "function", "functions", "(", "node", ")", "{", "if", "(", "!", "Node", ".", "Type", ".", "isFunction", "(", "node", ")", ")", "{", "return", "Node", ".", "Status", ".", "noChange", "(", "node", ")", ";", "}", "for", "(", "let", "i", "=", "0", ...
Evaluates a function call if possible. Returns a Node.Status object.
[ "Evaluates", "a", "function", "call", "if", "possible", ".", "Returns", "a", "Node", ".", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/functionsSearch/index.js#L20-L32
train
metadelta/metadelta
packages/solver/lib/simplifyExpression/basicsSearch/removeExponentBaseOne.js
removeExponentBaseOne
function removeExponentBaseOne(node) { if (node.op === '^' && // an exponent with checks.resolvesToConstant(node.args[1]) && // a power not a symbol and Node.Type.isConstant(node.args[0]) && // a constant base node.args[0].value === '1') { // of value 1 ...
javascript
function removeExponentBaseOne(node) { if (node.op === '^' && // an exponent with checks.resolvesToConstant(node.args[1]) && // a power not a symbol and Node.Type.isConstant(node.args[0]) && // a constant base node.args[0].value === '1') { // of value 1 ...
[ "function", "removeExponentBaseOne", "(", "node", ")", "{", "if", "(", "node", ".", "op", "===", "'^'", "&&", "// an exponent with", "checks", ".", "resolvesToConstant", "(", "node", ".", "args", "[", "1", "]", ")", "&&", "// a power not a symbol and", "Node",...
If `node` is of the form 1^x, reduces it to a node of the form 1. Returns a Node.Status object.
[ "If", "node", "is", "of", "the", "form", "1^x", "reduces", "it", "to", "a", "node", "of", "the", "form", "1", ".", "Returns", "a", "Node", ".", "Status", "object", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/simplifyExpression/basicsSearch/removeExponentBaseOne.js#L10-L20
train
metadelta/metadelta
packages/solver/lib/checks/canRearrangeCoefficient.js
canRearrangeCoefficient
function canRearrangeCoefficient(node) { // implicit multiplication doesn't count as multiplication here, since it // represents a single term. if (node.op !== '*' || node.implicit) { return false; } if (node.args.length !== 2) { return false; } if (!Node.Type.isConstantOrConstantFraction(node.arg...
javascript
function canRearrangeCoefficient(node) { // implicit multiplication doesn't count as multiplication here, since it // represents a single term. if (node.op !== '*' || node.implicit) { return false; } if (node.args.length !== 2) { return false; } if (!Node.Type.isConstantOrConstantFraction(node.arg...
[ "function", "canRearrangeCoefficient", "(", "node", ")", "{", "// implicit multiplication doesn't count as multiplication here, since it", "// represents a single term.", "if", "(", "node", ".", "op", "!==", "'*'", "||", "node", ".", "implicit", ")", "{", "return", "false...
Returns true if the expression is a multiplication between a constant and polynomial without a coefficient.
[ "Returns", "true", "if", "the", "expression", "is", "a", "multiplication", "between", "a", "constant", "and", "polynomial", "without", "a", "coefficient", "." ]
ce0de09f5ab9b82da62f09f7807320a6989b9070
https://github.com/metadelta/metadelta/blob/ce0de09f5ab9b82da62f09f7807320a6989b9070/packages/solver/lib/checks/canRearrangeCoefficient.js#L7-L25
train
Wildhoney/EmberSockets
package/EmberSockets.js
connect
function connect(params) { /** * @property server * @type {String} */ var server = ''; (function determineHost(controller) { var host = $ember.get(controller, 'host'), port = $ember.get(controller, 'p...
javascript
function connect(params) { /** * @property server * @type {String} */ var server = ''; (function determineHost(controller) { var host = $ember.get(controller, 'host'), port = $ember.get(controller, 'p...
[ "function", "connect", "(", "params", ")", "{", "/**\n * @property server\n * @type {String}\n */", "var", "server", "=", "''", ";", "(", "function", "determineHost", "(", "controller", ")", "{", "var", "host", "=", "$ember", ".", "...
Responsible for establishing a connect to the Socket.io server. @method connect @param [params={}] {Object} @return {void}
[ "Responsible", "for", "establishing", "a", "connect", "to", "the", "Socket", ".", "io", "server", "." ]
ce005e4c75a983592054d6dda0249b5297f9fc64
https://github.com/Wildhoney/EmberSockets/blob/ce005e4c75a983592054d6dda0249b5297f9fc64/package/EmberSockets.js#L76-L116
train
Wildhoney/EmberSockets
package/EmberSockets.js
emit
function emit(eventName, params) { //jshint unused:false var args = Array.prototype.slice.call(arguments), scope = $ember.get(this, 'socket'); scope.emit.apply(scope, args); }
javascript
function emit(eventName, params) { //jshint unused:false var args = Array.prototype.slice.call(arguments), scope = $ember.get(this, 'socket'); scope.emit.apply(scope, args); }
[ "function", "emit", "(", "eventName", ",", "params", ")", "{", "//jshint unused:false", "var", "args", "=", "Array", ".", "prototype", ".", "slice", ".", "call", "(", "arguments", ")", ",", "scope", "=", "$ember", ".", "get", "(", "this", ",", "'socket'"...
Responsible for emitting an event to the waiting Socket.io server. @method emit @param eventName {String} @param params {Array} @return {void}
[ "Responsible", "for", "emitting", "an", "event", "to", "the", "waiting", "Socket", ".", "io", "server", "." ]
ce005e4c75a983592054d6dda0249b5297f9fc64
https://github.com/Wildhoney/EmberSockets/blob/ce005e4c75a983592054d6dda0249b5297f9fc64/package/EmberSockets.js#L139-L147
train
Wildhoney/EmberSockets
package/EmberSockets.js
_listen
function _listen() { var controllers = $ember.get(this, 'controllers'), getController = Ember.run.bind(this, this._getController), events = [], module = this, respond = function respond() { v...
javascript
function _listen() { var controllers = $ember.get(this, 'controllers'), getController = Ember.run.bind(this, this._getController), events = [], module = this, respond = function respond() { v...
[ "function", "_listen", "(", ")", "{", "var", "controllers", "=", "$ember", ".", "get", "(", "this", ",", "'controllers'", ")", ",", "getController", "=", "Ember", ".", "run", ".", "bind", "(", "this", ",", "this", ".", "_getController", ")", ",", "even...
Responsible for listening to events from Socket.io, and updating controller properties that subscribe to those events. @method _listen @return {void} @private
[ "Responsible", "for", "listening", "to", "events", "from", "Socket", ".", "io", "and", "updating", "controller", "properties", "that", "subscribe", "to", "those", "events", "." ]
ce005e4c75a983592054d6dda0249b5297f9fc64
https://github.com/Wildhoney/EmberSockets/blob/ce005e4c75a983592054d6dda0249b5297f9fc64/package/EmberSockets.js#L157-L211
train
Wildhoney/EmberSockets
package/EmberSockets.js
_getController
function _getController(name) { // Format the `name` to match what the lookup container is expecting, and then // we'll locate the controller from the `container`. name = `controller:${name}`; var controller = Ember.getOwner(this).lookup(name); if (!controll...
javascript
function _getController(name) { // Format the `name` to match what the lookup container is expecting, and then // we'll locate the controller from the `container`. name = `controller:${name}`; var controller = Ember.getOwner(this).lookup(name); if (!controll...
[ "function", "_getController", "(", "name", ")", "{", "// Format the `name` to match what the lookup container is expecting, and then", "// we'll locate the controller from the `container`.", "name", "=", "`", "${", "name", "}", "`", ";", "var", "controller", "=", "Ember", "."...
Responsible for retrieving a controller if it exists, and if it has defined a `events` hash. @method _getController @param name {String} @return {Object|Boolean} @private
[ "Responsible", "for", "retrieving", "a", "controller", "if", "it", "exists", "and", "if", "it", "has", "defined", "a", "events", "hash", "." ]
ce005e4c75a983592054d6dda0249b5297f9fc64
https://github.com/Wildhoney/EmberSockets/blob/ce005e4c75a983592054d6dda0249b5297f9fc64/package/EmberSockets.js#L292-L306
train
craterdog-bali/js-bali-component-framework
src/composites/Parameters.js
Parameters
function Parameters(collection) { abstractions.Composite.call(this, utilities.types.PARAMETERS); // the parameters are immutable so the methods are included in the constructor const duplicator = new utilities.Duplicator(); const copy = duplicator.duplicateComponent(collection); this.getCollection ...
javascript
function Parameters(collection) { abstractions.Composite.call(this, utilities.types.PARAMETERS); // the parameters are immutable so the methods are included in the constructor const duplicator = new utilities.Duplicator(); const copy = duplicator.duplicateComponent(collection); this.getCollection ...
[ "function", "Parameters", "(", "collection", ")", "{", "abstractions", ".", "Composite", ".", "call", "(", "this", ",", "utilities", ".", "types", ".", "PARAMETERS", ")", ";", "// the parameters are immutable so the methods are included in the constructor", "const", "du...
PUBLIC CONSTRUCTORS This constructor creates a new parameter catalog or list. @constructor @param {Collection} collection The collection of parameters. @returns {Parameters} The new parameter list.
[ "PUBLIC", "CONSTRUCTORS", "This", "constructor", "creates", "a", "new", "parameter", "catalog", "or", "list", "." ]
57279245e44d6ceef4debdb1d6132f48e464dcb8
https://github.com/craterdog-bali/js-bali-component-framework/blob/57279245e44d6ceef4debdb1d6132f48e464dcb8/src/composites/Parameters.js#L29-L73
train
craterdog-bali/js-bali-component-framework
src/elements/Duration.js
Duration
function Duration(value, parameters) { abstractions.Element.call(this, utilities.types.DURATION, parameters); value = value || 0; // the default value value = moment.duration(value); // since this element is immutable the value must be read-only this.getValue = function() { return value; }; r...
javascript
function Duration(value, parameters) { abstractions.Element.call(this, utilities.types.DURATION, parameters); value = value || 0; // the default value value = moment.duration(value); // since this element is immutable the value must be read-only this.getValue = function() { return value; }; r...
[ "function", "Duration", "(", "value", ",", "parameters", ")", "{", "abstractions", ".", "Element", ".", "call", "(", "this", ",", "utilities", ".", "types", ".", "DURATION", ",", "parameters", ")", ";", "value", "=", "value", "||", "0", ";", "// the defa...
PUBLIC CONSTRUCTOR This constructor creates a new duration element using the specified value. @param {String|Number} value The source string the duration. @param {Parameters} parameters Optional parameters used to parameterize this element. @returns {Duration} The new duration element.
[ "PUBLIC", "CONSTRUCTOR", "This", "constructor", "creates", "a", "new", "duration", "element", "using", "the", "specified", "value", "." ]
57279245e44d6ceef4debdb1d6132f48e464dcb8
https://github.com/craterdog-bali/js-bali-component-framework/blob/57279245e44d6ceef4debdb1d6132f48e464dcb8/src/elements/Duration.js#L31-L40
train
KleeGroup/focus-notifications
src/component/notification-center.js
select
function select(state) { const {notificationList, visibilityFilter, ...otherStateProperties} = state; return { //select the notification list from the state notificationList: selectNotifications(notificationList, visibilityFilter), visibilityFilter, ...otherStateProperties };...
javascript
function select(state) { const {notificationList, visibilityFilter, ...otherStateProperties} = state; return { //select the notification list from the state notificationList: selectNotifications(notificationList, visibilityFilter), visibilityFilter, ...otherStateProperties };...
[ "function", "select", "(", "state", ")", "{", "const", "{", "notificationList", ",", "visibilityFilter", ",", "...", "otherStateProperties", "}", "=", "state", ";", "return", "{", "//select the notification list from the state", "notificationList", ":", "selectNotificat...
Select the part of the state.
[ "Select", "the", "part", "of", "the", "state", "." ]
b9a529264b625a12c3d8d479f839f36f77b674f6
https://github.com/KleeGroup/focus-notifications/blob/b9a529264b625a12c3d8d479f839f36f77b674f6/src/component/notification-center.js#L98-L106
train
kissyteam/kissy-xtemplate
lib/kissy/5.0.0-alpha.3/build/tree-debug.js
function () { var self = this; self.renderChildren.apply(self, arguments); // only sync child sub tree at root node // only sync child sub tree at root node if (self === self.get('tree')) { updateSubTreeStatus(self, self, -1, 0); } }
javascript
function () { var self = this; self.renderChildren.apply(self, arguments); // only sync child sub tree at root node // only sync child sub tree at root node if (self === self.get('tree')) { updateSubTreeStatus(self, self, -1, 0); } }
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "self", ".", "renderChildren", ".", "apply", "(", "self", ",", "arguments", ")", ";", "// only sync child sub tree at root node", "// only sync child sub tree at root node", "if", "(", "self", "===", "sel...
override root 's renderChildren to apply depth and css recursively
[ "override", "root", "s", "renderChildren", "to", "apply", "depth", "and", "css", "recursively" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/5.0.0-alpha.3/build/tree-debug.js#L276-L283
train
kissyteam/kissy-xtemplate
lib/kissy/5.0.0-alpha.3/build/tree-debug.js
function () { var self = this; self.set('expanded', true); util.each(self.get('children'), function (c) { c.expandAll(); }); }
javascript
function () { var self = this; self.set('expanded', true); util.each(self.get('children'), function (c) { c.expandAll(); }); }
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "self", ".", "set", "(", "'expanded'", ",", "true", ")", ";", "util", ".", "each", "(", "self", ".", "get", "(", "'children'", ")", ",", "function", "(", "c", ")", "{", "c", ".", "expa...
Expand all descend nodes of current node
[ "Expand", "all", "descend", "nodes", "of", "current", "node" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/5.0.0-alpha.3/build/tree-debug.js#L331-L337
train
kissyteam/kissy-xtemplate
lib/kissy/5.0.0-alpha.3/build/tree-debug.js
function () { var self = this; self.set('expanded', false); util.each(self.get('children'), function (c) { c.collapseAll(); }); }
javascript
function () { var self = this; self.set('expanded', false); util.each(self.get('children'), function (c) { c.collapseAll(); }); }
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "self", ".", "set", "(", "'expanded'", ",", "false", ")", ";", "util", ".", "each", "(", "self", ".", "get", "(", "'children'", ")", ",", "function", "(", "c", ")", "{", "c", ".", "col...
Collapse all descend nodes of current node
[ "Collapse", "all", "descend", "nodes", "of", "current", "node" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/5.0.0-alpha.3/build/tree-debug.js#L341-L347
train
kissyteam/kissy-xtemplate
lib/kissy/5.0.0-alpha.3/build/tree-debug.js
getPreviousVisibleNode
function getPreviousVisibleNode(self) { var prev = self.prev(); if (!prev) { prev = self.get('parent'); } else { prev = getLastVisibleDescendant(prev); } return prev; }
javascript
function getPreviousVisibleNode(self) { var prev = self.prev(); if (!prev) { prev = self.get('parent'); } else { prev = getLastVisibleDescendant(prev); } return prev; }
[ "function", "getPreviousVisibleNode", "(", "self", ")", "{", "var", "prev", "=", "self", ".", "prev", "(", ")", ";", "if", "(", "!", "prev", ")", "{", "prev", "=", "self", ".", "get", "(", "'parent'", ")", ";", "}", "else", "{", "prev", "=", "get...
not same with _4ePreviousSourceNode in editor ! not same with _4ePreviousSourceNode in editor !
[ "not", "same", "with", "_4ePreviousSourceNode", "in", "editor", "!", "not", "same", "with", "_4ePreviousSourceNode", "in", "editor", "!" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/5.0.0-alpha.3/build/tree-debug.js#L504-L512
train
kissyteam/kissy-xtemplate
lib/kissy/5.0.0-alpha.3/build/tree-debug.js
getNextVisibleNode
function getNextVisibleNode(self) { var children = self.get('children'), n, parent; if (self.get('expanded') && children.length) { return children[0]; } // 没有展开或者根本没有儿子节点 // 深度遍历的下一个 // 没有展开或者根本没有儿子节点 // 深度遍历的下一个 n = self.next(); parent...
javascript
function getNextVisibleNode(self) { var children = self.get('children'), n, parent; if (self.get('expanded') && children.length) { return children[0]; } // 没有展开或者根本没有儿子节点 // 深度遍历的下一个 // 没有展开或者根本没有儿子节点 // 深度遍历的下一个 n = self.next(); parent...
[ "function", "getNextVisibleNode", "(", "self", ")", "{", "var", "children", "=", "self", ".", "get", "(", "'children'", ")", ",", "n", ",", "parent", ";", "if", "(", "self", ".", "get", "(", "'expanded'", ")", "&&", "children", ".", "length", ")", "{...
similar to _4eNextSourceNode in editor similar to _4eNextSourceNode in editor
[ "similar", "to", "_4eNextSourceNode", "in", "editor", "similar", "to", "_4eNextSourceNode", "in", "editor" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/5.0.0-alpha.3/build/tree-debug.js#L514-L528
train
taskcluster/taskcluster-lib-validate
src/publish.js
writeFile
function writeFile(filename, content) { fs.writeFileSync(filename, JSON.stringify(content, null, 2)); }
javascript
function writeFile(filename, content) { fs.writeFileSync(filename, JSON.stringify(content, null, 2)); }
[ "function", "writeFile", "(", "filename", ",", "content", ")", "{", "fs", ".", "writeFileSync", "(", "filename", ",", "JSON", ".", "stringify", "(", "content", ",", "null", ",", "2", ")", ")", ";", "}" ]
Write the schema to a local file. This is useful for debugging purposes mainly.
[ "Write", "the", "schema", "to", "a", "local", "file", ".", "This", "is", "useful", "for", "debugging", "purposes", "mainly", "." ]
825a80d37834f8c722ca256671ee0d2713fbecbc
https://github.com/taskcluster/taskcluster-lib-validate/blob/825a80d37834f8c722ca256671ee0d2713fbecbc/src/publish.js#L81-L83
train
taskcluster/taskcluster-lib-validate
src/publish.js
preview
function preview(name, content) { console.log('======='); console.log('JSON SCHEMA PREVIEW BEGIN: ' + name); console.log('======='); console.log(JSON.stringify(content, null, 2)); console.log('======='); console.log('JSON SCHEMA PREVIEW END: ' + name); return Promise.resolve(); }
javascript
function preview(name, content) { console.log('======='); console.log('JSON SCHEMA PREVIEW BEGIN: ' + name); console.log('======='); console.log(JSON.stringify(content, null, 2)); console.log('======='); console.log('JSON SCHEMA PREVIEW END: ' + name); return Promise.resolve(); }
[ "function", "preview", "(", "name", ",", "content", ")", "{", "console", ".", "log", "(", "'======='", ")", ";", "console", ".", "log", "(", "'JSON SCHEMA PREVIEW BEGIN: '", "+", "name", ")", ";", "console", ".", "log", "(", "'======='", ")", ";", "conso...
Write the generated schema to the console as pretty-json output. This is useful for debugging purposes
[ "Write", "the", "generated", "schema", "to", "the", "console", "as", "pretty", "-", "json", "output", ".", "This", "is", "useful", "for", "debugging", "purposes" ]
825a80d37834f8c722ca256671ee0d2713fbecbc
https://github.com/taskcluster/taskcluster-lib-validate/blob/825a80d37834f8c722ca256671ee0d2713fbecbc/src/publish.js#L89-L97
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
normalizeArray
function normalizeArray(parts, allowAboveRoot) { // level above root var up = 0, i = parts.length - 1, // splice costs a lot in ie // use new array instead newParts = [], last; for (; i >= 0; i--) { last = parts[i]; if ...
javascript
function normalizeArray(parts, allowAboveRoot) { // level above root var up = 0, i = parts.length - 1, // splice costs a lot in ie // use new array instead newParts = [], last; for (; i >= 0; i--) { last = parts[i]; if ...
[ "function", "normalizeArray", "(", "parts", ",", "allowAboveRoot", ")", "{", "// level above root", "var", "up", "=", "0", ",", "i", "=", "parts", ".", "length", "-", "1", ",", "// splice costs a lot in ie", "// use new array instead", "newParts", "=", "[", "]",...
Remove .. and . in path array
[ "Remove", "..", "and", ".", "in", "path", "array" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L632-L664
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (path) { var result = path.match(splitPathRe) || [], root = result[1] || '', dir = result[2] || ''; if (!root && !dir) { // No dirname return '.'; } if (dir) { // It has a dirname, ...
javascript
function (path) { var result = path.match(splitPathRe) || [], root = result[1] || '', dir = result[2] || ''; if (!root && !dir) { // No dirname return '.'; } if (dir) { // It has a dirname, ...
[ "function", "(", "path", ")", "{", "var", "result", "=", "path", ".", "match", "(", "splitPathRe", ")", "||", "[", "]", ",", "root", "=", "result", "[", "1", "]", "||", "''", ",", "dir", "=", "result", "[", "2", "]", "||", "''", ";", "if", "(...
Get dirname of path @param {String} path @return {String}
[ "Get", "dirname", "of", "path" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L806-L822
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function () { var self = this, count = 0, _queryMap, k; parseQuery(self); _queryMap = self._queryMap; for (k in _queryMap) { if (S.isArray(_queryMap[k])) { count += _queryMap[k].length; ...
javascript
function () { var self = this, count = 0, _queryMap, k; parseQuery(self); _queryMap = self._queryMap; for (k in _queryMap) { if (S.isArray(_queryMap[k])) { count += _queryMap[k].length; ...
[ "function", "(", ")", "{", "var", "self", "=", "this", ",", "count", "=", "0", ",", "_queryMap", ",", "k", ";", "parseQuery", "(", "self", ")", ";", "_queryMap", "=", "self", ".", "_queryMap", ";", "for", "(", "k", "in", "_queryMap", ")", "{", "i...
Parameter count. @return {Number}
[ "Parameter", "count", "." ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L958-L975
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (key) { var self = this, _queryMap; parseQuery(self); _queryMap = self._queryMap; if (key) { return key in _queryMap; } else { return !S.isEmptyObject(_queryMap); } }
javascript
function (key) { var self = this, _queryMap; parseQuery(self); _queryMap = self._queryMap; if (key) { return key in _queryMap; } else { return !S.isEmptyObject(_queryMap); } }
[ "function", "(", "key", ")", "{", "var", "self", "=", "this", ",", "_queryMap", ";", "parseQuery", "(", "self", ")", ";", "_queryMap", "=", "self", ".", "_queryMap", ";", "if", "(", "key", ")", "{", "return", "key", "in", "_queryMap", ";", "}", "el...
judge whether has query parameter @param {String} [key]
[ "judge", "whether", "has", "query", "parameter" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L981-L990
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (key) { var self = this, _queryMap; parseQuery(self); _queryMap = self._queryMap; if (key) { return _queryMap[key]; } else { return _queryMap; } }
javascript
function (key) { var self = this, _queryMap; parseQuery(self); _queryMap = self._queryMap; if (key) { return _queryMap[key]; } else { return _queryMap; } }
[ "function", "(", "key", ")", "{", "var", "self", "=", "this", ",", "_queryMap", ";", "parseQuery", "(", "self", ")", ";", "_queryMap", "=", "self", ".", "_queryMap", ";", "if", "(", "key", ")", "{", "return", "_queryMap", "[", "key", "]", ";", "}",...
Return parameter value corresponding to current key @param {String} [key]
[ "Return", "parameter", "value", "corresponding", "to", "current", "key" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L996-L1005
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (key, value) { var self = this, _queryMap; parseQuery(self); _queryMap = self._queryMap; if (typeof key === 'string') { self._queryMap[key] = value; } else { if (key instanceof Query) { key = key.get...
javascript
function (key, value) { var self = this, _queryMap; parseQuery(self); _queryMap = self._queryMap; if (typeof key === 'string') { self._queryMap[key] = value; } else { if (key instanceof Query) { key = key.get...
[ "function", "(", "key", ",", "value", ")", "{", "var", "self", "=", "this", ",", "_queryMap", ";", "parseQuery", "(", "self", ")", ";", "_queryMap", "=", "self", ".", "_queryMap", ";", "if", "(", "typeof", "key", "===", "'string'", ")", "{", "self", ...
Set parameter value corresponding to current key @param {String} key @param value @chainable
[ "Set", "parameter", "value", "corresponding", "to", "current", "key" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L1023-L1038
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (key) { var self = this; parseQuery(self); if (key) { delete self._queryMap[key]; } else { self._queryMap = {}; } return self; }
javascript
function (key) { var self = this; parseQuery(self); if (key) { delete self._queryMap[key]; } else { self._queryMap = {}; } return self; }
[ "function", "(", "key", ")", "{", "var", "self", "=", "this", ";", "parseQuery", "(", "self", ")", ";", "if", "(", "key", ")", "{", "delete", "self", ".", "_queryMap", "[", "key", "]", ";", "}", "else", "{", "self", ".", "_queryMap", "=", "{", ...
Remove parameter with specified name. @param {String} key @chainable
[ "Remove", "parameter", "with", "specified", "name", "." ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L1045-L1055
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (serializeArray) { var self = this; parseQuery(self); return S.param(self._queryMap, undefined, undefined, serializeArray); }
javascript
function (serializeArray) { var self = this; parseQuery(self); return S.param(self._queryMap, undefined, undefined, serializeArray); }
[ "function", "(", "serializeArray", ")", "{", "var", "self", "=", "this", ";", "parseQuery", "(", "self", ")", ";", "return", "S", ".", "param", "(", "self", ".", "_queryMap", ",", "undefined", ",", "undefined", ",", "serializeArray", ")", ";", "}" ]
Serialize query to string. @param {Boolean} [serializeArray=true] whether append [] to key name when value 's type is array
[ "Serialize", "query", "to", "string", "." ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L1093-L1097
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function () { var uri = new Uri(), self = this; S.each(REG_INFO, function (index, key) { uri[key] = self[key]; }); uri.query = uri.query.clone(); return uri; }
javascript
function () { var uri = new Uri(), self = this; S.each(REG_INFO, function (index, key) { uri[key] = self[key]; }); uri.query = uri.query.clone(); return uri; }
[ "function", "(", ")", "{", "var", "uri", "=", "new", "Uri", "(", ")", ",", "self", "=", "this", ";", "S", ".", "each", "(", "REG_INFO", ",", "function", "(", "index", ",", "key", ")", "{", "uri", "[", "key", "]", "=", "self", "[", "key", "]",...
Return a cloned new instance. @return {KISSY.Uri}
[ "Return", "a", "cloned", "new", "instance", "." ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L1203-L1210
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (module) { var factory = module.factory, exports; if (typeof factory === 'function') { // compatible and efficiency // KISSY.add(function(S,undefined){}) var require; if (module.requires && module.requires....
javascript
function (module) { var factory = module.factory, exports; if (typeof factory === 'function') { // compatible and efficiency // KISSY.add(function(S,undefined){}) var require; if (module.requires && module.requires....
[ "function", "(", "module", ")", "{", "var", "factory", "=", "module", ".", "factory", ",", "exports", ";", "if", "(", "typeof", "factory", "===", "'function'", ")", "{", "// compatible and efficiency", "// KISSY.add(function(S,undefined){})", "var", "require", ";"...
Attach specified module. @param {KISSY.Loader.Module} module module instance
[ "Attach", "specified", "module", "." ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L1865-L1893
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (relativeName, fn) { relativeName = Utils.getModNamesAsArray(relativeName); return KISSY.use(Utils.normalDepModuleName(this.name, relativeName), fn); }
javascript
function (relativeName, fn) { relativeName = Utils.getModNamesAsArray(relativeName); return KISSY.use(Utils.normalDepModuleName(this.name, relativeName), fn); }
[ "function", "(", "relativeName", ",", "fn", ")", "{", "relativeName", "=", "Utils", ".", "getModNamesAsArray", "(", "relativeName", ")", ";", "return", "KISSY", ".", "use", "(", "Utils", ".", "normalDepModuleName", "(", "this", ".", "name", ",", "relativeNam...
resolve module by name. @param {String|String[]} relativeName relative module's name @param {Function|Object} fn KISSY.use callback @returns {String} resolved module name
[ "resolve", "module", "by", "name", "." ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L2275-L2278
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function () { var self = this, uri; if (!self.uri) { // path can be specified if (self.path) { uri = new S.Uri(self.path); } else { uri = S.Config.resolveModFn(self); } self.ur...
javascript
function () { var self = this, uri; if (!self.uri) { // path can be specified if (self.path) { uri = new S.Uri(self.path); } else { uri = S.Config.resolveModFn(self); } self.ur...
[ "function", "(", ")", "{", "var", "self", "=", "this", ",", "uri", ";", "if", "(", "!", "self", ".", "uri", ")", "{", "// path can be specified", "if", "(", "self", ".", "path", ")", "{", "uri", "=", "new", "S", ".", "Uri", "(", "self", ".", "p...
Get the path uri of current module if load dynamically @return {KISSY.Uri}
[ "Get", "the", "path", "uri", "of", "current", "module", "if", "load", "dynamically" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L2366-L2378
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function () { var self = this, requiresWithAlias = self.requiresWithAlias, requires = self.requires; if (!requires || requires.length === 0) { return requires || []; } else if (!requiresWithAlias) { self.requiresWithAlia...
javascript
function () { var self = this, requiresWithAlias = self.requiresWithAlias, requires = self.requires; if (!requires || requires.length === 0) { return requires || []; } else if (!requiresWithAlias) { self.requiresWithAlia...
[ "function", "(", ")", "{", "var", "self", "=", "this", ",", "requiresWithAlias", "=", "self", ".", "requiresWithAlias", ",", "requires", "=", "self", ".", "requires", ";", "if", "(", "!", "requires", "||", "requires", ".", "length", "===", "0", ")", "{...
get alias required module names @returns {String[]} alias required module names
[ "get", "alias", "required", "module", "names" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L2430-L2441
train
kissyteam/kissy-xtemplate
lib/kissy/seed.js
function (moduleName, refName) { if (moduleName) { var moduleNames = Utils.unalias(Utils.normalizeModNamesWithAlias([moduleName], refName)); Utils.attachModsRecursively(moduleNames); return Utils.getModules(moduleNames)[1]; } }
javascript
function (moduleName, refName) { if (moduleName) { var moduleNames = Utils.unalias(Utils.normalizeModNamesWithAlias([moduleName], refName)); Utils.attachModsRecursively(moduleNames); return Utils.getModules(moduleNames)[1]; } }
[ "function", "(", "moduleName", ",", "refName", ")", "{", "if", "(", "moduleName", ")", "{", "var", "moduleNames", "=", "Utils", ".", "unalias", "(", "Utils", ".", "normalizeModNamesWithAlias", "(", "[", "moduleName", "]", ",", "refName", ")", ")", ";", "...
get module exports from KISSY module cache @param {String} moduleName module name @param {String} refName internal usage @member KISSY @return {*} exports of specified module
[ "get", "module", "exports", "from", "KISSY", "module", "cache" ]
1d454ab624c867d6a862d63dba576f8d24c6dcfc
https://github.com/kissyteam/kissy-xtemplate/blob/1d454ab624c867d6a862d63dba576f8d24c6dcfc/lib/kissy/seed.js#L3604-L3610
train
craterdog-bali/js-bali-component-framework
src/collections/Stack.js
Stack
function Stack(parameters) { parameters = parameters || new composites.Parameters(new Catalog()); if (!parameters.getParameter('$type')) parameters.setParameter('$type', '/bali/collections/Stack/v1'); abstractions.Collection.call(this, utilities.types.STACK, parameters); // the capacity and array are p...
javascript
function Stack(parameters) { parameters = parameters || new composites.Parameters(new Catalog()); if (!parameters.getParameter('$type')) parameters.setParameter('$type', '/bali/collections/Stack/v1'); abstractions.Collection.call(this, utilities.types.STACK, parameters); // the capacity and array are p...
[ "function", "Stack", "(", "parameters", ")", "{", "parameters", "=", "parameters", "||", "new", "composites", ".", "Parameters", "(", "new", "Catalog", "(", ")", ")", ";", "if", "(", "!", "parameters", ".", "getParameter", "(", "'$type'", ")", ")", "para...
PUBLIC CONSTRUCTORS This constructor creates a new stack component with optional parameters that are used to parameterize its type. @param {Parameters} parameters Optional parameters used to parameterize this collection. @returns {Stack} The new stack.
[ "PUBLIC", "CONSTRUCTORS", "This", "constructor", "creates", "a", "new", "stack", "component", "with", "optional", "parameters", "that", "are", "used", "to", "parameterize", "its", "type", "." ]
57279245e44d6ceef4debdb1d6132f48e464dcb8
https://github.com/craterdog-bali/js-bali-component-framework/blob/57279245e44d6ceef4debdb1d6132f48e464dcb8/src/collections/Stack.js#L40-L110
train
bq/corbel-js
src/assets/assets-builder.js
function(params) { var options = params ? corbel.utils.clone(params) : {}; var args = corbel.utils.extend(options, { url: this._buildUri(this.uri, this.id), method: corbel.request.method.GET, query: params ? corbel.utils.serializeParams(params) : null }); return this.r...
javascript
function(params) { var options = params ? corbel.utils.clone(params) : {}; var args = corbel.utils.extend(options, { url: this._buildUri(this.uri, this.id), method: corbel.request.method.GET, query: params ? corbel.utils.serializeParams(params) : null }); return this.r...
[ "function", "(", "params", ")", "{", "var", "options", "=", "params", "?", "corbel", ".", "utils", ".", "clone", "(", "params", ")", ":", "{", "}", ";", "var", "args", "=", "corbel", ".", "utils", ".", "extend", "(", "options", ",", "{", "url", "...
Gets my user assets @memberof corbel.Assets.AssetsBuilder.prototype @param {object} [params] Params of a {@link corbel.request} @return {Promise} Promise that resolves with an Asset or rejects with a {@link CorbelError}
[ "Gets", "my", "user", "assets" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/src/assets/assets-builder.js#L34-L46
train
bq/corbel-js
src/assets/assets-builder.js
function(data) { return this.request({ url: this._buildUri(this.uri), method: corbel.request.method.POST, data: data }). then(function(res) { return corbel.Services.getLocationId(res); }); }
javascript
function(data) { return this.request({ url: this._buildUri(this.uri), method: corbel.request.method.POST, data: data }). then(function(res) { return corbel.Services.getLocationId(res); }); }
[ "function", "(", "data", ")", "{", "return", "this", ".", "request", "(", "{", "url", ":", "this", ".", "_buildUri", "(", "this", ".", "uri", ")", ",", "method", ":", "corbel", ".", "request", ".", "method", ".", "POST", ",", "data", ":", "data", ...
Creates a new asset @memberof corbel.Assets.AssetsBuilder.prototype @param {object} data Contains the data of the new asset @param {string} data.userId The user id @param {string} data.name The asset name @param {date} data.expire Expire date @param {boolean} data.active If asset is a...
[ "Creates", "a", "new", "asset" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/src/assets/assets-builder.js#L89-L98
train
bq/corbel-js
src/assets/assets-builder.js
function(params) { var args = params ? corbel.utils.clone(params) : {}; args.url = this._buildUri(this.uri + '/access'); args.method = corbel.request.method.GET; args.noRedirect = true; var that = this; return this.request(args). then(function(response) { return that....
javascript
function(params) { var args = params ? corbel.utils.clone(params) : {}; args.url = this._buildUri(this.uri + '/access'); args.method = corbel.request.method.GET; args.noRedirect = true; var that = this; return this.request(args). then(function(response) { return that....
[ "function", "(", "params", ")", "{", "var", "args", "=", "params", "?", "corbel", ".", "utils", ".", "clone", "(", "params", ")", ":", "{", "}", ";", "args", ".", "url", "=", "this", ".", "_buildUri", "(", "this", ".", "uri", "+", "'/access'", ")...
Generates a JWT that contains the scopes of the actual user's assets and redirects to iam to upgrade user's token @memberof corbel.Assets.AssetsBuilder.prototype @return {Promise} Promise that resolves to a redirection to iam/oauth/token/upgrade or rejects with a {@link CorbelError}
[ "Generates", "a", "JWT", "that", "contains", "the", "scopes", "of", "the", "actual", "user", "s", "assets", "and", "redirects", "to", "iam", "to", "upgrade", "user", "s", "token" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/src/assets/assets-builder.js#L105-L123
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(data, cb) { if (corbel.Config.isNode) { // in node transform to stream cb(corbel.utils.toURLEncoded(data)); } else { // in browser transform to blob cb(corbel.utils.dataURItoBlob(data)); ...
javascript
function(data, cb) { if (corbel.Config.isNode) { // in node transform to stream cb(corbel.utils.toURLEncoded(data)); } else { // in browser transform to blob cb(corbel.utils.dataURItoBlob(data)); ...
[ "function", "(", "data", ",", "cb", ")", "{", "if", "(", "corbel", ".", "Config", ".", "isNode", ")", "{", "// in node transform to stream", "cb", "(", "corbel", ".", "utils", ".", "toURLEncoded", "(", "data", ")", ")", ";", "}", "else", "{", "// in br...
dataURI serialize handler @param {object} data @return {string}
[ "dataURI", "serialize", "handler" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L2384-L2392
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(response, resolver, callbackSuccess, callbackError) { //xhr = xhr.target || xhr || {}; var statusCode = xhrSuccessStatus[response.status] || response.status, statusType = Number(response.status.toString()[0]), promiseResponse; var data = res...
javascript
function(response, resolver, callbackSuccess, callbackError) { //xhr = xhr.target || xhr || {}; var statusCode = xhrSuccessStatus[response.status] || response.status, statusType = Number(response.status.toString()[0]), promiseResponse; var data = res...
[ "function", "(", "response", ",", "resolver", ",", "callbackSuccess", ",", "callbackError", ")", "{", "//xhr = xhr.target || xhr || {};", "var", "statusCode", "=", "xhrSuccessStatus", "[", "response", ".", "status", "]", "||", "response", ".", "status", ",", "stat...
Process server response @param {object} response @param {object} resolver @param {function} callbackSuccess @param {function} callbackError
[ "Process", "server", "response" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L2574-L2627
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(params) { var that = this; return corbel.request.send(params, that.driver).then(function(response) { that.driver.config.set(corbel.Services._FORCE_UPDATE_STATUS, 0); that.driver.config.set(corbel.Services._UNAUTHORIZED_NUM_RETRIES, 0); ...
javascript
function(params) { var that = this; return corbel.request.send(params, that.driver).then(function(response) { that.driver.config.set(corbel.Services._FORCE_UPDATE_STATUS, 0); that.driver.config.set(corbel.Services._UNAUTHORIZED_NUM_RETRIES, 0); ...
[ "function", "(", "params", ")", "{", "var", "that", "=", "this", ";", "return", "corbel", ".", "request", ".", "send", "(", "params", ",", "that", ".", "driver", ")", ".", "then", "(", "function", "(", "response", ")", "{", "that", ".", "driver", "...
Internal request method. Has force update behavior @param {object} params @return {Promise}
[ "Internal", "request", "method", ".", "Has", "force", "update", "behavior" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L2918-L2948
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(tokenObject) { var that = this; if (this.driver._refreshHandlerPromise) { return this.driver._refreshHandlerPromise; } if (tokenObject.refreshToken) { console.log('corbeljs:services:token:refresh'); ...
javascript
function(tokenObject) { var that = this; if (this.driver._refreshHandlerPromise) { return this.driver._refreshHandlerPromise; } if (tokenObject.refreshToken) { console.log('corbeljs:services:token:refresh'); ...
[ "function", "(", "tokenObject", ")", "{", "var", "that", "=", "this", ";", "if", "(", "this", ".", "driver", ".", "_refreshHandlerPromise", ")", "{", "return", "this", ".", "driver", ".", "_refreshHandlerPromise", ";", "}", "if", "(", "tokenObject", ".", ...
Default token refresh handler Only requested once at the same time @return {Promise}
[ "Default", "token", "refresh", "handler", "Only", "requested", "once", "at", "the", "same", "time" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L2961-L2989
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(params) { var accessToken = params.accessToken ? params.accessToken : this.driver.config .get(corbel.Iam.IAM_TOKEN, {}).accessToken; if (accessToken && !params.headers.Authorization) { params.headers.Authorization = 'Bearer ' + accessToke...
javascript
function(params) { var accessToken = params.accessToken ? params.accessToken : this.driver.config .get(corbel.Iam.IAM_TOKEN, {}).accessToken; if (accessToken && !params.headers.Authorization) { params.headers.Authorization = 'Bearer ' + accessToke...
[ "function", "(", "params", ")", "{", "var", "accessToken", "=", "params", ".", "accessToken", "?", "params", ".", "accessToken", ":", "this", ".", "driver", ".", "config", ".", "get", "(", "corbel", ".", "Iam", ".", "IAM_TOKEN", ",", "{", "}", ")", "...
Add Authorization header with default tokenObject @param {object} params request builded params
[ "Add", "Authorization", "header", "with", "default", "tokenObject" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L2995-L3007
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(responseObject) { var location = this._getLocationHeader(responseObject); return location ? location.substr(location.lastIndexOf('/') + 1) : undefined; }
javascript
function(responseObject) { var location = this._getLocationHeader(responseObject); return location ? location.substr(location.lastIndexOf('/') + 1) : undefined; }
[ "function", "(", "responseObject", ")", "{", "var", "location", "=", "this", ".", "_getLocationHeader", "(", "responseObject", ")", ";", "return", "location", "?", "location", ".", "substr", "(", "location", ".", "lastIndexOf", "(", "'/'", ")", "+", "1", "...
Extract a id from the location header of a requestXHR @memberof corbel.Services @param {Promise} responseObject response from a requestXHR @return {String} id from the Location
[ "Extract", "a", "id", "from", "the", "location", "header", "of", "a", "requestXHR" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3161-L3164
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(responseObject) { responseObject = responseObject || {}; if (responseObject.xhr) { return responseObject.xhr.getResponseHeader('Location'); } else if (responseObject.response && responseObject.response.headers.location) { ...
javascript
function(responseObject) { responseObject = responseObject || {}; if (responseObject.xhr) { return responseObject.xhr.getResponseHeader('Location'); } else if (responseObject.response && responseObject.response.headers.location) { ...
[ "function", "(", "responseObject", ")", "{", "responseObject", "=", "responseObject", "||", "{", "}", ";", "if", "(", "responseObject", ".", "xhr", ")", "{", "return", "responseObject", ".", "xhr", ".", "getResponseHeader", "(", "'Location'", ")", ";", "}", ...
Extracts the location header @param {Promise} responseObject response from a requestXHR @returns {String} location header content @private
[ "Extracts", "the", "location", "header" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3179-L3187
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(client) { console.log('iamInterface.client.create', client); return this.request({ url: this._buildUriWithDomain(this.uri), method: corbel.request.method.POST, data: client }).then(function(res) { ...
javascript
function(client) { console.log('iamInterface.client.create', client); return this.request({ url: this._buildUriWithDomain(this.uri), method: corbel.request.method.POST, data: client }).then(function(res) { ...
[ "function", "(", "client", ")", "{", "console", ".", "log", "(", "'iamInterface.client.create'", ",", "client", ")", ";", "return", "this", ".", "request", "(", "{", "url", ":", "this", ".", "_buildUriWithDomain", "(", "this", ".", "uri", ")", ",", "meth...
Adds a new client. @method @memberOf corbel.Iam.ClientBuilder @param {Object} client The client data. @param {String} client.id Client id. @param {String} client.name Client domain (obligatory). @param {String} client.key Client k...
[ "Adds", "a", "new", "client", "." ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3448-L3457
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(client) { console.log('iamInterface.client.update', client); corbel.validate.value('clientId', this.clientId); return this.request({ url: this._buildUriWithDomain(this.uri + '/' + this.clientId), method: corbel.request.meth...
javascript
function(client) { console.log('iamInterface.client.update', client); corbel.validate.value('clientId', this.clientId); return this.request({ url: this._buildUriWithDomain(this.uri + '/' + this.clientId), method: corbel.request.meth...
[ "function", "(", "client", ")", "{", "console", ".", "log", "(", "'iamInterface.client.update'", ",", "client", ")", ";", "corbel", ".", "validate", ".", "value", "(", "'clientId'", ",", "this", ".", "clientId", ")", ";", "return", "this", ".", "request", ...
Updates a client. @method @memberOf corbel.Iam.ClientBuilder @param {Object} client The client data. @param {String} client.name Client domain (obligatory). @param {String} client.key Client key (obligatory). @param {String} client.version ...
[ "Updates", "a", "client", "." ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3515-L3523
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(domain) { console.log('iamInterface.domain.update', domain); return this.request({ url: this._buildUriWithDomain(this.uri), method: corbel.request.method.PUT, data: domain }); }
javascript
function(domain) { console.log('iamInterface.domain.update', domain); return this.request({ url: this._buildUriWithDomain(this.uri), method: corbel.request.method.PUT, data: domain }); }
[ "function", "(", "domain", ")", "{", "console", ".", "log", "(", "'iamInterface.domain.update'", ",", "domain", ")", ";", "return", "this", ".", "request", "(", "{", "url", ":", "this", ".", "_buildUriWithDomain", "(", "this", ".", "uri", ")", ",", "meth...
Updates a domain. @method @memberOf corbel.Iam.DomainBuilder @param {Object} domain The domain data. @param {String} domain.description Description of the domain. @param {String} domain.authUrl Authentication url. @param {String} domain.allowedDomains Allowed domains. @param {...
[ "Updates", "a", "domain", "." ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3657-L3664
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(scope) { corbel.validate.failIfIsDefined(this.id, 'This function not allowed scope identifier'); console.log('iamInterface.scope.create', scope); return this.request({ url: this._buildUriWithDomain(this.uri), method: corbel...
javascript
function(scope) { corbel.validate.failIfIsDefined(this.id, 'This function not allowed scope identifier'); console.log('iamInterface.scope.create', scope); return this.request({ url: this._buildUriWithDomain(this.uri), method: corbel...
[ "function", "(", "scope", ")", "{", "corbel", ".", "validate", ".", "failIfIsDefined", "(", "this", ".", "id", ",", "'This function not allowed scope identifier'", ")", ";", "console", ".", "log", "(", "'iamInterface.scope.create'", ",", "scope", ")", ";", "retu...
Creates a new scope. @method @memberOf corbel.Iam.ScopeBuilder @param {Object} scope The scope. @param {Object} scope.rules Scope rules. @param {String} scope.type Scope type. @param {Object} scope.scopes Scopes for a composite scope. @return {Promise} A promise with the id of the created scope or fails wi...
[ "Creates", "a", "new", "scope", "." ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3732-L3742
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(params) { params = params || {}; params.claims = params.claims || {}; if (params.jwt) { return params.jwt; } var secret = params.secret || this.driver.config.get('clientSecret'); params.claims....
javascript
function(params) { params = params || {}; params.claims = params.claims || {}; if (params.jwt) { return params.jwt; } var secret = params.secret || this.driver.config.get('clientSecret'); params.claims....
[ "function", "(", "params", ")", "{", "params", "=", "params", "||", "{", "}", ";", "params", ".", "claims", "=", "params", ".", "claims", "||", "{", "}", ";", "if", "(", "params", ".", "jwt", ")", "{", "return", "params", ".", "jwt", ";", "}", ...
Build a JWT with default driver config @param {Object} params @param {String} [params.secret] @param {Object} [params.claims] @param {String} [params.claims.iss] @param {String} [params.claims.aud] @param {String} [params.claims.scope] @return {String} JWT assertion
[ "Build", "a", "JWT", "with", "default", "driver", "config" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3818-L3831
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(refreshToken, scopes) { // console.log('iamInterface.token.refresh', refreshToken); // we need refresh token to refresh access token corbel.validate.isValue(refreshToken, 'Refresh access token request must contains refresh token'); // we need crea...
javascript
function(refreshToken, scopes) { // console.log('iamInterface.token.refresh', refreshToken); // we need refresh token to refresh access token corbel.validate.isValue(refreshToken, 'Refresh access token request must contains refresh token'); // we need crea...
[ "function", "(", "refreshToken", ",", "scopes", ")", "{", "// console.log('iamInterface.token.refresh', refreshToken);", "// we need refresh token to refresh access token", "corbel", ".", "validate", ".", "isValue", "(", "refreshToken", ",", "'Refresh access token request must cont...
Refresh a token to connect with iam @method @memberOf corbel.Iam.TokenBuilder @param {String} [refresh_token] Token to refresh an AccessToken @param {String} [scopes] Scopes to the AccessToken @return {Promise} Q promise that resolves to an AccesToken {Object} or rejects with a {@link corbelE...
[ "Refresh", "a", "token", "to", "connect", "with", "iam" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L3934-L3957
train
bq/corbel-js
dist/corbel.with-polyfills.js
function() { console.log('iamInterface.user.get'); corbel.validate.value('id', this.id); return this._getUser(corbel.request.method.GET, this.uri, this.id); }
javascript
function() { console.log('iamInterface.user.get'); corbel.validate.value('id', this.id); return this._getUser(corbel.request.method.GET, this.uri, this.id); }
[ "function", "(", ")", "{", "console", ".", "log", "(", "'iamInterface.user.get'", ")", ";", "corbel", ".", "validate", ".", "value", "(", "'id'", ",", "this", ".", "id", ")", ";", "return", "this", ".", "_getUser", "(", "corbel", ".", "request", ".", ...
Gets the user @method @memberOf corbel.Iam.UserBuilder @return {Promise} Q promise that resolves to a User {Object} or rejects with a {@link corbelError}
[ "Gets", "the", "user" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L4102-L4106
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(data, options) { console.log('iamInterface.user.update', data); corbel.validate.value('id', this.id); var args = corbel.utils.extend(options || {}, { url: this._buildUriWithDomain(this.uri, this.id), method: corbel.request....
javascript
function(data, options) { console.log('iamInterface.user.update', data); corbel.validate.value('id', this.id); var args = corbel.utils.extend(options || {}, { url: this._buildUriWithDomain(this.uri, this.id), method: corbel.request....
[ "function", "(", "data", ",", "options", ")", "{", "console", ".", "log", "(", "'iamInterface.user.update'", ",", "data", ")", ";", "corbel", ".", "validate", ".", "value", "(", "'id'", ",", "this", ".", "id", ")", ";", "var", "args", "=", "corbel", ...
Updates the user @method @memberOf corbel.Iam.UserBuilder @param {Object} options Request options (e.g accessToken) - Optional @return {Promise} Q promise that resolves to undefined (void) or rejects with a {@link corbelError}
[ "Updates", "the", "user" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L4115-L4124
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(options) { var queryParams = ''; if (options && options.avoidNotification) { queryParams = '?avoidnotification=true'; } console.log('iamInterface.user.delete'); corbel.validate.value('id', this.id); ...
javascript
function(options) { var queryParams = ''; if (options && options.avoidNotification) { queryParams = '?avoidnotification=true'; } console.log('iamInterface.user.delete'); corbel.validate.value('id', this.id); ...
[ "function", "(", "options", ")", "{", "var", "queryParams", "=", "''", ";", "if", "(", "options", "&&", "options", ".", "avoidNotification", ")", "{", "queryParams", "=", "'?avoidnotification=true'", ";", "}", "console", ".", "log", "(", "'iamInterface.user.de...
Deletes the user @method @memberOf corbel.Iam.UserBuilder @return {Promise} Q promise that resolves to undefined (void) or rejects with a {@link corbelError}
[ "Deletes", "the", "user" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L4132-L4143
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(deviceId, data) { console.log('iamInterface.user.registerDevice'); corbel.validate.values(['id', 'deviceId'], { 'id': this.id, 'deviceId': deviceId }); return this.request({ url: this._bu...
javascript
function(deviceId, data) { console.log('iamInterface.user.registerDevice'); corbel.validate.values(['id', 'deviceId'], { 'id': this.id, 'deviceId': deviceId }); return this.request({ url: this._bu...
[ "function", "(", "deviceId", ",", "data", ")", "{", "console", ".", "log", "(", "'iamInterface.user.registerDevice'", ")", ";", "corbel", ".", "validate", ".", "values", "(", "[", "'id'", ",", "'deviceId'", "]", ",", "{", "'id'", ":", "this", ".", "id", ...
User device register @method @memberOf corbel.Iam.UserBuilder @param {string} deviceId The device id @param {Object} data The device data @param {Object} data.URI The device token @param {Object} data.name The device name @param {Object} data.type The device type (ANDROID, APPLE, WEB) @return {Promise} Q pr...
[ "User", "device", "register" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L4254-L4267
train
bq/corbel-js
dist/corbel.with-polyfills.js
function(group) { console.log('iamInterface.user.deleteGroup'); corbel.validate.values(['id', 'group'], { 'id': this.id, 'group': group }); return this.request({ url: this._buildUriWithDomain(this...
javascript
function(group) { console.log('iamInterface.user.deleteGroup'); corbel.validate.values(['id', 'group'], { 'id': this.id, 'group': group }); return this.request({ url: this._buildUriWithDomain(this...
[ "function", "(", "group", ")", "{", "console", ".", "log", "(", "'iamInterface.user.deleteGroup'", ")", ";", "corbel", ".", "validate", ".", "values", "(", "[", "'id'", ",", "'group'", "]", ",", "{", "'id'", ":", "this", ".", "id", ",", "'group'", ":",...
Delete group to user @method @memberOf iam.UserBuilder @param {Object} groups The data of the groups @return {Promise} Q promise that resolves to undefined (void) or rejects with a {@link SilkRoadError}
[ "Delete", "group", "to", "user" ]
00074882676b592d2ac16868279c58b0c4faf1e2
https://github.com/bq/corbel-js/blob/00074882676b592d2ac16868279c58b0c4faf1e2/dist/corbel.with-polyfills.js#L4362-L4372
train