id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
30,400
swagen/swagen
lib/generate/index.js
handleUrlSwagger
function handleUrlSwagger(profile, profileKey) { console.log(chalk`{green [${profileKey}]} Input swagger URL : {cyan ${profile.url}}`); const options = { rejectUnauthorized: false }; needle.get(profile.url, options, (err, resp, body) => { if (err) { console.log(chalk`{red Can...
javascript
function handleUrlSwagger(profile, profileKey) { console.log(chalk`{green [${profileKey}]} Input swagger URL : {cyan ${profile.url}}`); const options = { rejectUnauthorized: false }; needle.get(profile.url, options, (err, resp, body) => { if (err) { console.log(chalk`{red Can...
[ "function", "handleUrlSwagger", "(", "profile", ",", "profileKey", ")", "{", "console", ".", "log", "(", "chalk", "`", "${", "profileKey", "}", "${", "profile", ".", "url", "}", "`", ")", ";", "const", "options", "=", "{", "rejectUnauthorized", ":", "fal...
Reads the swagger json from a URL specified in the profile. @param {Profile} profile The profile being handled. @param {String} profileKey The name of the profile.
[ "Reads", "the", "swagger", "json", "from", "a", "URL", "specified", "in", "the", "profile", "." ]
cd8b032942d9fa9184243012ceecfeb179948340
https://github.com/swagen/swagen/blob/cd8b032942d9fa9184243012ceecfeb179948340/lib/generate/index.js#L91-L104
30,401
swagen/swagen
lib/generate/index.js
verifyProfile
function verifyProfile(profile, profileKey) { if (!profile.file && !profile.url) { throw new Error(`[${profileKey}] Must specify a file or url in the configuration.`); } if (!profile.output) { throw new Error(`[${profileKey}] Must specify an output file path in the configuration.`); } ...
javascript
function verifyProfile(profile, profileKey) { if (!profile.file && !profile.url) { throw new Error(`[${profileKey}] Must specify a file or url in the configuration.`); } if (!profile.output) { throw new Error(`[${profileKey}] Must specify an output file path in the configuration.`); } ...
[ "function", "verifyProfile", "(", "profile", ",", "profileKey", ")", "{", "if", "(", "!", "profile", ".", "file", "&&", "!", "profile", ".", "url", ")", "{", "throw", "new", "Error", "(", "`", "${", "profileKey", "}", "`", ")", ";", "}", "if", "(",...
Ensure that the profile structure is valid.
[ "Ensure", "that", "the", "profile", "structure", "is", "valid", "." ]
cd8b032942d9fa9184243012ceecfeb179948340
https://github.com/swagen/swagen/blob/cd8b032942d9fa9184243012ceecfeb179948340/lib/generate/index.js#L109-L129
30,402
swagen/swagen
lib/generate/index.js
processInputs
function processInputs(config) { for (const profileKey in config) { const profile = config[profileKey]; if (profile.skip) { continue; } verifyProfile(profile, profileKey); if (profile.file) { handleFileSwagger(profile, profileKey); } else { ...
javascript
function processInputs(config) { for (const profileKey in config) { const profile = config[profileKey]; if (profile.skip) { continue; } verifyProfile(profile, profileKey); if (profile.file) { handleFileSwagger(profile, profileKey); } else { ...
[ "function", "processInputs", "(", "config", ")", "{", "for", "(", "const", "profileKey", "in", "config", ")", "{", "const", "profile", "=", "config", "[", "profileKey", "]", ";", "if", "(", "profile", ".", "skip", ")", "{", "continue", ";", "}", "verif...
Iterates through each profile in the config and handles the swagger. @param {Object} config Configuration object
[ "Iterates", "through", "each", "profile", "in", "the", "config", "and", "handles", "the", "swagger", "." ]
cd8b032942d9fa9184243012ceecfeb179948340
https://github.com/swagen/swagen/blob/cd8b032942d9fa9184243012ceecfeb179948340/lib/generate/index.js#L135-L150
30,403
phase2/generator-gadget
generators/lib/drupalProjectVersion.js
toMinorRange
function toMinorRange(version) { var regex = /^\d+\.\d+/; var range = version.match(regex); if (range) { return '^' + range[0]; } else { var regex = /^\d+\.x/; var range = version.match(regex); if (range) { return range[0]; } } return version; }
javascript
function toMinorRange(version) { var regex = /^\d+\.\d+/; var range = version.match(regex); if (range) { return '^' + range[0]; } else { var regex = /^\d+\.x/; var range = version.match(regex); if (range) { return range[0]; } } return version; }
[ "function", "toMinorRange", "(", "version", ")", "{", "var", "regex", "=", "/", "^\\d+\\.\\d+", "/", ";", "var", "range", "=", "version", ".", "match", "(", "regex", ")", ";", "if", "(", "range", ")", "{", "return", "'^'", "+", "range", "[", "0", "...
Convert a semantic version to a minor range. In composer.json entries for Drupal core or other major projects, we often want to designate the version similar to '^8.2'. This code converts version strings that may have a pre-release suffix to such a range. Furthermore, there are some edge cases wherein we may want to ...
[ "Convert", "a", "semantic", "version", "to", "a", "minor", "range", "." ]
8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d
https://github.com/phase2/generator-gadget/blob/8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d/generators/lib/drupalProjectVersion.js#L113-L128
30,404
phase2/generator-gadget
generators/lib/drupalProjectVersion.js
toDrupalMajorVersion
function toDrupalMajorVersion(version) { var regex = /^(\d+)\.\d+\.[x\d+]/; var match = version.match(regex) if (match) { return match[1] + '.x'; } return version; }
javascript
function toDrupalMajorVersion(version) { var regex = /^(\d+)\.\d+\.[x\d+]/; var match = version.match(regex) if (match) { return match[1] + '.x'; } return version; }
[ "function", "toDrupalMajorVersion", "(", "version", ")", "{", "var", "regex", "=", "/", "^(\\d+)\\.\\d+\\.[x\\d+]", "/", ";", "var", "match", "=", "version", ".", "match", "(", "regex", ")", "if", "(", "match", ")", "{", "return", "match", "[", "1", "]",...
The Drupal update system uses a pre-semver approach of version numbering. Major versions must be in the form of "8.x", as opposed to other semver ranges or version numbers.
[ "The", "Drupal", "update", "system", "uses", "a", "pre", "-", "semver", "approach", "of", "version", "numbering", "." ]
8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d
https://github.com/phase2/generator-gadget/blob/8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d/generators/lib/drupalProjectVersion.js#L136-L144
30,405
phase2/generator-gadget
generators/lib/drupalProjectVersion.js
isCached
function isCached(project, majorVersion) { var cid = project+majorVersion; return cache[cid] && cache[cid].short_name[0] == project && cache[cid].api_version[0] == majorVersion; }
javascript
function isCached(project, majorVersion) { var cid = project+majorVersion; return cache[cid] && cache[cid].short_name[0] == project && cache[cid].api_version[0] == majorVersion; }
[ "function", "isCached", "(", "project", ",", "majorVersion", ")", "{", "var", "cid", "=", "project", "+", "majorVersion", ";", "return", "cache", "[", "cid", "]", "&&", "cache", "[", "cid", "]", ".", "short_name", "[", "0", "]", "==", "project", "&&", ...
Determine if we have successfully cached the release data.
[ "Determine", "if", "we", "have", "successfully", "cached", "the", "release", "data", "." ]
8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d
https://github.com/phase2/generator-gadget/blob/8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d/generators/lib/drupalProjectVersion.js#L149-L152
30,406
GenesysPureEngage/provisioning-client-js
src/internal/code-gen/provisioning-api/model/AddUserDataData.js
function(userName, firstName, lastName, password) { var _this = this; _this['userName'] = userName; _this['firstName'] = firstName; _this['lastName'] = lastName; _this['password'] = password; }
javascript
function(userName, firstName, lastName, password) { var _this = this; _this['userName'] = userName; _this['firstName'] = firstName; _this['lastName'] = lastName; _this['password'] = password; }
[ "function", "(", "userName", ",", "firstName", ",", "lastName", ",", "password", ")", "{", "var", "_this", "=", "this", ";", "_this", "[", "'userName'", "]", "=", "userName", ";", "_this", "[", "'firstName'", "]", "=", "firstName", ";", "_this", "[", "...
The AddUserDataData model module. @module model/AddUserDataData @version 9.0.000.46.3206 Constructs a new <code>AddUserDataData</code>. @alias module:model/AddUserDataData @class @param userName {String} The user's unique login. @param firstName {String} The user's first name. @param lastName {String} The user's last...
[ "The", "AddUserDataData", "model", "module", "." ]
8d5e1ed6bf75bedf1a580091b9f197670ea98041
https://github.com/GenesysPureEngage/provisioning-client-js/blob/8d5e1ed6bf75bedf1a580091b9f197670ea98041/src/internal/code-gen/provisioning-api/model/AddUserDataData.js#L51-L79
30,407
canjs/can-query-logic
src/types/basic-query.js
BasicQuery
function BasicQuery(query) { assign(this, query); if (!this.filter) { this.filter = set.UNIVERSAL; } if (!this.page) { this.page = new RecordRange(); } if (!this.sort) { this.sort = "id"; } if (typeof this.sort === "string") { this.sort = new DefaultSort(this.sort); } }
javascript
function BasicQuery(query) { assign(this, query); if (!this.filter) { this.filter = set.UNIVERSAL; } if (!this.page) { this.page = new RecordRange(); } if (!this.sort) { this.sort = "id"; } if (typeof this.sort === "string") { this.sort = new DefaultSort(this.sort); } }
[ "function", "BasicQuery", "(", "query", ")", "{", "assign", "(", "this", ",", "query", ")", ";", "if", "(", "!", "this", ".", "filter", ")", "{", "this", ".", "filter", "=", "set", ".", "UNIVERSAL", ";", "}", "if", "(", "!", "this", ".", "page", ...
Define the BasicQuery type
[ "Define", "the", "BasicQuery", "type" ]
fe32908e7aa36853362fbc1a4df276193247f38d
https://github.com/canjs/can-query-logic/blob/fe32908e7aa36853362fbc1a4df276193247f38d/src/types/basic-query.js#L136-L150
30,408
JS-DevTools/globify
lib/parsed-args.js
ParsedArgs
function ParsedArgs (args) { /** * The command to run ("browserify" or "watchify") * @type {string} */ this.cmd = "browserify"; /** * The base directory for the entry-file glob pattern. * See {@link helpers#getBaseDir} for details. * @type {string} */ this.baseDir = ""; /** * Options...
javascript
function ParsedArgs (args) { /** * The command to run ("browserify" or "watchify") * @type {string} */ this.cmd = "browserify"; /** * The base directory for the entry-file glob pattern. * See {@link helpers#getBaseDir} for details. * @type {string} */ this.baseDir = ""; /** * Options...
[ "function", "ParsedArgs", "(", "args", ")", "{", "/**\n * The command to run (\"browserify\" or \"watchify\")\n * @type {string}\n */", "this", ".", "cmd", "=", "\"browserify\"", ";", "/**\n * The base directory for the entry-file glob pattern.\n * See {@link helpers#getBaseDir} ...
Parses the command-line arguments and replaces glob patterns with functions to expand those patterns. @param {string[]} args - All command-line arguments, most of which will simply be passed to Browserify @constructor
[ "Parses", "the", "command", "-", "line", "arguments", "and", "replaces", "glob", "patterns", "with", "functions", "to", "expand", "those", "patterns", "." ]
650a0a8727982427c5d1d66e1094b0e23a15a8b6
https://github.com/JS-DevTools/globify/blob/650a0a8727982427c5d1d66e1094b0e23a15a8b6/lib/parsed-args.js#L16-L69
30,409
relution-io/relution-sdk
lib/livedata/WebSqlStore.js
openDatabase
function openDatabase(options) { var db; var sqlitePlugin = 'sqlitePlugin'; if (global[sqlitePlugin]) { // device implementation options = _.clone(options); if (!options.key) { if (options.security) { options.key = options.security; delete ...
javascript
function openDatabase(options) { var db; var sqlitePlugin = 'sqlitePlugin'; if (global[sqlitePlugin]) { // device implementation options = _.clone(options); if (!options.key) { if (options.security) { options.key = options.security; delete ...
[ "function", "openDatabase", "(", "options", ")", "{", "var", "db", ";", "var", "sqlitePlugin", "=", "'sqlitePlugin'", ";", "if", "(", "global", "[", "sqlitePlugin", "]", ")", "{", "// device implementation", "options", "=", "_", ".", "clone", "(", "options",...
openDatabase of browser or via require websql. @internal Not public API, exported for testing purposes only!
[ "openDatabase", "of", "browser", "or", "via", "require", "websql", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/livedata/WebSqlStore.js#L43-L86
30,410
peerigon/erroz
lib/index.js
erroz
function erroz(error) { var errorFn = function (data) { //apply all attributes on the instance for (var errKey in errorFn.prototype) { if (errorFn.prototype.hasOwnProperty(errKey)) { this[errKey] = errorFn.prototype[errKey]; } } //overwrite ...
javascript
function erroz(error) { var errorFn = function (data) { //apply all attributes on the instance for (var errKey in errorFn.prototype) { if (errorFn.prototype.hasOwnProperty(errKey)) { this[errKey] = errorFn.prototype[errKey]; } } //overwrite ...
[ "function", "erroz", "(", "error", ")", "{", "var", "errorFn", "=", "function", "(", "data", ")", "{", "//apply all attributes on the instance", "for", "(", "var", "errKey", "in", "errorFn", ".", "prototype", ")", "{", "if", "(", "errorFn", ".", "prototype",...
generate Error-classes based on ErrozError @param error @returns {Function}
[ "generate", "Error", "-", "classes", "based", "on", "ErrozError" ]
57adf5fa7a86680da2c6460b81aaaceaa57db6bd
https://github.com/peerigon/erroz/blob/57adf5fa7a86680da2c6460b81aaaceaa57db6bd/lib/index.js#L14-L71
30,411
OpusCapita/npm-scripts
bin/update-changelog.js
metadata
function metadata(log, value) { var lines = value.split('\n'); log.commit = lines[0].split(' ')[1]; log.author = lines[1].split(':')[1].trim(); log.date = lines[2].slice(8); return log }
javascript
function metadata(log, value) { var lines = value.split('\n'); log.commit = lines[0].split(' ')[1]; log.author = lines[1].split(':')[1].trim(); log.date = lines[2].slice(8); return log }
[ "function", "metadata", "(", "log", ",", "value", ")", "{", "var", "lines", "=", "value", ".", "split", "(", "'\\n'", ")", ";", "log", ".", "commit", "=", "lines", "[", "0", "]", ".", "split", "(", "' '", ")", "[", "1", "]", ";", "log", ".", ...
parse git log
[ "parse", "git", "log" ]
d70c80f48ebbd862c84617de834d239cecd17023
https://github.com/OpusCapita/npm-scripts/blob/d70c80f48ebbd862c84617de834d239cecd17023/bin/update-changelog.js#L36-L42
30,412
djgrant/heidelberg
js/lib/hammer.js
stopDefaultBrowserBehavior
function stopDefaultBrowserBehavior(element, css_props) { if(!css_props || !element || !element.style) { return; } // with css properties for modern browsers Hammer.utils.each(['webkit', 'khtml', 'moz', 'Moz', 'ms', 'o', ''], function(vendor) { Hammer.utils.each(css_props, function(value, p...
javascript
function stopDefaultBrowserBehavior(element, css_props) { if(!css_props || !element || !element.style) { return; } // with css properties for modern browsers Hammer.utils.each(['webkit', 'khtml', 'moz', 'Moz', 'ms', 'o', ''], function(vendor) { Hammer.utils.each(css_props, function(value, p...
[ "function", "stopDefaultBrowserBehavior", "(", "element", ",", "css_props", ")", "{", "if", "(", "!", "css_props", "||", "!", "element", "||", "!", "element", ".", "style", ")", "{", "return", ";", "}", "// with css properties for modern browsers", "Hammer", "."...
stop browser default behavior with css props @param {HtmlElement} element @param {Object} css_props
[ "stop", "browser", "default", "behavior", "with", "css", "props" ]
151e254962055c1c4d7705a5eb277b96cb9a7849
https://github.com/djgrant/heidelberg/blob/151e254962055c1c4d7705a5eb277b96cb9a7849/js/lib/hammer.js#L303-L335
30,413
djgrant/heidelberg
js/lib/hammer.js
detect
function detect(eventData) { if(!this.current || this.stopped) { return; } // extend event data with calculations about scale, distance etc eventData = this.extendEventData(eventData); // instance options var inst_options = this.current.inst.options; // call Hammer.gesture handlers ...
javascript
function detect(eventData) { if(!this.current || this.stopped) { return; } // extend event data with calculations about scale, distance etc eventData = this.extendEventData(eventData); // instance options var inst_options = this.current.inst.options; // call Hammer.gesture handlers ...
[ "function", "detect", "(", "eventData", ")", "{", "if", "(", "!", "this", ".", "current", "||", "this", ".", "stopped", ")", "{", "return", ";", "}", "// extend event data with calculations about scale, distance etc", "eventData", "=", "this", ".", "extendEventDat...
Hammer.gesture detection @param {Object} eventData
[ "Hammer", ".", "gesture", "detection" ]
151e254962055c1c4d7705a5eb277b96cb9a7849
https://github.com/djgrant/heidelberg/blob/151e254962055c1c4d7705a5eb277b96cb9a7849/js/lib/hammer.js#L816-L850
30,414
djgrant/heidelberg
js/lib/hammer.js
stopDetect
function stopDetect() { // clone current data to the store as the previous gesture // used for the double tap gesture, since this is an other gesture detect session this.previous = Hammer.utils.extend({}, this.current); // reset the current this.current = null; // stopped! this.stopped = t...
javascript
function stopDetect() { // clone current data to the store as the previous gesture // used for the double tap gesture, since this is an other gesture detect session this.previous = Hammer.utils.extend({}, this.current); // reset the current this.current = null; // stopped! this.stopped = t...
[ "function", "stopDetect", "(", ")", "{", "// clone current data to the store as the previous gesture", "// used for the double tap gesture, since this is an other gesture detect session", "this", ".", "previous", "=", "Hammer", ".", "utils", ".", "extend", "(", "{", "}", ",", ...
clear the Hammer.gesture vars this is called on endDetect, but can also be used when a final Hammer.gesture has been detected to stop other Hammer.gestures from being fired
[ "clear", "the", "Hammer", ".", "gesture", "vars", "this", "is", "called", "on", "endDetect", "but", "can", "also", "be", "used", "when", "a", "final", "Hammer", ".", "gesture", "has", "been", "detected", "to", "stop", "other", "Hammer", ".", "gestures", ...
151e254962055c1c4d7705a5eb277b96cb9a7849
https://github.com/djgrant/heidelberg/blob/151e254962055c1c4d7705a5eb277b96cb9a7849/js/lib/hammer.js#L858-L868
30,415
djgrant/heidelberg
js/lib/hammer.js
register
function register(gesture) { // add an enable gesture options if there is no given var options = gesture.defaults || {}; if(options[gesture.name] === undefined) { options[gesture.name] = true; } // extend Hammer default options with the Hammer.gesture options Hammer.utils.extend(Hammer.de...
javascript
function register(gesture) { // add an enable gesture options if there is no given var options = gesture.defaults || {}; if(options[gesture.name] === undefined) { options[gesture.name] = true; } // extend Hammer default options with the Hammer.gesture options Hammer.utils.extend(Hammer.de...
[ "function", "register", "(", "gesture", ")", "{", "// add an enable gesture options if there is no given", "var", "options", "=", "gesture", ".", "defaults", "||", "{", "}", ";", "if", "(", "options", "[", "gesture", ".", "name", "]", "===", "undefined", ")", ...
register new gesture @param {Object} gesture object, see gestures.js for documentation @returns {Array} gestures
[ "register", "new", "gesture" ]
151e254962055c1c4d7705a5eb277b96cb9a7849
https://github.com/djgrant/heidelberg/blob/151e254962055c1c4d7705a5eb277b96cb9a7849/js/lib/hammer.js#L943-L967
30,416
canjs/can-query-logic
can-query-logic.js
QueryLogic
function QueryLogic(Type, options){ Type = Type || {}; var passedHydrator = options && options.toQuery; var passedSerializer = options && options.toParams; var schema; if(Type[schemaSymbol]) { schema = Type[schemaSymbol](); } else { schema = Type; } // check that the bas...
javascript
function QueryLogic(Type, options){ Type = Type || {}; var passedHydrator = options && options.toQuery; var passedSerializer = options && options.toParams; var schema; if(Type[schemaSymbol]) { schema = Type[schemaSymbol](); } else { schema = Type; } // check that the bas...
[ "function", "QueryLogic", "(", "Type", ",", "options", ")", "{", "Type", "=", "Type", "||", "{", "}", ";", "var", "passedHydrator", "=", "options", "&&", "options", ".", "toQuery", ";", "var", "passedSerializer", "=", "options", "&&", "options", ".", "to...
Creates an algebra used to convert primitives to types and back
[ "Creates", "an", "algebra", "used", "to", "convert", "primitives", "to", "types", "and", "back" ]
fe32908e7aa36853362fbc1a4df276193247f38d
https://github.com/canjs/can-query-logic/blob/fe32908e7aa36853362fbc1a4df276193247f38d/can-query-logic.js#L13-L55
30,417
steve-gray/swagger-service-skeleton
src/index.js
generateApplicationCode
function generateApplicationCode(swagger, codegenOptions) { debug('Generating application code.'); // Build up the execution parameters for the templates. const templateFunc = codegenOptions.templateSet; const outputDirectory = codegenOptions.temporaryDirectory; const codegenSettings = defaults( template...
javascript
function generateApplicationCode(swagger, codegenOptions) { debug('Generating application code.'); // Build up the execution parameters for the templates. const templateFunc = codegenOptions.templateSet; const outputDirectory = codegenOptions.temporaryDirectory; const codegenSettings = defaults( template...
[ "function", "generateApplicationCode", "(", "swagger", ",", "codegenOptions", ")", "{", "debug", "(", "'Generating application code.'", ")", ";", "// Build up the execution parameters for the templates.", "const", "templateFunc", "=", "codegenOptions", ".", "templateSet", ";"...
Generate the application code in the specified temporary directory.
[ "Generate", "the", "application", "code", "in", "the", "specified", "temporary", "directory", "." ]
a3b81fc53f33af0cde195225907c247088e3ad40
https://github.com/steve-gray/swagger-service-skeleton/blob/a3b81fc53f33af0cde195225907c247088e3ad40/src/index.js#L24-L44
30,418
steve-gray/swagger-service-skeleton
src/index.js
startSkeletonApplication
function startSkeletonApplication(options) { debug('Starting to create application skeleton'); const configWithDefaults = defaults( options, { redirects: { 'documentation-from-root': { match: /^\/$/, target: '/docs', }, }, ioc: { }, customMiddlew...
javascript
function startSkeletonApplication(options) { debug('Starting to create application skeleton'); const configWithDefaults = defaults( options, { redirects: { 'documentation-from-root': { match: /^\/$/, target: '/docs', }, }, ioc: { }, customMiddlew...
[ "function", "startSkeletonApplication", "(", "options", ")", "{", "debug", "(", "'Starting to create application skeleton'", ")", ";", "const", "configWithDefaults", "=", "defaults", "(", "options", ",", "{", "redirects", ":", "{", "'documentation-from-root'", ":", "{...
Initialize the application skeleton
[ "Initialize", "the", "application", "skeleton" ]
a3b81fc53f33af0cde195225907c247088e3ad40
https://github.com/steve-gray/swagger-service-skeleton/blob/a3b81fc53f33af0cde195225907c247088e3ad40/src/index.js#L49-L136
30,419
relution-io/relution-sdk
server/backend/routes/routes.js
getRoutes
function getRoutes(req, res) { var index = { name: about.name, version: about.version, description: about.description, routes: app.routes }; return res.json(index); }
javascript
function getRoutes(req, res) { var index = { name: about.name, version: about.version, description: about.description, routes: app.routes }; return res.json(index); }
[ "function", "getRoutes", "(", "req", ",", "res", ")", "{", "var", "index", "=", "{", "name", ":", "about", ".", "name", ",", "version", ":", "about", ".", "version", ",", "description", ":", "about", ".", "description", ",", "routes", ":", "app", "."...
provides an overview of available API, state, etc. @param req unused. @param res body is an informal JSON that can be used for health monitoring, for example. @return {*} unspecified value.
[ "provides", "an", "overview", "of", "available", "API", "state", "etc", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/server/backend/routes/routes.js#L15-L23
30,420
canjs/can-query-logic
src/schema-helpers.js
function(Type){ return Type && canReflect.isConstructorLike(Type) && !set.hasComparisons(Type) && !Type[canSymbol.for("can.SetType")] && Type.prototype.valueOf && Type.prototype.valueOf !== Object.prototype.valueOf; }
javascript
function(Type){ return Type && canReflect.isConstructorLike(Type) && !set.hasComparisons(Type) && !Type[canSymbol.for("can.SetType")] && Type.prototype.valueOf && Type.prototype.valueOf !== Object.prototype.valueOf; }
[ "function", "(", "Type", ")", "{", "return", "Type", "&&", "canReflect", ".", "isConstructorLike", "(", "Type", ")", "&&", "!", "set", ".", "hasComparisons", "(", "Type", ")", "&&", "!", "Type", "[", "canSymbol", ".", "for", "(", "\"can.SetType\"", ")", ...
Number is a ranged type
[ "Number", "is", "a", "ranged", "type" ]
fe32908e7aa36853362fbc1a4df276193247f38d
https://github.com/canjs/can-query-logic/blob/fe32908e7aa36853362fbc1a4df276193247f38d/src/schema-helpers.js#L8-L13
30,421
relution-io/relution-sdk
lib/livedata/Collection.js
isCollection
function isCollection(object) { if (!object || typeof object !== 'object') { return false; } else if ('isCollection' in object) { diag.debug.assert(function () { return object.isCollection === Collection.prototype.isPrototypeOf(object); }); return object.isCollection; } else ...
javascript
function isCollection(object) { if (!object || typeof object !== 'object') { return false; } else if ('isCollection' in object) { diag.debug.assert(function () { return object.isCollection === Collection.prototype.isPrototypeOf(object); }); return object.isCollection; } else ...
[ "function", "isCollection", "(", "object", ")", "{", "if", "(", "!", "object", "||", "typeof", "object", "!==", "'object'", ")", "{", "return", "false", ";", "}", "else", "if", "(", "'isCollection'", "in", "object", ")", "{", "diag", ".", "debug", ".",...
tests whether a given object is a Collection. @param {object} object to check. @return {boolean} whether object is a Collection.
[ "tests", "whether", "a", "given", "object", "is", "a", "Collection", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/livedata/Collection.js#L43-L54
30,422
relution-io/relution-sdk
lib/query/SortOrderComparator.js
jsonCompare
function jsonCompare(arg, options) { var sortOrder; if (typeof arg === 'string') { sortOrder = new SortOrder_1.SortOrder(); sortOrder.fromJSON([arg]); } else if (_.isArray(arg)) { sortOrder = new SortOrder_1.SortOrder(); sortOrder.fromJSON(arg); } else { s...
javascript
function jsonCompare(arg, options) { var sortOrder; if (typeof arg === 'string') { sortOrder = new SortOrder_1.SortOrder(); sortOrder.fromJSON([arg]); } else if (_.isArray(arg)) { sortOrder = new SortOrder_1.SortOrder(); sortOrder.fromJSON(arg); } else { s...
[ "function", "jsonCompare", "(", "arg", ",", "options", ")", "{", "var", "sortOrder", ";", "if", "(", "typeof", "arg", "===", "'string'", ")", "{", "sortOrder", "=", "new", "SortOrder_1", ".", "SortOrder", "(", ")", ";", "sortOrder", ".", "fromJSON", "(",...
compiles a JsonCompareFn from a given SortOrder. @param arg defining the SortOrder being compiled. @return {function} a JsonCompareFn function compatible to Array.sort().
[ "compiles", "a", "JsonCompareFn", "from", "a", "given", "SortOrder", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/query/SortOrderComparator.js#L34-L49
30,423
relution-io/relution-sdk
lib/query/SortOrderComparator.js
SortOrderComparator
function SortOrderComparator(sortOrder, options) { this.sortOrder = sortOrder; this.options = { casesensitive: false }; if (options) { _.extend(this.options, options); } this.expressions = new Array(sortOrder.sortFields.length); for (var i ...
javascript
function SortOrderComparator(sortOrder, options) { this.sortOrder = sortOrder; this.options = { casesensitive: false }; if (options) { _.extend(this.options, options); } this.expressions = new Array(sortOrder.sortFields.length); for (var i ...
[ "function", "SortOrderComparator", "(", "sortOrder", ",", "options", ")", "{", "this", ".", "sortOrder", "=", "sortOrder", ";", "this", ".", "options", "=", "{", "casesensitive", ":", "false", "}", ";", "if", "(", "options", ")", "{", "_", ".", "extend",...
constructs a compiled SortOrder for object comparison. @param sortOrder to realize.
[ "constructs", "a", "compiled", "SortOrder", "for", "object", "comparison", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/query/SortOrderComparator.js#L62-L74
30,424
wingbotai/wingbot
src/graphApi/apiAuthorizer.js
apiAuthorizer
function apiAuthorizer (args, ctx, acl) { const { token = {}, groups } = ctx; const { groups: tokenGroups = [] } = token; if (typeof acl === 'function') { return acl(args, ctx); } let check = groups; if (Array.isArray(acl)) { check = [...groups, ...acl]; } return token...
javascript
function apiAuthorizer (args, ctx, acl) { const { token = {}, groups } = ctx; const { groups: tokenGroups = [] } = token; if (typeof acl === 'function') { return acl(args, ctx); } let check = groups; if (Array.isArray(acl)) { check = [...groups, ...acl]; } return token...
[ "function", "apiAuthorizer", "(", "args", ",", "ctx", ",", "acl", ")", "{", "const", "{", "token", "=", "{", "}", ",", "groups", "}", "=", "ctx", ";", "const", "{", "groups", ":", "tokenGroups", "=", "[", "]", "}", "=", "token", ";", "if", "(", ...
If API call is authorized - use for own implementations of API endpoints @param {Object} args - gql request @param {{groups:string[],token:Object}} ctx - request context @param {string[]|null|Function} acl - custom acl settings @returns {boolean} @example const { apiAuthorizer } = require('wingbot'); function createA...
[ "If", "API", "call", "is", "authorized", "-", "use", "for", "own", "implementations", "of", "API", "endpoints" ]
2a917d6a5798e6f3e2258ef445b600eddfd1961b
https://github.com/wingbotai/wingbot/blob/2a917d6a5798e6f3e2258ef445b600eddfd1961b/src/graphApi/apiAuthorizer.js#L26-L40
30,425
JS-DevTools/globify
lib/index.js
globify
function globify (args) { let parsed = new ParsedArgs(args); let expandGlob = parsed.args[parsed.globIndex]; let renameOutfile = parsed.args[parsed.outfileIndex]; let files = expandGlob && expandGlob(parsed.globOptions); if (!expandGlob) { // No glob patterns were found, so just run browserify as-is ...
javascript
function globify (args) { let parsed = new ParsedArgs(args); let expandGlob = parsed.args[parsed.globIndex]; let renameOutfile = parsed.args[parsed.outfileIndex]; let files = expandGlob && expandGlob(parsed.globOptions); if (!expandGlob) { // No glob patterns were found, so just run browserify as-is ...
[ "function", "globify", "(", "args", ")", "{", "let", "parsed", "=", "new", "ParsedArgs", "(", "args", ")", ";", "let", "expandGlob", "=", "parsed", ".", "args", "[", "parsed", ".", "globIndex", "]", ";", "let", "renameOutfile", "=", "parsed", ".", "arg...
Runs browserify or watchify with the given arguments for each file that matches the glob pattern. @param {string[]} args - the command-line arguments
[ "Runs", "browserify", "or", "watchify", "with", "the", "given", "arguments", "for", "each", "file", "that", "matches", "the", "glob", "pattern", "." ]
650a0a8727982427c5d1d66e1094b0e23a15a8b6
https://github.com/JS-DevTools/globify/blob/650a0a8727982427c5d1d66e1094b0e23a15a8b6/lib/index.js#L13-L40
30,426
JoystreamClassic/joystream-node
lib/utils.js
areTermsMatching
function areTermsMatching (buyerTerms, sellerTerms) { if (buyerTerms.maxPrice >= sellerTerms.minPrice && buyerTerms.maxLock >= sellerTerms.minLock && buyerTerms.minNumberOfSellers <= sellerTerms.maxNumberOfSellers && buyerTerms.maxContractFeePerKb >= sellerTerms.minContractFeePerKb ) { return...
javascript
function areTermsMatching (buyerTerms, sellerTerms) { if (buyerTerms.maxPrice >= sellerTerms.minPrice && buyerTerms.maxLock >= sellerTerms.minLock && buyerTerms.minNumberOfSellers <= sellerTerms.maxNumberOfSellers && buyerTerms.maxContractFeePerKb >= sellerTerms.minContractFeePerKb ) { return...
[ "function", "areTermsMatching", "(", "buyerTerms", ",", "sellerTerms", ")", "{", "if", "(", "buyerTerms", ".", "maxPrice", ">=", "sellerTerms", ".", "minPrice", "&&", "buyerTerms", ".", "maxLock", ">=", "sellerTerms", ".", "minLock", "&&", "buyerTerms", ".", "...
Test if the seller and buyer terms are a match. @param {object} The buyer terms @param {object} The seller terms @return {bool} True if it is a match or false if it isn't
[ "Test", "if", "the", "seller", "and", "buyer", "terms", "are", "a", "match", "." ]
2450382bb937abdd959b460791c25f2d8f127168
https://github.com/JoystreamClassic/joystream-node/blob/2450382bb937abdd959b460791c25f2d8f127168/lib/utils.js#L8-L19
30,427
relution-io/relution-sdk
lib/push/cordova.js
onPushNotificationError
function onPushNotificationError(error) { Q(pushCallback(error)).done(undefined, function (e) { diag.debug.assert(e === error, 'push callback failed: ' + e.message); }); }
javascript
function onPushNotificationError(error) { Q(pushCallback(error)).done(undefined, function (e) { diag.debug.assert(e === error, 'push callback failed: ' + e.message); }); }
[ "function", "onPushNotificationError", "(", "error", ")", "{", "Q", "(", "pushCallback", "(", "error", ")", ")", ".", "done", "(", "undefined", ",", "function", "(", "e", ")", "{", "diag", ".", "debug", ".", "assert", "(", "e", "===", "error", ",", "...
executed when the pushNotification plugin fails internally.
[ "executed", "when", "the", "pushNotification", "plugin", "fails", "internally", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/cordova.js#L34-L38
30,428
relution-io/relution-sdk
lib/push/cordova.js
onPushNotificationRegistration
function onPushNotificationRegistration(response) { if (resolveRegistrationEventResponse) { diag.debug.assert(!!rejectRegistrationEventResponse); resolveRegistrationEventResponse(response); resolveRegistrationEventResponse = undefined; rejectRegistrationEventResponse = undefined; ...
javascript
function onPushNotificationRegistration(response) { if (resolveRegistrationEventResponse) { diag.debug.assert(!!rejectRegistrationEventResponse); resolveRegistrationEventResponse(response); resolveRegistrationEventResponse = undefined; rejectRegistrationEventResponse = undefined; ...
[ "function", "onPushNotificationRegistration", "(", "response", ")", "{", "if", "(", "resolveRegistrationEventResponse", ")", "{", "diag", ".", "debug", ".", "assert", "(", "!", "!", "rejectRegistrationEventResponse", ")", ";", "resolveRegistrationEventResponse", "(", ...
executed when registration at 3rd party push server succeeded and a registration was issued, or a registration is renewed meaning this may be called several times.
[ "executed", "when", "registration", "at", "3rd", "party", "push", "server", "succeeded", "and", "a", "registration", "was", "issued", "or", "a", "registration", "is", "renewed", "meaning", "this", "may", "be", "called", "several", "times", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/cordova.js#L45-L56
30,429
relution-io/relution-sdk
lib/push/cordova.js
onPushNotificationNotification
function onPushNotificationNotification(response) { // assignments avoiding changes of implementation state during promise chain var plugin = pushPlugin; var callback = pushCallback; return Q(response).then(function (r) { diag.debug.assert(r === response, 'just begins promise chain avoiding expl...
javascript
function onPushNotificationNotification(response) { // assignments avoiding changes of implementation state during promise chain var plugin = pushPlugin; var callback = pushCallback; return Q(response).then(function (r) { diag.debug.assert(r === response, 'just begins promise chain avoiding expl...
[ "function", "onPushNotificationNotification", "(", "response", ")", "{", "// assignments avoiding changes of implementation state during promise chain", "var", "plugin", "=", "pushPlugin", ";", "var", "callback", "=", "pushCallback", ";", "return", "Q", "(", "response", ")"...
executed on each incoming push notification message calling the pushCallback in an error-agnostic fashion.
[ "executed", "on", "each", "incoming", "push", "notification", "message", "calling", "the", "pushCallback", "in", "an", "error", "-", "agnostic", "fashion", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/cordova.js#L59-L87
30,430
relution-io/relution-sdk
lib/push/cordova.js
defaultPushCallback
function defaultPushCallback(error, pushMessage) { if (error) { diag.debug.error('push failure', error); } else if (pushMessage && pushMessage.message) { diag.debug.info('push received', pushMessage.message); } return pushMessage; }
javascript
function defaultPushCallback(error, pushMessage) { if (error) { diag.debug.error('push failure', error); } else if (pushMessage && pushMessage.message) { diag.debug.info('push received', pushMessage.message); } return pushMessage; }
[ "function", "defaultPushCallback", "(", "error", ",", "pushMessage", ")", "{", "if", "(", "error", ")", "{", "diag", ".", "debug", ".", "error", "(", "'push failure'", ",", "error", ")", ";", "}", "else", "if", "(", "pushMessage", "&&", "pushMessage", "....
default implementation of PushCallback reporting errors and incoming messages to the console. @param error cause of failure. @param pushMessage incoming notification data. @return {PushMessage} same value as parameter causing confirmation of message.
[ "default", "implementation", "of", "PushCallback", "reporting", "errors", "and", "incoming", "messages", "to", "the", "console", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/cordova.js#L96-L104
30,431
relution-io/relution-sdk
lib/push/cordova.js
listenPushNotification
function listenPushNotification(callback) { if (callback === void 0) { callback = defaultPushCallback; } if (resolveRegistrationEventResponse) { diag.debug.assert(!!rejectRegistrationEventResponse); resolveRegistrationEventResponse(undefined); resolveRegistrationEventResponse = undefined...
javascript
function listenPushNotification(callback) { if (callback === void 0) { callback = defaultPushCallback; } if (resolveRegistrationEventResponse) { diag.debug.assert(!!rejectRegistrationEventResponse); resolveRegistrationEventResponse(undefined); resolveRegistrationEventResponse = undefined...
[ "function", "listenPushNotification", "(", "callback", ")", "{", "if", "(", "callback", "===", "void", "0", ")", "{", "callback", "=", "defaultPushCallback", ";", "}", "if", "(", "resolveRegistrationEventResponse", ")", "{", "diag", ".", "debug", ".", "assert"...
installs a callback for receiving push notification messages, and registers the device with the 3rd party push service provider. Usually push configuration is provided to `init()` and a call to this method is chained passing the sink callback. Application using an explicit login then call `configurePushDevice()` as pa...
[ "installs", "a", "callback", "for", "receiving", "push", "notification", "messages", "and", "registers", "the", "device", "with", "the", "3rd", "party", "push", "service", "provider", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/cordova.js#L119-L182
30,432
relution-io/relution-sdk
lib/push/cordova.js
configurePushDevice
function configurePushDevice(options) { return Q.when(promiseRegistrationEventResponse, function (registrationEventResponse) { if (!registrationEventResponse) { // either there is no configuration or since this method was called, // registration was canceled return Q.reso...
javascript
function configurePushDevice(options) { return Q.when(promiseRegistrationEventResponse, function (registrationEventResponse) { if (!registrationEventResponse) { // either there is no configuration or since this method was called, // registration was canceled return Q.reso...
[ "function", "configurePushDevice", "(", "options", ")", "{", "return", "Q", ".", "when", "(", "promiseRegistrationEventResponse", ",", "function", "(", "registrationEventResponse", ")", "{", "if", "(", "!", "registrationEventResponse", ")", "{", "// either there is no...
authorizes current Relution server logged onto to send push notifications by transmitting the registration token.
[ "authorizes", "current", "Relution", "server", "logged", "onto", "to", "send", "push", "notifications", "by", "transmitting", "the", "registration", "token", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/cordova.js#L188-L198
30,433
messagebot/ah-elasticsearch-orm
lib/instance/edit.js
function (k, v) { checkJobs.push(function (checkDone) { api.elasticsearch.search(self.alias, [k], [v], 0, 2, null, 1, function (error, results) { if (error) { return checkDone(error) } if (results.length === 0) { return checkDone() } if (results.length === 1 && resu...
javascript
function (k, v) { checkJobs.push(function (checkDone) { api.elasticsearch.search(self.alias, [k], [v], 0, 2, null, 1, function (error, results) { if (error) { return checkDone(error) } if (results.length === 0) { return checkDone() } if (results.length === 1 && resu...
[ "function", "(", "k", ",", "v", ")", "{", "checkJobs", ".", "push", "(", "function", "(", "checkDone", ")", "{", "api", ".", "elasticsearch", ".", "search", "(", "self", ".", "alias", ",", "[", "k", "]", ",", "[", "v", "]", ",", "0", ",", "2", ...
We need to ensure that none of the params this new instance has match an existing instance.
[ "We", "need", "to", "ensure", "that", "none", "of", "the", "params", "this", "new", "instance", "has", "match", "an", "existing", "instance", "." ]
c559d688b8354288d678dcb9a2af41cee73c8b1e
https://github.com/messagebot/ah-elasticsearch-orm/blob/c559d688b8354288d678dcb9a2af41cee73c8b1e/lib/instance/edit.js#L54-L63
30,434
saneki-discontinued/node-toxcore
lib/tox_old.js
function(opts) { this._emitter = new events.EventEmitter(); this._libpath = opts.path; this._tox = opts.tox; this._library = this.createLibrary(this._libpath); this._initCallbacks(); }
javascript
function(opts) { this._emitter = new events.EventEmitter(); this._libpath = opts.path; this._tox = opts.tox; this._library = this.createLibrary(this._libpath); this._initCallbacks(); }
[ "function", "(", "opts", ")", "{", "this", ".", "_emitter", "=", "new", "events", ".", "EventEmitter", "(", ")", ";", "this", ".", "_libpath", "=", "opts", ".", "path", ";", "this", ".", "_tox", "=", "opts", ".", "tox", ";", "this", ".", "_library"...
Construct a new ToxOld for using old groupchat functions. @class @param {String} opts.path - Path to libtoxcore @param {Tox} opts.tox - Parent Tox instance @todo Accept either tox option, options array, or both?
[ "Construct", "a", "new", "ToxOld", "for", "using", "old", "groupchat", "functions", "." ]
45dfb339f4e8a58888fca175528dee13f075824a
https://github.com/saneki-discontinued/node-toxcore/blob/45dfb339f4e8a58888fca175528dee13f075824a/lib/tox_old.js#L86-L92
30,435
wingbotai/wingbot
src/middlewares/callback.js
setCallback
function setCallback (action, callbackContext = null, callbackText = null) { const callbackAction = this.toAbsoluteAction(action); this.setState({ [ACTION]: callbackAction, [CONTEXT]: callbackContext || DEFAULT, [TEXT]: callbackText }); return this; ...
javascript
function setCallback (action, callbackContext = null, callbackText = null) { const callbackAction = this.toAbsoluteAction(action); this.setState({ [ACTION]: callbackAction, [CONTEXT]: callbackContext || DEFAULT, [TEXT]: callbackText }); return this; ...
[ "function", "setCallback", "(", "action", ",", "callbackContext", "=", "null", ",", "callbackText", "=", "null", ")", "{", "const", "callbackAction", "=", "this", ".", "toAbsoluteAction", "(", "action", ")", ";", "this", ".", "setState", "(", "{", "[", "AC...
Sets action, where to go back, when user responds with text @param {string} action - relative or absolute action (usualy current action) @param {string|null} [callbackContext] - context of callback @param {string|null} [callbackText] - custom text response @returns {this} @alias module:callbackMiddleware @deprecated -...
[ "Sets", "action", "where", "to", "go", "back", "when", "user", "responds", "with", "text" ]
2a917d6a5798e6f3e2258ef445b600eddfd1961b
https://github.com/wingbotai/wingbot/blob/2a917d6a5798e6f3e2258ef445b600eddfd1961b/src/middlewares/callback.js#L91-L101
30,436
wingbotai/wingbot
src/middlewares/callback.js
hasCallback
function hasCallback (callbackContext = null) { if (!this.state[ACTION] || callbackContext === this.state[CONTEXT] || !this.isText()) { return false; } return true; }
javascript
function hasCallback (callbackContext = null) { if (!this.state[ACTION] || callbackContext === this.state[CONTEXT] || !this.isText()) { return false; } return true; }
[ "function", "hasCallback", "(", "callbackContext", "=", "null", ")", "{", "if", "(", "!", "this", ".", "state", "[", "ACTION", "]", "||", "callbackContext", "===", "this", ".", "state", "[", "CONTEXT", "]", "||", "!", "this", ".", "isText", "(", ")", ...
Returns true, when callback has been prevously set. It's usefull, when you don't want to bouce back the methods. @param {string} [callbackContext] @returns {boolean} @alias module:callbackMiddleware @deprecated - use res.runBookmark() @example bot.use(['fooRoute', /^foo$/], (req, res) => { // set callback, only when t...
[ "Returns", "true", "when", "callback", "has", "been", "prevously", "set", ".", "It", "s", "usefull", "when", "you", "don", "t", "want", "to", "bouce", "back", "the", "methods", "." ]
2a917d6a5798e6f3e2258ef445b600eddfd1961b
https://github.com/wingbotai/wingbot/blob/2a917d6a5798e6f3e2258ef445b600eddfd1961b/src/middlewares/callback.js#L119-L127
30,437
aMarCruz/react-native-google-places-ui
examples/placesuidemo/rn-rename.js
renameFilesIOS
function renameFilesIOS (oldPackageName, newPackageName) { const filesAndFolders = [ `ios/${oldPackageName}.xcodeproj/xcshareddata/xcschemes/<?>-tvOS.xcscheme`, `ios/${oldPackageName}.xcodeproj/xcshareddata/xcschemes/<?>.xcscheme`, 'ios/<?>.xcodeproj', `ios/${oldPackageName}/<?>.entitlements`, 'io...
javascript
function renameFilesIOS (oldPackageName, newPackageName) { const filesAndFolders = [ `ios/${oldPackageName}.xcodeproj/xcshareddata/xcschemes/<?>-tvOS.xcscheme`, `ios/${oldPackageName}.xcodeproj/xcshareddata/xcschemes/<?>.xcscheme`, 'ios/<?>.xcodeproj', `ios/${oldPackageName}/<?>.entitlements`, 'io...
[ "function", "renameFilesIOS", "(", "oldPackageName", ",", "newPackageName", ")", "{", "const", "filesAndFolders", "=", "[", "`", "${", "oldPackageName", "}", "`", ",", "`", "${", "oldPackageName", "}", "`", ",", "'ios/<?>.xcodeproj'", ",", "`", "${", "oldPacka...
Move files and folders
[ "Move", "files", "and", "folders" ]
8f1da69819e1cea681f4ffba653ef19de5a3607d
https://github.com/aMarCruz/react-native-google-places-ui/blob/8f1da69819e1cea681f4ffba653ef19de5a3607d/examples/placesuidemo/rn-rename.js#L103-L131
30,438
aMarCruz/react-native-google-places-ui
examples/placesuidemo/rn-rename.js
updatePackageID
function updatePackageID () { return new Promise((resolve) => { const oldPackageID = oldInfo.packageID const newPackageID = newInfo.packageID const androidPath = newInfo.androidPathToModule console.log(`Changing package ID from "${oldPackageID}" to "${newPackageID}"...`) replaceInFiles(RegExp(`(?...
javascript
function updatePackageID () { return new Promise((resolve) => { const oldPackageID = oldInfo.packageID const newPackageID = newInfo.packageID const androidPath = newInfo.androidPathToModule console.log(`Changing package ID from "${oldPackageID}" to "${newPackageID}"...`) replaceInFiles(RegExp(`(?...
[ "function", "updatePackageID", "(", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ")", "=>", "{", "const", "oldPackageID", "=", "oldInfo", ".", "packageID", "const", "newPackageID", "=", "newInfo", ".", "packageID", "const", "androidPath", "=", ...
Replaces "com.placesuidemo"
[ "Replaces", "com", ".", "placesuidemo" ]
8f1da69819e1cea681f4ffba653ef19de5a3607d
https://github.com/aMarCruz/react-native-google-places-ui/blob/8f1da69819e1cea681f4ffba653ef19de5a3607d/examples/placesuidemo/rn-rename.js#L253-L271
30,439
saneki-discontinued/node-toxcore
lib/old/toxav.js
function(tox, opts) { if(!opts) opts = {}; var libpath = opts['path']; this._tox = tox; this._toxav = this.createLibrary(libpath); }
javascript
function(tox, opts) { if(!opts) opts = {}; var libpath = opts['path']; this._tox = tox; this._toxav = this.createLibrary(libpath); }
[ "function", "(", "tox", ",", "opts", ")", "{", "if", "(", "!", "opts", ")", "opts", "=", "{", "}", ";", "var", "libpath", "=", "opts", "[", "'path'", "]", ";", "this", ".", "_tox", "=", "tox", ";", "this", ".", "_toxav", "=", "this", ".", "cr...
Construct a new ToxAV. @class @param {Tox} tox - Tox instance @param {Object} [opts] - Options @param {String} [opts.path] toxav library path, will use the default if not specified
[ "Construct", "a", "new", "ToxAV", "." ]
45dfb339f4e8a58888fca175528dee13f075824a
https://github.com/saneki-discontinued/node-toxcore/blob/45dfb339f4e8a58888fca175528dee13f075824a/lib/old/toxav.js#L44-L50
30,440
mwittig/etherport-client
index.js
OpenEventObserver
function OpenEventObserver(clientPort, serverPort) { events.EventEmitter.call(this); this.isClientPortOpen = false; this.isServerPortOpen = false; clientPort.on('open', this._clientPortOpenHandler(this)); serverPort.on('open', this._serverPortOpenHandler(this)); }
javascript
function OpenEventObserver(clientPort, serverPort) { events.EventEmitter.call(this); this.isClientPortOpen = false; this.isServerPortOpen = false; clientPort.on('open', this._clientPortOpenHandler(this)); serverPort.on('open', this._serverPortOpenHandler(this)); }
[ "function", "OpenEventObserver", "(", "clientPort", ",", "serverPort", ")", "{", "events", ".", "EventEmitter", ".", "call", "(", "this", ")", ";", "this", ".", "isClientPortOpen", "=", "false", ";", "this", ".", "isServerPortOpen", "=", "false", ";", "clien...
Local Helper Object to wait for the open event on two Serial Port objects
[ "Local", "Helper", "Object", "to", "wait", "for", "the", "open", "event", "on", "two", "Serial", "Port", "objects" ]
939cd5f24c397bc424cb1ab39d3c9df578e19dd6
https://github.com/mwittig/etherport-client/blob/939cd5f24c397bc424cb1ab39d3c9df578e19dd6/index.js#L149-L157
30,441
mwittig/etherport-client
index.js
chainSerialPorts
function chainSerialPorts(clientPort, serverPort) { var observer = new OpenEventObserver(clientPort, serverPort); function serverPortWrite(data) { try { debug('writing to serverPort', data); if (! Buffer.isBuffer(data)) { data = new Buffer(data); } ...
javascript
function chainSerialPorts(clientPort, serverPort) { var observer = new OpenEventObserver(clientPort, serverPort); function serverPortWrite(data) { try { debug('writing to serverPort', data); if (! Buffer.isBuffer(data)) { data = new Buffer(data); } ...
[ "function", "chainSerialPorts", "(", "clientPort", ",", "serverPort", ")", "{", "var", "observer", "=", "new", "OpenEventObserver", "(", "clientPort", ",", "serverPort", ")", ";", "function", "serverPortWrite", "(", "data", ")", "{", "try", "{", "debug", "(", ...
Helper function to chain Serial Port objects
[ "Helper", "function", "to", "chain", "Serial", "Port", "objects" ]
939cd5f24c397bc424cb1ab39d3c9df578e19dd6
https://github.com/mwittig/etherport-client/blob/939cd5f24c397bc424cb1ab39d3c9df578e19dd6/index.js#L182-L220
30,442
relution-io/relution-sdk
lib/web/http.js
logout
function logout(logoutOptions) { if (logoutOptions === void 0) { logoutOptions = {}; } var serverUrl = urls.resolveServer('/', logoutOptions); var serverObj = server.Server.getInstance(serverUrl); // process options var currentOptions = serverObj.applyOptions({ serverUrl: serverUrl, ...
javascript
function logout(logoutOptions) { if (logoutOptions === void 0) { logoutOptions = {}; } var serverUrl = urls.resolveServer('/', logoutOptions); var serverObj = server.Server.getInstance(serverUrl); // process options var currentOptions = serverObj.applyOptions({ serverUrl: serverUrl, ...
[ "function", "logout", "(", "logoutOptions", ")", "{", "if", "(", "logoutOptions", "===", "void", "0", ")", "{", "logoutOptions", "=", "{", "}", ";", "}", "var", "serverUrl", "=", "urls", ".", "resolveServer", "(", "'/'", ",", "logoutOptions", ")", ";", ...
logs out of a Relution server. For explicit logouts (trigger by app user pressing a logout button, for example) specifying `offlineCapable = true` will drop any persisted offline login data for the server logging out of. @param logoutOptions overwriting [[init]] defaults. @return {Q.Promise<void>} of logout response....
[ "logs", "out", "of", "a", "Relution", "server", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/web/http.js#L491-L544
30,443
relution-io/relution-sdk
lib/push/push.js
registerPushDevice
function registerPushDevice(registrationId, options) { if (options === void 0) { options = {}; } var user = server.getCurrentAuthorization().name; var pushInitOptions = init.initOptions.push; return device.ready.then(function (info) { var providerType; switch (info.platform.id) { ...
javascript
function registerPushDevice(registrationId, options) { if (options === void 0) { options = {}; } var user = server.getCurrentAuthorization().name; var pushInitOptions = init.initOptions.push; return device.ready.then(function (info) { var providerType; switch (info.platform.id) { ...
[ "function", "registerPushDevice", "(", "registrationId", ",", "options", ")", "{", "if", "(", "options", "===", "void", "0", ")", "{", "options", "=", "{", "}", ";", "}", "var", "user", "=", "server", ".", "getCurrentAuthorization", "(", ")", ".", "name"...
registers a target device with the current Relution server. The implementation relies on backend code generated by CLI. That code attempts fetching an existing device using the metadata information send as request body data. If it finds one, that device is updated. Otherwise a new device is created and stored in the d...
[ "registers", "a", "target", "device", "with", "the", "current", "Relution", "server", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/push.js#L52-L101
30,444
relution-io/relution-sdk
lib/push/push.js
pushDeviceFilterByUsers
function pushDeviceFilterByUsers() { var users = []; for (var _i = 0; _i < arguments.length; _i++) { users[_i - 0] = arguments[_i]; } if (users.length <= 0) { return { type: 'null', fieldName: 'user', isNull: true }; } else if (users.le...
javascript
function pushDeviceFilterByUsers() { var users = []; for (var _i = 0; _i < arguments.length; _i++) { users[_i - 0] = arguments[_i]; } if (users.length <= 0) { return { type: 'null', fieldName: 'user', isNull: true }; } else if (users.le...
[ "function", "pushDeviceFilterByUsers", "(", ")", "{", "var", "users", "=", "[", "]", ";", "for", "(", "var", "_i", "=", "0", ";", "_i", "<", "arguments", ".", "length", ";", "_i", "++", ")", "{", "users", "[", "_i", "-", "0", "]", "=", "arguments...
creates a device filter for the user attribute of push devices matching any of a given set of users. @param users* to filter on. @returns device filter matching devices of given users.
[ "creates", "a", "device", "filter", "for", "the", "user", "attribute", "of", "push", "devices", "matching", "any", "of", "a", "given", "set", "of", "users", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/push/push.js#L129-L156
30,445
saneki-discontinued/node-toxcore
lib/tox.js
function(opts) { if(!opts) opts = {}; var libpath = opts['path']; this._emitter = new events.EventEmitter(); this._library = this.createLibrary(libpath); this._initCrypto(opts); this._options = this._createToxOptions(opts); this._initNew(this._options); this._initCallbacks(); // Create a child ToxOl...
javascript
function(opts) { if(!opts) opts = {}; var libpath = opts['path']; this._emitter = new events.EventEmitter(); this._library = this.createLibrary(libpath); this._initCrypto(opts); this._options = this._createToxOptions(opts); this._initNew(this._options); this._initCallbacks(); // Create a child ToxOl...
[ "function", "(", "opts", ")", "{", "if", "(", "!", "opts", ")", "opts", "=", "{", "}", ";", "var", "libpath", "=", "opts", "[", "'path'", "]", ";", "this", ".", "_emitter", "=", "new", "events", ".", "EventEmitter", "(", ")", ";", "this", ".", ...
Creates a Tox instance. @class @param {Object} [opts] Options
[ "Creates", "a", "Tox", "instance", "." ]
45dfb339f4e8a58888fca175528dee13f075824a
https://github.com/saneki-discontinued/node-toxcore/blob/45dfb339f4e8a58888fca175528dee13f075824a/lib/tox.js#L130-L145
30,446
wingbotai/wingbot
src/tools/bufferloader.js
bufferloader
function bufferloader (url, limit = 0, limitJustByBody = false, redirCount = 3) { return new Promise((resolve, reject) => { if (redirCount <= 0) { reject(new Error('Too many redirects')); } let totalLength = 0; let buf = Buffer.alloc(0); const req = https.get(u...
javascript
function bufferloader (url, limit = 0, limitJustByBody = false, redirCount = 3) { return new Promise((resolve, reject) => { if (redirCount <= 0) { reject(new Error('Too many redirects')); } let totalLength = 0; let buf = Buffer.alloc(0); const req = https.get(u...
[ "function", "bufferloader", "(", "url", ",", "limit", "=", "0", ",", "limitJustByBody", "=", "false", ",", "redirCount", "=", "3", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "if", "(", "redirCount", "<=", ...
Downloads a file from url into a buffer. Supports size limits and redirects. @param {string} url @param {number} [limit=0] - limit in bytes @param {boolean} [limitJustByBody=false] - when true, content size in header is ignored @param {number} [redirCount=3] - maximmum amount of redirects @returns {Promise<Buffer>} @...
[ "Downloads", "a", "file", "from", "url", "into", "a", "buffer", ".", "Supports", "size", "limits", "and", "redirects", "." ]
2a917d6a5798e6f3e2258ef445b600eddfd1961b
https://github.com/wingbotai/wingbot/blob/2a917d6a5798e6f3e2258ef445b600eddfd1961b/src/tools/bufferloader.js#L33-L99
30,447
phase2/generator-gadget
generators/app/index.js
function () { if (options['offline']) { options.drupalDistroRelease = '0.0.0'; } else { // Find the latest stable release for the Drupal distro version. var done = this.async(); options.drupalDistro.releaseVersion(options.drupalDistroVersion, done, function(err, version...
javascript
function () { if (options['offline']) { options.drupalDistroRelease = '0.0.0'; } else { // Find the latest stable release for the Drupal distro version. var done = this.async(); options.drupalDistro.releaseVersion(options.drupalDistroVersion, done, function(err, version...
[ "function", "(", ")", "{", "if", "(", "options", "[", "'offline'", "]", ")", "{", "options", ".", "drupalDistroRelease", "=", "'0.0.0'", ";", "}", "else", "{", "// Find the latest stable release for the Drupal distro version.", "var", "done", "=", "this", ".", "...
Determine the latest stable release for the requested Drupal core version.
[ "Determine", "the", "latest", "stable", "release", "for", "the", "requested", "Drupal", "core", "version", "." ]
8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d
https://github.com/phase2/generator-gadget/blob/8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d/generators/app/index.js#L59-L75
30,448
phase2/generator-gadget
generators/app/index.js
function () { var srcFiles = path.resolve( this.templatePath('drupal'), options.drupalDistro.id, options.drupalDistroVersion ); if (gadget.fsExistsSync(srcFiles)) { this.fs.copy( path.resolve(srcFiles), this.destinationRoot(), { ...
javascript
function () { var srcFiles = path.resolve( this.templatePath('drupal'), options.drupalDistro.id, options.drupalDistroVersion ); if (gadget.fsExistsSync(srcFiles)) { this.fs.copy( path.resolve(srcFiles), this.destinationRoot(), { ...
[ "function", "(", ")", "{", "var", "srcFiles", "=", "path", ".", "resolve", "(", "this", ".", "templatePath", "(", "'drupal'", ")", ",", "options", ".", "drupalDistro", ".", "id", ",", "options", ".", "drupalDistroVersion", ")", ";", "if", "(", "gadget", ...
This has been moved up from writing because the details of some of these files may need to be loaded as part of configuring other write operations, and the parallelization model for generator composition requires dependencies to be handled in an earlier priority context.
[ "This", "has", "been", "moved", "up", "from", "writing", "because", "the", "details", "of", "some", "of", "these", "files", "may", "need", "to", "be", "loaded", "as", "part", "of", "configuring", "other", "write", "operations", "and", "the", "parallelization...
8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d
https://github.com/phase2/generator-gadget/blob/8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d/generators/app/index.js#L143-L161
30,449
phase2/generator-gadget
generators/app/index.js
function () { var isNewProject = (this.composerOrig == undefined); if (!isNewProject) { // Use original composer file if project already generated. this.composer = this.composerOrig; } this.composer.name = 'organization/' + options.projectName; this.composer.description = ...
javascript
function () { var isNewProject = (this.composerOrig == undefined); if (!isNewProject) { // Use original composer file if project already generated. this.composer = this.composerOrig; } this.composer.name = 'organization/' + options.projectName; this.composer.description = ...
[ "function", "(", ")", "{", "var", "isNewProject", "=", "(", "this", ".", "composerOrig", "==", "undefined", ")", ";", "if", "(", "!", "isNewProject", ")", "{", "// Use original composer file if project already generated.", "this", ".", "composer", "=", "this", "...
While there are write operations in this, other write operations may need to examine the composer.json to determine their own configuration.
[ "While", "there", "are", "write", "operations", "in", "this", "other", "write", "operations", "may", "need", "to", "examine", "the", "composer", ".", "json", "to", "determine", "their", "own", "configuration", "." ]
8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d
https://github.com/phase2/generator-gadget/blob/8ebc9a6f7592ebc37844cd2aec346c2e00aaa91d/generators/app/index.js#L165-L188
30,450
relution-io/relution-sdk
lib/connector/connector.js
runCall
function runCall(name, call, input) { return web.post(connectorsUrl + '/' + name + '/' + call, input); }
javascript
function runCall(name, call, input) { return web.post(connectorsUrl + '/' + name + '/' + call, input); }
[ "function", "runCall", "(", "name", ",", "call", ",", "input", ")", "{", "return", "web", ".", "post", "(", "connectorsUrl", "+", "'/'", "+", "name", "+", "'/'", "+", "call", ",", "input", ")", ";", "}" ]
executes a call on a connection. @param name of connection. @param call name. @param input data, i.e. an instance of a model or object compatible to the model in terms of attributes defined. @returns promise providing output/error.
[ "executes", "a", "call", "on", "a", "connection", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/connector/connector.js#L59-L61
30,451
wingbotai/wingbot
src/graphApi/validateBotApi.js
validateBotApi
function validateBotApi (botFactory, postBackTest, textTest, acl) { /** @deprecated way to validate bot */ if (postBackTest && typeof postBackTest === 'object') { // @ts-ignore return validate(botFactory, postBackTest, textTest, acl) .then((res) => { if (!res.ok) { ...
javascript
function validateBotApi (botFactory, postBackTest, textTest, acl) { /** @deprecated way to validate bot */ if (postBackTest && typeof postBackTest === 'object') { // @ts-ignore return validate(botFactory, postBackTest, textTest, acl) .then((res) => { if (!res.ok) { ...
[ "function", "validateBotApi", "(", "botFactory", ",", "postBackTest", ",", "textTest", ",", "acl", ")", "{", "/** @deprecated way to validate bot */", "if", "(", "postBackTest", "&&", "typeof", "postBackTest", "===", "'object'", ")", "{", "// @ts-ignore", "return", ...
Test the bot configuration @param {Function} botFactory - function, which returns a bot @param {string|null} [postBackTest] - postback action to test @param {string|null} [textTest] - random text to test @param {string[]|Function} [acl] - limit api to array of groups or use auth function @returns {ValidateBotAPI} @exa...
[ "Test", "the", "bot", "configuration" ]
2a917d6a5798e6f3e2258ef445b600eddfd1961b
https://github.com/wingbotai/wingbot/blob/2a917d6a5798e6f3e2258ef445b600eddfd1961b/src/graphApi/validateBotApi.js#L61-L87
30,452
relution-io/relution-sdk
lib/web/offline.js
clearOfflineLogin
function clearOfflineLogin(credentials, serverOptions) { // simultaneous logins using different credentials is not realized so far, // so that the credentials parameter is irrelevant, but provided for the // sake of completeness... try { localStorage().removeItem(computeLocalStorageKey(serverOpt...
javascript
function clearOfflineLogin(credentials, serverOptions) { // simultaneous logins using different credentials is not realized so far, // so that the credentials parameter is irrelevant, but provided for the // sake of completeness... try { localStorage().removeItem(computeLocalStorageKey(serverOpt...
[ "function", "clearOfflineLogin", "(", "credentials", ",", "serverOptions", ")", "{", "// simultaneous logins using different credentials is not realized so far,", "// so that the credentials parameter is irrelevant, but provided for the", "// sake of completeness...", "try", "{", "localSto...
deletes stored login response of some server. @param credentials allowing to differentiate when multiple logins are used simultaneously, may be null to forget just anything. @param serverOptions identifying the server. @return {Promise<void>} indicating success or failure. @internal Not part of public API, for librar...
[ "deletes", "stored", "login", "response", "of", "some", "server", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/web/offline.js#L58-L69
30,453
relution-io/relution-sdk
lib/web/offline.js
storeOfflineLogin
function storeOfflineLogin(credentials, serverOptions, loginResponse) { return cipher.encryptJson(credentials['password'], loginResponse).then(function (value) { localStorage().setItem(computeLocalStorageKey(serverOptions), JSON.stringify(value)); return loginResponse; }); }
javascript
function storeOfflineLogin(credentials, serverOptions, loginResponse) { return cipher.encryptJson(credentials['password'], loginResponse).then(function (value) { localStorage().setItem(computeLocalStorageKey(serverOptions), JSON.stringify(value)); return loginResponse; }); }
[ "function", "storeOfflineLogin", "(", "credentials", ",", "serverOptions", ",", "loginResponse", ")", "{", "return", "cipher", ".", "encryptJson", "(", "credentials", "[", "'password'", "]", ",", "loginResponse", ")", ".", "then", "(", "function", "(", "value", ...
writes response data to persistent storage for offline login purposes. @param credentials required for encryption. @param serverOptions identifying the server. @param loginResponse permitted to durable storage. @return {Promise<http.LoginResponse>} indicating success or failure. @internal Not part of public API, for ...
[ "writes", "response", "data", "to", "persistent", "storage", "for", "offline", "login", "purposes", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/web/offline.js#L81-L86
30,454
relution-io/relution-sdk
lib/web/offline.js
fetchOfflineLogin
function fetchOfflineLogin(credentials, serverOptions) { try { var value = localStorage().getItem(computeLocalStorageKey(serverOptions)); if (!value) { return Q.resolve(undefined); } return cipher.decryptJson(credentials['password'], JSON.parse(value)); } catch (e...
javascript
function fetchOfflineLogin(credentials, serverOptions) { try { var value = localStorage().getItem(computeLocalStorageKey(serverOptions)); if (!value) { return Q.resolve(undefined); } return cipher.decryptJson(credentials['password'], JSON.parse(value)); } catch (e...
[ "function", "fetchOfflineLogin", "(", "credentials", ",", "serverOptions", ")", "{", "try", "{", "var", "value", "=", "localStorage", "(", ")", ".", "getItem", "(", "computeLocalStorageKey", "(", "serverOptions", ")", ")", ";", "if", "(", "!", "value", ")", ...
reads response data from persistent storage. When there is no data in persitent store, the operation does NOT fail. In this case the resulting promise resolves to nil instead. @param credentials required for decryption. @param serverOptions identifying the server. @return {Promise<http.LoginResponse>} read from store...
[ "reads", "response", "data", "from", "persistent", "storage", "." ]
776b8bd0c249428add03f97ba2d19092e709bc7b
https://github.com/relution-io/relution-sdk/blob/776b8bd0c249428add03f97ba2d19092e709bc7b/lib/web/offline.js#L101-L112
30,455
saneki-discontinued/node-toxcore
lib/toxencryptsave.js
function(opts) { // If opts is a string, assume libpath if(_.isString(opts)) { opts = { path: opts } } if(!opts) opts = {}; var libpath = opts['path']; this._library = this._createLibrary(libpath); }
javascript
function(opts) { // If opts is a string, assume libpath if(_.isString(opts)) { opts = { path: opts } } if(!opts) opts = {}; var libpath = opts['path']; this._library = this._createLibrary(libpath); }
[ "function", "(", "opts", ")", "{", "// If opts is a string, assume libpath", "if", "(", "_", ".", "isString", "(", "opts", ")", ")", "{", "opts", "=", "{", "path", ":", "opts", "}", "}", "if", "(", "!", "opts", ")", "opts", "=", "{", "}", ";", "var...
Creates a ToxEncryptSave instance. @class @param {(Object|String)} [opts] Options
[ "Creates", "a", "ToxEncryptSave", "instance", "." ]
45dfb339f4e8a58888fca175528dee13f075824a
https://github.com/saneki-discontinued/node-toxcore/blob/45dfb339f4e8a58888fca175528dee13f075824a/lib/toxencryptsave.js#L49-L59
30,456
canjs/can-query-logic
src/types/keys-and.js
KeysAnd
function KeysAnd(values) { var vals = this.values = {}; canReflect.eachKey(values, function(value, key) { if (canReflect.isPlainObject(value) && !set.isSpecial(value)) { vals[key] = new KeysAnd(value); } else { vals[key] = value; } }); }
javascript
function KeysAnd(values) { var vals = this.values = {}; canReflect.eachKey(values, function(value, key) { if (canReflect.isPlainObject(value) && !set.isSpecial(value)) { vals[key] = new KeysAnd(value); } else { vals[key] = value; } }); }
[ "function", "KeysAnd", "(", "values", ")", "{", "var", "vals", "=", "this", ".", "values", "=", "{", "}", ";", "canReflect", ".", "eachKey", "(", "values", ",", "function", "(", "value", ",", "key", ")", "{", "if", "(", "canReflect", ".", "isPlainObj...
Define the sub-types that BasicQuery will use
[ "Define", "the", "sub", "-", "types", "that", "BasicQuery", "will", "use" ]
fe32908e7aa36853362fbc1a4df276193247f38d
https://github.com/canjs/can-query-logic/blob/fe32908e7aa36853362fbc1a4df276193247f38d/src/types/keys-and.js#L11-L20
30,457
Pajn/tscomp
config/paths.js
resolveAppBuild
function resolveAppBuild(appTsConfigPath) { const outDir = getAppBuildFolder(appTsConfigPath); const buildPath = path.join(path.dirname(appTsConfigPath), outDir); return buildPath; }
javascript
function resolveAppBuild(appTsConfigPath) { const outDir = getAppBuildFolder(appTsConfigPath); const buildPath = path.join(path.dirname(appTsConfigPath), outDir); return buildPath; }
[ "function", "resolveAppBuild", "(", "appTsConfigPath", ")", "{", "const", "outDir", "=", "getAppBuildFolder", "(", "appTsConfigPath", ")", ";", "const", "buildPath", "=", "path", ".", "join", "(", "path", ".", "dirname", "(", "appTsConfigPath", ")", ",", "outD...
The user may choose to change the tsconfig.json `outDir` property.
[ "The", "user", "may", "choose", "to", "change", "the", "tsconfig", ".", "json", "outDir", "property", "." ]
82ab5d2237a324ca0e2ef4c108611b9eb975f2e8
https://github.com/Pajn/tscomp/blob/82ab5d2237a324ca0e2ef4c108611b9eb975f2e8/config/paths.js#L31-L35
30,458
soajs/soajs.urac.driver
index.js
initBLModel
function initBLModel(soajs, cb) { let modelName = driverConfig.model; if (soajs.servicesConfig && soajs.servicesConfig.model) { modelName = soajs.servicesConfig.model; } if (process.env.SOAJS_TEST && soajs.inputmaskData && soajs.inputmaskData.model) { modelName = soajs.inputmaskData.mode...
javascript
function initBLModel(soajs, cb) { let modelName = driverConfig.model; if (soajs.servicesConfig && soajs.servicesConfig.model) { modelName = soajs.servicesConfig.model; } if (process.env.SOAJS_TEST && soajs.inputmaskData && soajs.inputmaskData.model) { modelName = soajs.inputmaskData.mode...
[ "function", "initBLModel", "(", "soajs", ",", "cb", ")", "{", "let", "modelName", "=", "driverConfig", ".", "model", ";", "if", "(", "soajs", ".", "servicesConfig", "&&", "soajs", ".", "servicesConfig", ".", "model", ")", "{", "modelName", "=", "soajs", ...
Initialize the Business Logic model and set it on driver
[ "Initialize", "the", "Business", "Logic", "model", "and", "set", "it", "on", "driver" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/index.js#L17-L47
30,459
soajs/soajs.urac.driver
index.js
requireModel
function requireModel(filePath, cb) { //check if file exist. if not return error fs.exists(filePath, function (exists) { if (!exists) { soajs.log.error('Requested Model Not Found!'); return cb(601); } driver.model = require(filePath); ...
javascript
function requireModel(filePath, cb) { //check if file exist. if not return error fs.exists(filePath, function (exists) { if (!exists) { soajs.log.error('Requested Model Not Found!'); return cb(601); } driver.model = require(filePath); ...
[ "function", "requireModel", "(", "filePath", ",", "cb", ")", "{", "//check if file exist. if not return error", "fs", ".", "exists", "(", "filePath", ",", "function", "(", "exists", ")", "{", "if", "(", "!", "exists", ")", "{", "soajs", ".", "log", ".", "e...
checks if model file exists, requires it and returns it. @param filePath @param cb
[ "checks", "if", "model", "file", "exists", "requires", "it", "and", "returns", "it", "." ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/index.js#L34-L45
30,460
soajs/soajs.urac.driver
index.js
function (req, res, passport, cb) { let authentication = req.soajs.inputmaskData.strategy; passportLib.getDriver(req, false, function (err, passportDriver) { passportDriver.preAuthenticate(req, function () { passport.authenticate(authentication, {session: false}, function (e...
javascript
function (req, res, passport, cb) { let authentication = req.soajs.inputmaskData.strategy; passportLib.getDriver(req, false, function (err, passportDriver) { passportDriver.preAuthenticate(req, function () { passport.authenticate(authentication, {session: false}, function (e...
[ "function", "(", "req", ",", "res", ",", "passport", ",", "cb", ")", "{", "let", "authentication", "=", "req", ".", "soajs", ".", "inputmaskData", ".", "strategy", ";", "passportLib", ".", "getDriver", "(", "req", ",", "false", ",", "function", "(", "e...
Get driver, do what is needed before authenticating, and authenticate
[ "Get", "driver", "do", "what", "is", "needed", "before", "authenticating", "and", "authenticate" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/index.js#L130-L159
30,461
soajs/soajs.urac.driver
index.js
function (soajs, data, cb) { initBLModel(soajs, function (err) { if (err) { return cb(err); } driver.model.initConnection(soajs); let criteria = null; if (!(data.username || data.id)) { return cb(411); } ...
javascript
function (soajs, data, cb) { initBLModel(soajs, function (err) { if (err) { return cb(err); } driver.model.initConnection(soajs); let criteria = null; if (!(data.username || data.id)) { return cb(411); } ...
[ "function", "(", "soajs", ",", "data", ",", "cb", ")", "{", "initBLModel", "(", "soajs", ",", "function", "(", "err", ")", "{", "if", "(", "err", ")", "{", "return", "cb", "(", "err", ")", ";", "}", "driver", ".", "model", ".", "initConnection", ...
Get logged in record from database
[ "Get", "logged", "in", "record", "from", "database" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/index.js#L287-L339
30,462
soajs/soajs.urac.driver
index.js
function (soajs, data, cb) { let token = data.token; let openam; if (soajs.servicesConfig.urac && soajs.servicesConfig.urac.openam) { openam = soajs.servicesConfig.urac.openam; } else { return cb({"code": 712, "msg": soajs.config.errors[712]}); } ...
javascript
function (soajs, data, cb) { let token = data.token; let openam; if (soajs.servicesConfig.urac && soajs.servicesConfig.urac.openam) { openam = soajs.servicesConfig.urac.openam; } else { return cb({"code": 712, "msg": soajs.config.errors[712]}); } ...
[ "function", "(", "soajs", ",", "data", ",", "cb", ")", "{", "let", "token", "=", "data", ".", "token", ";", "let", "openam", ";", "if", "(", "soajs", ".", "servicesConfig", ".", "urac", "&&", "soajs", ".", "servicesConfig", ".", "urac", ".", "openam"...
Login through OpenAM Expects to have openam configuration object under soajs.servicesConfig.urac. Example openam configuration object: { attributesURL: "https://test.com/openam/identity/json/attributes", attributesMap: [ { field: 'sAMAccountName', mapTo: 'id' }, { field: 'sAMAccountName', mapTo: 'username' }, { field...
[ "Login", "through", "OpenAM" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/index.js#L359-L411
30,463
soajs/soajs.urac.driver
model/mongo.js
function (soajs) { if (soajs.inputmaskData && soajs.inputmaskData.isOwner) { soajs.mongoDb = new Mongo(soajs.meta.tenantDB(soajs.registry.tenantMetaDB, 'urac', soajs.inputmaskData.tCode)); } else { let tcode = soajs.tenant.code; if (soajs.tenant.roaming && soa...
javascript
function (soajs) { if (soajs.inputmaskData && soajs.inputmaskData.isOwner) { soajs.mongoDb = new Mongo(soajs.meta.tenantDB(soajs.registry.tenantMetaDB, 'urac', soajs.inputmaskData.tCode)); } else { let tcode = soajs.tenant.code; if (soajs.tenant.roaming && soa...
[ "function", "(", "soajs", ")", "{", "if", "(", "soajs", ".", "inputmaskData", "&&", "soajs", ".", "inputmaskData", ".", "isOwner", ")", "{", "soajs", ".", "mongoDb", "=", "new", "Mongo", "(", "soajs", ".", "meta", ".", "tenantDB", "(", "soajs", ".", ...
Initialize the mongo connection
[ "Initialize", "the", "mongo", "connection" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/model/mongo.js#L8-L25
30,464
soajs/soajs.urac.driver
model/mongo.js
function (soajs, id) { let id1; try { id1 = soajs.mongoDb.ObjectId(id.toString()); return id1; } catch (e) { soajs.log.error(e); throw e; } }
javascript
function (soajs, id) { let id1; try { id1 = soajs.mongoDb.ObjectId(id.toString()); return id1; } catch (e) { soajs.log.error(e); throw e; } }
[ "function", "(", "soajs", ",", "id", ")", "{", "let", "id1", ";", "try", "{", "id1", "=", "soajs", ".", "mongoDb", ".", "ObjectId", "(", "id", ".", "toString", "(", ")", ")", ";", "return", "id1", ";", "}", "catch", "(", "e", ")", "{", "soajs",...
Validates the mongo object ID
[ "Validates", "the", "mongo", "object", "ID" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/model/mongo.js#L37-L47
30,465
soajs/soajs.urac.driver
model/mongo.js
function (soajs, combo, cb) { soajs.mongoDb.find(combo.collection, combo.condition || {}, combo.fields || null, combo.options || null, cb); }
javascript
function (soajs, combo, cb) { soajs.mongoDb.find(combo.collection, combo.condition || {}, combo.fields || null, combo.options || null, cb); }
[ "function", "(", "soajs", ",", "combo", ",", "cb", ")", "{", "soajs", ".", "mongoDb", ".", "find", "(", "combo", ".", "collection", ",", "combo", ".", "condition", "||", "{", "}", ",", "combo", ".", "fields", "||", "null", ",", "combo", ".", "optio...
Find multiple entries based on a condition
[ "Find", "multiple", "entries", "based", "on", "a", "condition" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/model/mongo.js#L52-L54
30,466
soajs/soajs.urac.driver
model/mongo.js
function (soajs, combo, cb) { soajs.mongoDb.insert(combo.collection, combo.record, cb); }
javascript
function (soajs, combo, cb) { soajs.mongoDb.insert(combo.collection, combo.record, cb); }
[ "function", "(", "soajs", ",", "combo", ",", "cb", ")", "{", "soajs", ".", "mongoDb", ".", "insert", "(", "combo", ".", "collection", ",", "combo", ".", "record", ",", "cb", ")", ";", "}" ]
Insert a new entry in the database
[ "Insert", "a", "new", "entry", "in", "the", "database" ]
b9b07dd5269b13d4fd5987ee2c5869d7eccba086
https://github.com/soajs/soajs.urac.driver/blob/b9b07dd5269b13d4fd5987ee2c5869d7eccba086/model/mongo.js#L80-L82
30,467
duniter/duniter-ui
public/libraries.js
configFromRFC2822
function configFromRFC2822(config) { var string, match, dayFormat, dateFormat, timeFormat, tzFormat; var timezones = { ' GMT': ' +0000', ' EDT': ' -0400', ' EST': ' -0500', ' CDT': ' -0500', ' CST': ' -0600', ' MDT': ' -0600', ' MST': ' -0700', ...
javascript
function configFromRFC2822(config) { var string, match, dayFormat, dateFormat, timeFormat, tzFormat; var timezones = { ' GMT': ' +0000', ' EDT': ' -0400', ' EST': ' -0500', ' CDT': ' -0500', ' CST': ' -0600', ' MDT': ' -0600', ' MST': ' -0700', ...
[ "function", "configFromRFC2822", "(", "config", ")", "{", "var", "string", ",", "match", ",", "dayFormat", ",", "dateFormat", ",", "timeFormat", ",", "tzFormat", ";", "var", "timezones", "=", "{", "' GMT'", ":", "' +0000'", ",", "' EDT'", ":", "' -0400'", ...
date and time from ref 2822 format
[ "date", "and", "time", "from", "ref", "2822", "format" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L2482-L2547
30,468
duniter/duniter-ui
public/libraries.js
matchDetails
function matchDetails(m, isSearch) { var id, regexp, segment, type, cfg, arrayMode; id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null cfg = config.params[id]; segment = pattern.substring(last, m.index); regexp = isSearch ? m[4] : m[4] || (m[1] == ...
javascript
function matchDetails(m, isSearch) { var id, regexp, segment, type, cfg, arrayMode; id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null cfg = config.params[id]; segment = pattern.substring(last, m.index); regexp = isSearch ? m[4] : m[4] || (m[1] == ...
[ "function", "matchDetails", "(", "m", ",", "isSearch", ")", "{", "var", "id", ",", "regexp", ",", "segment", ",", "type", ",", "cfg", ",", "arrayMode", ";", "id", "=", "m", "[", "2", "]", "||", "m", "[", "3", "]", ";", "// IE[78] returns '' for unmat...
Split into static segments separated by path parameter placeholders. The number of segments is always 1 more than the number of parameters.
[ "Split", "into", "static", "segments", "separated", "by", "path", "parameter", "placeholders", ".", "The", "number", "of", "segments", "is", "always", "1", "more", "than", "the", "number", "of", "parameters", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L32234-L32248
30,469
duniter/duniter-ui
public/libraries.js
update
function update() { for (var i = 0; i < states.length; i++) { if (anyMatch(states[i].state, states[i].params)) { addClass($element, activeClasses[states[i].hash]); } else { removeClass($element, activeClasses[states[i].hash]); } if (exactMatch(sta...
javascript
function update() { for (var i = 0; i < states.length; i++) { if (anyMatch(states[i].state, states[i].params)) { addClass($element, activeClasses[states[i].hash]); } else { removeClass($element, activeClasses[states[i].hash]); } if (exactMatch(sta...
[ "function", "update", "(", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "states", ".", "length", ";", "i", "++", ")", "{", "if", "(", "anyMatch", "(", "states", "[", "i", "]", ".", "state", ",", "states", "[", "i", "]", ".", "...
Update route state
[ "Update", "route", "state" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L35912-L35926
30,470
duniter/duniter-ui
public/libraries.js
extendClass
function extendClass(parent, members) { var object = function () { return UNDEFINED; }; object.prototype = new parent(); extend(object.prototype, members); return object; }
javascript
function extendClass(parent, members) { var object = function () { return UNDEFINED; }; object.prototype = new parent(); extend(object.prototype, members); return object; }
[ "function", "extendClass", "(", "parent", ",", "members", ")", "{", "var", "object", "=", "function", "(", ")", "{", "return", "UNDEFINED", ";", "}", ";", "object", ".", "prototype", "=", "new", "parent", "(", ")", ";", "extend", "(", "object", ".", ...
Extend a prototyped class by new members @param {Object} parent @param {Object} members
[ "Extend", "a", "prototyped", "class", "by", "new", "members" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L52189-L52194
30,471
duniter/duniter-ui
public/libraries.js
numberFormat
function numberFormat(number, decimals, decPoint, thousandsSep) { var externalFn = Highcharts.numberFormat, lang = defaultOptions.lang, // http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/ n = +number || 0, c = decimals === -1 ? ...
javascript
function numberFormat(number, decimals, decPoint, thousandsSep) { var externalFn = Highcharts.numberFormat, lang = defaultOptions.lang, // http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/ n = +number || 0, c = decimals === -1 ? ...
[ "function", "numberFormat", "(", "number", ",", "decimals", ",", "decPoint", ",", "thousandsSep", ")", "{", "var", "externalFn", "=", "Highcharts", ".", "numberFormat", ",", "lang", "=", "defaultOptions", ".", "lang", ",", "// http://kevin.vanzonneveld.net/techblog/...
Format a number and return a string based on input settings @param {Number} number The input number to format @param {Number} decimals The amount of decimals @param {String} decPoint The decimal point, defaults to the one given in the lang options @param {String} thousandsSep The thousands separator, defaults to the on...
[ "Format", "a", "number", "and", "return", "a", "string", "based", "on", "input", "settings" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L52203-L52221
30,472
duniter/duniter-ui
public/libraries.js
formatSingle
function formatSingle(format, val) { var floatRegex = /f$/, decRegex = /\.([0-9])/, lang = defaultOptions.lang, decimals; if (floatRegex.test(format)) { // float decimals = format.match(decRegex); decimals = decimals ? decimals[1] : -1; ...
javascript
function formatSingle(format, val) { var floatRegex = /f$/, decRegex = /\.([0-9])/, lang = defaultOptions.lang, decimals; if (floatRegex.test(format)) { // float decimals = format.match(decRegex); decimals = decimals ? decimals[1] : -1; ...
[ "function", "formatSingle", "(", "format", ",", "val", ")", "{", "var", "floatRegex", "=", "/", "f$", "/", ",", "decRegex", "=", "/", "\\.([0-9])", "/", ",", "lang", "=", "defaultOptions", ".", "lang", ",", "decimals", ";", "if", "(", "floatRegex", "."...
Format a single variable. Similar to sprintf, without the % prefix.
[ "Format", "a", "single", "variable", ".", "Similar", "to", "sprintf", "without", "the", "%", "prefix", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L52320-L52341
30,473
duniter/duniter-ui
public/libraries.js
function (prop, setter) { // jQuery 1.8 style if ($.Tween) { $.Tween.propHooks[prop] = { set: setter }; // pre 1.8 } else { $.fx.step[prop] = setter; ...
javascript
function (prop, setter) { // jQuery 1.8 style if ($.Tween) { $.Tween.propHooks[prop] = { set: setter }; // pre 1.8 } else { $.fx.step[prop] = setter; ...
[ "function", "(", "prop", ",", "setter", ")", "{", "// jQuery 1.8 style", "if", "(", "$", ".", "Tween", ")", "{", "$", ".", "Tween", ".", "propHooks", "[", "prop", "]", "=", "{", "set", ":", "setter", "}", ";", "// pre 1.8", "}", "else", "{", "$", ...
Add an animation setter for a specific property
[ "Add", "an", "animation", "setter", "for", "a", "specific", "property" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L52835-L52845
30,474
duniter/duniter-ui
public/libraries.js
function (inherit) { // IE9-11 doesn't handle visibilty:inherit well, so we remove the attribute instead (#2881) if (inherit && this.element.namespaceURI === SVG_NS) { this.element.removeAttribute('visibility'); } else { this.attr({ visibility: inherit...
javascript
function (inherit) { // IE9-11 doesn't handle visibilty:inherit well, so we remove the attribute instead (#2881) if (inherit && this.element.namespaceURI === SVG_NS) { this.element.removeAttribute('visibility'); } else { this.attr({ visibility: inherit...
[ "function", "(", "inherit", ")", "{", "// IE9-11 doesn't handle visibilty:inherit well, so we remove the attribute instead (#2881)", "if", "(", "inherit", "&&", "this", ".", "element", ".", "namespaceURI", "===", "SVG_NS", ")", "{", "this", ".", "element", ".", "removeA...
Show the element
[ "Show", "the", "element" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L54276-L54284
30,475
duniter/duniter-ui
public/libraries.js
function (parent) { var renderer = this.renderer, parentWrapper = parent || renderer, parentNode = parentWrapper.element || renderer.box, childNodes, element = this.element, zIndex = this.zIndex, otherElement, ...
javascript
function (parent) { var renderer = this.renderer, parentWrapper = parent || renderer, parentNode = parentWrapper.element || renderer.box, childNodes, element = this.element, zIndex = this.zIndex, otherElement, ...
[ "function", "(", "parent", ")", "{", "var", "renderer", "=", "this", ".", "renderer", ",", "parentWrapper", "=", "parent", "||", "renderer", ",", "parentNode", "=", "parentWrapper", ".", "element", "||", "renderer", ".", "box", ",", "childNodes", ",", "ele...
Add the element @param {Object|Undefined} parent Can be an element, an element wrapper or undefined to append the element to the renderer.box.
[ "Add", "the", "element" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L54310-L54375
30,476
duniter/duniter-ui
public/libraries.js
function (key) { var ret = pick(this[key], this.element ? this.element.getAttribute(key) : null, 0); if (/^[\-0-9\.]+$/.test(ret)) { // is numerical ret = parseFloat(ret); } return ret; }
javascript
function (key) { var ret = pick(this[key], this.element ? this.element.getAttribute(key) : null, 0); if (/^[\-0-9\.]+$/.test(ret)) { // is numerical ret = parseFloat(ret); } return ret; }
[ "function", "(", "key", ")", "{", "var", "ret", "=", "pick", "(", "this", "[", "key", "]", ",", "this", ".", "element", "?", "this", ".", "element", ".", "getAttribute", "(", "key", ")", ":", "null", ",", "0", ")", ";", "if", "(", "/", "^[\\-0-...
Get the current value of an attribute or pseudo attribute, used mainly for animation.
[ "Get", "the", "current", "value", "of", "an", "attribute", "or", "pseudo", "attribute", "used", "mainly", "for", "animation", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L54511-L54518
30,477
duniter/duniter-ui
public/libraries.js
function (x, y, w, h, options) { var arrowLength = 6, halfDistance = 6, r = mathMin((options && options.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options && options.anchorX, anchorY = options && op...
javascript
function (x, y, w, h, options) { var arrowLength = 6, halfDistance = 6, r = mathMin((options && options.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options && options.anchorX, anchorY = options && op...
[ "function", "(", "x", ",", "y", ",", "w", ",", "h", ",", "options", ")", "{", "var", "arrowLength", "=", "6", ",", "halfDistance", "=", "6", ",", "r", "=", "mathMin", "(", "(", "options", "&&", "options", ".", "r", ")", "||", "0", ",", "w", "...
Callout shape used for default tooltips, also used for rounded rectangles in VML
[ "Callout", "shape", "used", "for", "default", "tooltips", "also", "used", "for", "rounded", "rectangles", "in", "VML" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L55487-L55541
30,478
duniter/duniter-ui
public/libraries.js
function () { // Added by button implementation removeEvent(wrapper.element, 'mouseenter'); removeEvent(wrapper.element, 'mouseleave'); if (text) { text = text.destroy(); } i...
javascript
function () { // Added by button implementation removeEvent(wrapper.element, 'mouseenter'); removeEvent(wrapper.element, 'mouseleave'); if (text) { text = text.destroy(); } i...
[ "function", "(", ")", "{", "// Added by button implementation", "removeEvent", "(", "wrapper", ".", "element", ",", "'mouseenter'", ")", ";", "removeEvent", "(", "wrapper", ".", "element", ",", "'mouseleave'", ")", ";", "if", "(", "text", ")", "{", "text", "...
Destroy and release memory.
[ "Destroy", "and", "release", "memory", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L55913-L55930
30,479
duniter/duniter-ui
public/libraries.js
function (width, baseline, alignCorrection, rotation, align) { var costheta = rotation ? mathCos(rotation * deg2rad) : 1, sintheta = rotation ? mathSin(rotation * deg2rad) : 0, height = pick(this.elemHeight, this.element.offsetHeight), quad, ...
javascript
function (width, baseline, alignCorrection, rotation, align) { var costheta = rotation ? mathCos(rotation * deg2rad) : 1, sintheta = rotation ? mathSin(rotation * deg2rad) : 0, height = pick(this.elemHeight, this.element.offsetHeight), quad, ...
[ "function", "(", "width", ",", "baseline", ",", "alignCorrection", ",", "rotation", ",", "align", ")", "{", "var", "costheta", "=", "rotation", "?", "mathCos", "(", "rotation", "*", "deg2rad", ")", ":", "1", ",", "sintheta", "=", "rotation", "?", "mathSi...
Get the positioning correction for the span after rotating.
[ "Get", "the", "positioning", "correction", "for", "the", "span", "after", "rotating", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L56354-L56380
30,480
duniter/duniter-ui
public/libraries.js
function (key, value) { if (docMode8) { // IE8 setAttribute bug this.element[key] = value; } else { this.element.setAttribute(key, value); } }
javascript
function (key, value) { if (docMode8) { // IE8 setAttribute bug this.element[key] = value; } else { this.element.setAttribute(key, value); } }
[ "function", "(", "key", ",", "value", ")", "{", "if", "(", "docMode8", ")", "{", "// IE8 setAttribute bug", "this", ".", "element", "[", "key", "]", "=", "value", ";", "}", "else", "{", "this", ".", "element", ".", "setAttribute", "(", "key", ",", "v...
Used in SVG only
[ "Used", "in", "SVG", "only" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L56596-L56602
30,481
duniter/duniter-ui
public/libraries.js
function (value, key, element) { var style = element.style; this[key] = style[key] = value; // style is for #1873 // Correction for the 1x1 size of the shape container. Used in gauge needles. style.left = -mathRound(mathSin(value * deg2rad) + 1) + PX; ...
javascript
function (value, key, element) { var style = element.style; this[key] = style[key] = value; // style is for #1873 // Correction for the 1x1 size of the shape container. Used in gauge needles. style.left = -mathRound(mathSin(value * deg2rad) + 1) + PX; ...
[ "function", "(", "value", ",", "key", ",", "element", ")", "{", "var", "style", "=", "element", ".", "style", ";", "this", "[", "key", "]", "=", "style", "[", "key", "]", "=", "value", ";", "// style is for #1873", "// Correction for the 1x1 size of the shap...
Don't bother - animation is too slow and filters introduce artifacts
[ "Don", "t", "bother", "-", "animation", "is", "too", "slow", "and", "filters", "introduce", "artifacts" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L56641-L56648
30,482
duniter/duniter-ui
public/libraries.js
function (x, y, w, h, options) { return SVGRenderer.prototype.symbols[ !defined(options) || !options.r ? 'square' : 'callout' ].call(0, x, y, w, h, options); }
javascript
function (x, y, w, h, options) { return SVGRenderer.prototype.symbols[ !defined(options) || !options.r ? 'square' : 'callout' ].call(0, x, y, w, h, options); }
[ "function", "(", "x", ",", "y", ",", "w", ",", "h", ",", "options", ")", "{", "return", "SVGRenderer", ".", "prototype", ".", "symbols", "[", "!", "defined", "(", "options", ")", "||", "!", "options", ".", "r", "?", "'square'", ":", "'callout'", "]...
Add rectangle symbol path which eases rotation and omits arcsize problems compared to the built-in VML roundrect shape. When borders are not rounded, use the simpler square path, else use the callout path without the arrow.
[ "Add", "rectangle", "symbol", "path", "which", "eases", "rotation", "and", "omits", "arcsize", "problems", "compared", "to", "the", "built", "-", "in", "VML", "roundrect", "shape", ".", "When", "borders", "are", "not", "rounded", "use", "the", "simpler", "sq...
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L57265-L57269
30,483
duniter/duniter-ui
public/libraries.js
function () { var axis = this.axis, value = this.value, categories = axis.categories, dateTimeLabelFormat = this.dateTimeLabelFormat, numericSymbols = defaultOptions.lang.numericSymbols, i = numericSymbols && numericSymbols.length, ...
javascript
function () { var axis = this.axis, value = this.value, categories = axis.categories, dateTimeLabelFormat = this.dateTimeLabelFormat, numericSymbols = defaultOptions.lang.numericSymbols, i = numericSymbols && numericSymbols.length, ...
[ "function", "(", ")", "{", "var", "axis", "=", "this", ".", "axis", ",", "value", "=", "this", ".", "value", ",", "categories", "=", "axis", ".", "categories", ",", "dateTimeLabelFormat", "=", "this", ".", "dateTimeLabelFormat", ",", "numericSymbols", "=",...
The default label formatter. The context is a special config object for the label.
[ "The", "default", "label", "formatter", ".", "The", "context", "is", "a", "special", "config", "object", "for", "the", "label", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L58429-L58474
30,484
duniter/duniter-ui
public/libraries.js
function (val, backwards, cvsCoord, old, handleLog, pointPlacement) { var axis = this, sign = 1, cvsOffset = 0, localA = old ? axis.oldTransA : axis.transA, localMin = old ? axis.oldMin : axis.min, returnValue, minPixelPaddi...
javascript
function (val, backwards, cvsCoord, old, handleLog, pointPlacement) { var axis = this, sign = 1, cvsOffset = 0, localA = old ? axis.oldTransA : axis.transA, localMin = old ? axis.oldMin : axis.min, returnValue, minPixelPaddi...
[ "function", "(", "val", ",", "backwards", ",", "cvsCoord", ",", "old", ",", "handleLog", ",", "pointPlacement", ")", "{", "var", "axis", "=", "this", ",", "sign", "=", "1", ",", "cvsOffset", "=", "0", ",", "localA", "=", "old", "?", "axis", ".", "o...
Translate from axis value to pixel position on the chart, or back
[ "Translate", "from", "axis", "value", "to", "pixel", "position", "on", "the", "chart", "or", "back" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L58553-L58603
30,485
duniter/duniter-ui
public/libraries.js
function (value, lineWidth, old, force, translatedValue) { var axis = this, chart = axis.chart, axisLeft = axis.left, axisTop = axis.top, x1, y1, x2, y2, cHeight = (old && chart.oldChartHeight) ||...
javascript
function (value, lineWidth, old, force, translatedValue) { var axis = this, chart = axis.chart, axisLeft = axis.left, axisTop = axis.top, x1, y1, x2, y2, cHeight = (old && chart.oldChartHeight) ||...
[ "function", "(", "value", ",", "lineWidth", ",", "old", ",", "force", ",", "translatedValue", ")", "{", "var", "axis", "=", "this", ",", "chart", "=", "axis", ".", "chart", ",", "axisLeft", "=", "axis", ".", "left", ",", "axisTop", "=", "axis", ".", ...
Create the path for a plot line that goes from the given value on this axis, across the plot to the opposite side @param {Number} value @param {Number} lineWidth Used for calculation crisp line @param {Number] old Use old coordinates (for resizing and rescaling)
[ "Create", "the", "path", "for", "a", "plot", "line", "that", "goes", "from", "the", "given", "value", "on", "this", "axis", "across", "the", "plot", "to", "the", "opposite", "side" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L58632-L58670
30,486
duniter/duniter-ui
public/libraries.js
function () { var chart = this.chart, maxTicks = chart.maxTicks || {}, tickPositions = this.tickPositions, key = this._maxTicksKey = [this.coll, this.pos, this.len].join('-'); if (!this.isLinked && !this.isDatetimeAxis && tickPositions && tickPositions...
javascript
function () { var chart = this.chart, maxTicks = chart.maxTicks || {}, tickPositions = this.tickPositions, key = this._maxTicksKey = [this.coll, this.pos, this.len].join('-'); if (!this.isLinked && !this.isDatetimeAxis && tickPositions && tickPositions...
[ "function", "(", ")", "{", "var", "chart", "=", "this", ".", "chart", ",", "maxTicks", "=", "chart", ".", "maxTicks", "||", "{", "}", ",", "tickPositions", "=", "this", ".", "tickPositions", ",", "key", "=", "this", ".", "_maxTicksKey", "=", "[", "th...
Set the max ticks of either the x and y axis collection
[ "Set", "the", "max", "ticks", "of", "either", "the", "x", "and", "y", "axis", "collection" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L59136-L59147
30,487
duniter/duniter-ui
public/libraries.js
function (e, point) { if (!this.crosshair) { return; }// Do not draw crosshairs if you don't have too. if ((defined(point) || !pick(this.crosshair.snap, true)) === false) { this.hideCrosshair(); return; } var path, options =...
javascript
function (e, point) { if (!this.crosshair) { return; }// Do not draw crosshairs if you don't have too. if ((defined(point) || !pick(this.crosshair.snap, true)) === false) { this.hideCrosshair(); return; } var path, options =...
[ "function", "(", "e", ",", "point", ")", "{", "if", "(", "!", "this", ".", "crosshair", ")", "{", "return", ";", "}", "// Do not draw crosshairs if you don't have too.", "if", "(", "(", "defined", "(", "point", ")", "||", "!", "pick", "(", "this", ".", ...
Draw the crosshair
[ "Draw", "the", "crosshair" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L59956-L60004
30,488
duniter/duniter-ui
public/libraries.js
function (tooltip) { var items = this.points || splat(this), series = items[0].series, s; // build the header s = [tooltip.tooltipHeaderFormatter(items[0])]; // build the values each(items, function (item) { series...
javascript
function (tooltip) { var items = this.points || splat(this), series = items[0].series, s; // build the header s = [tooltip.tooltipHeaderFormatter(items[0])]; // build the values each(items, function (item) { series...
[ "function", "(", "tooltip", ")", "{", "var", "items", "=", "this", ".", "points", "||", "splat", "(", "this", ")", ",", "series", "=", "items", "[", "0", "]", ".", "series", ",", "s", ";", "// build the header", "s", "=", "[", "tooltip", ".", "tool...
In case no user defined formatter is given, this will be used. Note that the context here is an object holding point, series, x, y etc.
[ "In", "case", "no", "user", "defined", "formatter", "is", "given", "this", "will", "be", "used", ".", "Note", "that", "the", "context", "here", "is", "an", "object", "holding", "point", "series", "x", "y", "etc", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L60603-L60622
30,489
duniter/duniter-ui
public/libraries.js
function (e) { var chart = this.chart, hasPinched = this.hasPinched; if (this.selectionMarker) { var selectionData = { xAxis: [], yAxis: [], originalEvent: e.originalEvent || e }, ...
javascript
function (e) { var chart = this.chart, hasPinched = this.hasPinched; if (this.selectionMarker) { var selectionData = { xAxis: [], yAxis: [], originalEvent: e.originalEvent || e }, ...
[ "function", "(", "e", ")", "{", "var", "chart", "=", "this", ".", "chart", ",", "hasPinched", "=", "this", ".", "hasPinched", ";", "if", "(", "this", ".", "selectionMarker", ")", "{", "var", "selectionData", "=", "{", "xAxis", ":", "[", "]", ",", "...
On mouse up or touch end across the entire document, drop the selection.
[ "On", "mouse", "up", "or", "touch", "end", "across", "the", "entire", "document", "drop", "the", "selection", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L61198-L61258
30,490
duniter/duniter-ui
public/libraries.js
function () { var chart = charts[hoverChartIndex]; if (chart) { chart.pointer.reset(); chart.pointer.chartPosition = null; // also reset the chart position, used in #149 fix } }
javascript
function () { var chart = charts[hoverChartIndex]; if (chart) { chart.pointer.reset(); chart.pointer.chartPosition = null; // also reset the chart position, used in #149 fix } }
[ "function", "(", ")", "{", "var", "chart", "=", "charts", "[", "hoverChartIndex", "]", ";", "if", "(", "chart", ")", "{", "chart", ".", "pointer", ".", "reset", "(", ")", ";", "chart", ".", "pointer", ".", "chartPosition", "=", "null", ";", "// also ...
When mouse leaves the container, hide the tooltip.
[ "When", "mouse", "leaves", "the", "container", "hide", "the", "tooltip", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L61301-L61307
30,491
duniter/duniter-ui
public/libraries.js
function (pinchDown, touches, transform, selectionMarker, clip, lastValidTouch) { if (this.zoomHor || this.pinchHor) { this.pinchTranslateDirection(true, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch); } if (this.zoomVert || this.pinchVert) { ...
javascript
function (pinchDown, touches, transform, selectionMarker, clip, lastValidTouch) { if (this.zoomHor || this.pinchHor) { this.pinchTranslateDirection(true, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch); } if (this.zoomVert || this.pinchVert) { ...
[ "function", "(", "pinchDown", ",", "touches", ",", "transform", ",", "selectionMarker", ",", "clip", ",", "lastValidTouch", ")", "{", "if", "(", "this", ".", "zoomHor", "||", "this", ".", "pinchHor", ")", "{", "this", ".", "pinchTranslateDirection", "(", "...
Run translation operations
[ "Run", "translation", "operations" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L61464-L61471
30,492
duniter/duniter-ui
public/libraries.js
function (fn) { fn(this.chart.container, hasPointerEvent ? 'pointerdown' : 'MSPointerDown', this.onContainerPointerDown); fn(this.chart.container, hasPointerEvent ? 'pointermove' : 'MSPointerMove', this.onContainerPointerMove); fn(doc, hasPointerEvent ? 'pointerup' : 'MSP...
javascript
function (fn) { fn(this.chart.container, hasPointerEvent ? 'pointerdown' : 'MSPointerDown', this.onContainerPointerDown); fn(this.chart.container, hasPointerEvent ? 'pointermove' : 'MSPointerMove', this.onContainerPointerMove); fn(doc, hasPointerEvent ? 'pointerup' : 'MSP...
[ "function", "(", "fn", ")", "{", "fn", "(", "this", ".", "chart", ".", "container", ",", "hasPointerEvent", "?", "'pointerdown'", ":", "'MSPointerDown'", ",", "this", ".", "onContainerPointerDown", ")", ";", "fn", "(", "this", ".", "chart", ".", "container...
Add or remove the MS Pointer specific events
[ "Add", "or", "remove", "the", "MS", "Pointer", "specific", "events" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L61732-L61736
30,493
duniter/duniter-ui
public/libraries.js
function (scrollOffset) { var alignAttr = this.group.alignAttr, translateY, clipHeight = this.clipHeight || this.legendHeight; if (alignAttr) { translateY = alignAttr.translateY; each(this.allItems, function (item) { ...
javascript
function (scrollOffset) { var alignAttr = this.group.alignAttr, translateY, clipHeight = this.clipHeight || this.legendHeight; if (alignAttr) { translateY = alignAttr.translateY; each(this.allItems, function (item) { ...
[ "function", "(", "scrollOffset", ")", "{", "var", "alignAttr", "=", "this", ".", "group", ".", "alignAttr", ",", "translateY", ",", "clipHeight", "=", "this", ".", "clipHeight", "||", "this", ".", "legendHeight", ";", "if", "(", "alignAttr", ")", "{", "t...
Position the checkboxes after the width is determined
[ "Position", "the", "checkboxes", "after", "the", "width", "is", "determined" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L61922-L61943
30,494
duniter/duniter-ui
public/libraries.js
function () { var allItems = []; each(this.chart.series, function (series) { var seriesOptions = series.options; // Handle showInLegend. If the series is linked to another series, defaults to false. if (!pick(seriesOptions.showInLegend, !defined(s...
javascript
function () { var allItems = []; each(this.chart.series, function (series) { var seriesOptions = series.options; // Handle showInLegend. If the series is linked to another series, defaults to false. if (!pick(seriesOptions.showInLegend, !defined(s...
[ "function", "(", ")", "{", "var", "allItems", "=", "[", "]", ";", "each", "(", "this", ".", "chart", ".", "series", ",", "function", "(", "series", ")", "{", "var", "seriesOptions", "=", "series", ".", "options", ";", "// Handle showInLegend. If the series...
Get all items, which is one item per series for normal series and one item per point for pie series.
[ "Get", "all", "items", "which", "is", "one", "item", "per", "series", "for", "normal", "series", "and", "one", "item", "per", "point", "for", "pie", "series", "." ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L62096-L62115
30,495
duniter/duniter-ui
public/libraries.js
function (scrollBy, animation) { var pages = this.pages, pageCount = pages.length, currentPage = this.currentPage + scrollBy, clipHeight = this.clipHeight, navOptions = this.options.navigation, activeColor = navOptions.activeColor, ...
javascript
function (scrollBy, animation) { var pages = this.pages, pageCount = pages.length, currentPage = this.currentPage + scrollBy, clipHeight = this.clipHeight, navOptions = this.options.navigation, activeColor = navOptions.activeColor, ...
[ "function", "(", "scrollBy", ",", "animation", ")", "{", "var", "pages", "=", "this", ".", "pages", ",", "pageCount", "=", "pages", ".", "length", ",", "currentPage", "=", "this", ".", "currentPage", "+", "scrollBy", ",", "clipHeight", "=", "this", ".", ...
Scroll the legend by a number of pages @param {Object} scrollBy @param {Object} animation
[ "Scroll", "the", "legend", "by", "a", "number", "of", "pages" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L62358-L62413
30,496
duniter/duniter-ui
public/libraries.js
function (titleOptions, subtitleOptions, redraw) { var chart = this, options = chart.options, chartTitleOptions, chartSubtitleOptions; chartTitleOptions = options.title = merge(options.title, titleOptions); chartSubtitleOptions = options.sub...
javascript
function (titleOptions, subtitleOptions, redraw) { var chart = this, options = chart.options, chartTitleOptions, chartSubtitleOptions; chartTitleOptions = options.title = merge(options.title, titleOptions); chartSubtitleOptions = options.sub...
[ "function", "(", "titleOptions", ",", "subtitleOptions", ",", "redraw", ")", "{", "var", "chart", "=", "this", ",", "options", "=", "chart", ".", "options", ",", "chartTitleOptions", ",", "chartSubtitleOptions", ";", "chartTitleOptions", "=", "options", ".", "...
Show the title and subtitle of the chart @param titleOptions {Object} New title options @param subtitleOptions {Object} New subtitle options
[ "Show", "the", "title", "and", "subtitle", "of", "the", "chart" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L62951-L62991
30,497
duniter/duniter-ui
public/libraries.js
function (width, height, animation) { var chart = this, chartWidth, chartHeight, fireEndResize; // Handle the isResizing counter chart.isResizing += 1; fireEndResize = function () { if (chart) { ...
javascript
function (width, height, animation) { var chart = this, chartWidth, chartHeight, fireEndResize; // Handle the isResizing counter chart.isResizing += 1; fireEndResize = function () { if (chart) { ...
[ "function", "(", "width", ",", "height", ",", "animation", ")", "{", "var", "chart", "=", "this", ",", "chartWidth", ",", "chartHeight", ",", "fireEndResize", ";", "// Handle the isResizing counter", "chart", ".", "isResizing", "+=", "1", ";", "fireEndResize", ...
Resize the chart to a given width and height @param {Number} width @param {Number} height @param {Object|Boolean} animation
[ "Resize", "the", "chart", "to", "a", "given", "width", "and", "height" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L63343-L63412
30,498
duniter/duniter-ui
public/libraries.js
function () { each(this.series, function (serie) { serie.translate(); if (serie.setTooltipPoints) { serie.setTooltipPoints(); } serie.render(); }); }
javascript
function () { each(this.series, function (serie) { serie.translate(); if (serie.setTooltipPoints) { serie.setTooltipPoints(); } serie.render(); }); }
[ "function", "(", ")", "{", "each", "(", "this", ".", "series", ",", "function", "(", "serie", ")", "{", "serie", ".", "translate", "(", ")", ";", "if", "(", "serie", ".", "setTooltipPoints", ")", "{", "serie", ".", "setTooltipPoints", "(", ")", ";", ...
Render series for the chart
[ "Render", "series", "for", "the", "chart" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L63677-L63685
30,499
duniter/duniter-ui
public/libraries.js
function (credits) { if (credits.enabled && !this.credits) { this.credits = this.renderer.text( credits.text, 0, 0 ) .on('click', function () { if (credits.href) { ...
javascript
function (credits) { if (credits.enabled && !this.credits) { this.credits = this.renderer.text( credits.text, 0, 0 ) .on('click', function () { if (credits.href) { ...
[ "function", "(", "credits", ")", "{", "if", "(", "credits", ".", "enabled", "&&", "!", "this", ".", "credits", ")", "{", "this", ".", "credits", "=", "this", ".", "renderer", ".", "text", "(", "credits", ".", "text", ",", "0", ",", "0", ")", ".",...
Show chart credits based on config options
[ "Show", "chart", "credits", "based", "on", "config", "options" ]
de5c73aa4fe9add95711f3efba2f883645f315d1
https://github.com/duniter/duniter-ui/blob/de5c73aa4fe9add95711f3efba2f883645f315d1/public/libraries.js#L63784-L63804