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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
13,400 | jriecken/sat-js | examples/examples.js | function () {
if (this.data instanceof SAT.Circle) {
this.displayAttrs.cx = this.data.pos.x;
this.displayAttrs.cy = this.data.pos.y;
this.displayAttrs.r = this.data.r;
} else {
this.displayAttrs.path = poly2path(this.data);
}
this.display.attr(this.displayAttrs);
} | javascript | function () {
if (this.data instanceof SAT.Circle) {
this.displayAttrs.cx = this.data.pos.x;
this.displayAttrs.cy = this.data.pos.y;
this.displayAttrs.r = this.data.r;
} else {
this.displayAttrs.path = poly2path(this.data);
}
this.display.attr(this.displayAttrs);
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"data",
"instanceof",
"SAT",
".",
"Circle",
")",
"{",
"this",
".",
"displayAttrs",
".",
"cx",
"=",
"this",
".",
"data",
".",
"pos",
".",
"x",
";",
"this",
".",
"displayAttrs",
".",
"cy",
"=",
"th... | Call this to update the display after changing the underlying data. | [
"Call",
"this",
"to",
"update",
"the",
"display",
"after",
"changing",
"the",
"underlying",
"data",
"."
] | 4e06e0a81ae38d6630469d94beb1a46d7b5f74bb | https://github.com/jriecken/sat-js/blob/4e06e0a81ae38d6630469d94beb1a46d7b5f74bb/examples/examples.js#L73-L82 | |
13,401 | poppinss/indicative | src/core/starToIndex.js | starToIndex | function starToIndex (pairs, data, i, out) {
if (!data) {
return []
}
i = i || 0
let curr = pairs[i++]
const next = pairs[i]
/**
* When out is not defined, then start
* with the current node
*/
if (!out) {
out = [curr]
curr = ''
}
/**
* Keep on adding to the out array. The ... | javascript | function starToIndex (pairs, data, i, out) {
if (!data) {
return []
}
i = i || 0
let curr = pairs[i++]
const next = pairs[i]
/**
* When out is not defined, then start
* with the current node
*/
if (!out) {
out = [curr]
curr = ''
}
/**
* Keep on adding to the out array. The ... | [
"function",
"starToIndex",
"(",
"pairs",
",",
"data",
",",
"i",
",",
"out",
")",
"{",
"if",
"(",
"!",
"data",
")",
"{",
"return",
"[",
"]",
"}",
"i",
"=",
"i",
"||",
"0",
"let",
"curr",
"=",
"pairs",
"[",
"i",
"++",
"]",
"const",
"next",
"=",... | This method loops over an array and build properties based upon
values available inside the data object.
This method is supposed to never throw any exceptions, and instead
skip a property when data or pairs are not in right format.
@method starToIndex
@param {Array} pairs
@param {Object} data
@param {Number} i
@par... | [
"This",
"method",
"loops",
"over",
"an",
"array",
"and",
"build",
"properties",
"based",
"upon",
"values",
"available",
"inside",
"the",
"data",
"object",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/starToIndex.js#L35-L84 |
13,402 | poppinss/indicative | src/core/pSeries.js | onRejected | function onRejected (error) {
return {
fullFilled: false,
rejected: true,
value: null,
reason: error
}
} | javascript | function onRejected (error) {
return {
fullFilled: false,
rejected: true,
value: null,
reason: error
}
} | [
"function",
"onRejected",
"(",
"error",
")",
"{",
"return",
"{",
"fullFilled",
":",
"false",
",",
"rejected",
":",
"true",
",",
"value",
":",
"null",
",",
"reason",
":",
"error",
"}",
"}"
] | Returns an object containing enough info whether
the promises was rejected or not.
@method onRejected
@param {Object} error
@returns {Object} | [
"Returns",
"an",
"object",
"containing",
"enough",
"info",
"whether",
"the",
"promises",
"was",
"rejected",
"or",
"not",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/pSeries.js#L41-L48 |
13,403 | poppinss/indicative | src/core/pSeries.js | pSeries | function pSeries (iterable, bail) {
const result = []
const iterableLength = iterable.length
function noop (index, bail) {
/**
* End of promises
*/
if (index >= iterableLength) {
return Promise.resolve(result)
}
return iterable[index]
.then((output) => {
result.push... | javascript | function pSeries (iterable, bail) {
const result = []
const iterableLength = iterable.length
function noop (index, bail) {
/**
* End of promises
*/
if (index >= iterableLength) {
return Promise.resolve(result)
}
return iterable[index]
.then((output) => {
result.push... | [
"function",
"pSeries",
"(",
"iterable",
",",
"bail",
")",
"{",
"const",
"result",
"=",
"[",
"]",
"const",
"iterableLength",
"=",
"iterable",
".",
"length",
"function",
"noop",
"(",
"index",
",",
"bail",
")",
"{",
"/**\n * End of promises\n */",
"if",
... | Here we run an array of promises in sequence until the last
promise is finished.
When `bail=true`, it will break the chain when first promise returns
the error/exception.
## Why serial?
Since the validations have to be executed one after the other, the
promises execution has to be in sequence
## Why wait for all pro... | [
"Here",
"we",
"run",
"an",
"array",
"of",
"promises",
"in",
"sequence",
"until",
"the",
"last",
"promise",
"is",
"finished",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/pSeries.js#L99-L136 |
13,404 | poppinss/indicative | bin/qunit.js | start | async function start () {
let exitCode = 0
const port = process.env.PORT || 3000
console.log(chalk`{magenta creating app bundle}`)
/**
* Creating rollup bundle by bundling `test/qunit/index.js` file.
*/
const bundle = await rollup.rollup({
input: path.join(__dirname, '../test', 'qunit', 'index'),
... | javascript | async function start () {
let exitCode = 0
const port = process.env.PORT || 3000
console.log(chalk`{magenta creating app bundle}`)
/**
* Creating rollup bundle by bundling `test/qunit/index.js` file.
*/
const bundle = await rollup.rollup({
input: path.join(__dirname, '../test', 'qunit', 'index'),
... | [
"async",
"function",
"start",
"(",
")",
"{",
"let",
"exitCode",
"=",
"0",
"const",
"port",
"=",
"process",
".",
"env",
".",
"PORT",
"||",
"3000",
"console",
".",
"log",
"(",
"chalk",
"`",
"`",
")",
"/**\n * Creating rollup bundle by bundling `test/qunit/inde... | Start of the process
@method start | [
"Start",
"of",
"the",
"process"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/qunit.js#L79-L165 |
13,405 | poppinss/indicative | src/core/configure.js | setConfig | function setConfig (options) {
Object.keys(options).forEach((option) => {
if (config[option] !== undefined) {
config[option] = options[option]
}
})
} | javascript | function setConfig (options) {
Object.keys(options).forEach((option) => {
if (config[option] !== undefined) {
config[option] = options[option]
}
})
} | [
"function",
"setConfig",
"(",
"options",
")",
"{",
"Object",
".",
"keys",
"(",
"options",
")",
".",
"forEach",
"(",
"(",
"option",
")",
"=>",
"{",
"if",
"(",
"config",
"[",
"option",
"]",
"!==",
"undefined",
")",
"{",
"config",
"[",
"option",
"]",
... | Override configuration values
@method setConfig
@param {Object} | [
"Override",
"configuration",
"values"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/configure.js#L21-L27 |
13,406 | poppinss/indicative | src/core/validator.js | validationFn | function validationFn (validations, {name, args}, field, data, messages, formatter) {
return new PLazy((resolve, reject) => {
const camelizedName = snakeToCamelCase(name)
const validation = validations[camelizedName]
if (typeof (validation) !== 'function') {
const error = new Error(`${camelizedName... | javascript | function validationFn (validations, {name, args}, field, data, messages, formatter) {
return new PLazy((resolve, reject) => {
const camelizedName = snakeToCamelCase(name)
const validation = validations[camelizedName]
if (typeof (validation) !== 'function') {
const error = new Error(`${camelizedName... | [
"function",
"validationFn",
"(",
"validations",
",",
"{",
"name",
",",
"args",
"}",
",",
"field",
",",
"data",
",",
"messages",
",",
"formatter",
")",
"{",
"return",
"new",
"PLazy",
"(",
"(",
"resolve",
",",
"reject",
")",
"=>",
"{",
"const",
"camelize... | Returns a lazy promise which runs the validation on a field
for a given rule. This method will register promise
rejections with the formatter.
@method validationFn
@param {Object} validations
@param {Object} rule
@property {String} rule.name
@property {Array} rule.args
@param {String} field
@param {Objec... | [
"Returns",
"a",
"lazy",
"promise",
"which",
"runs",
"the",
"validation",
"on",
"a",
"field",
"for",
"a",
"given",
"rule",
".",
"This",
"method",
"will",
"register",
"promise",
"rejections",
"with",
"the",
"formatter",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/validator.js#L38-L57 |
13,407 | poppinss/indicative | src/core/validator.js | getValidationsStack | function getValidationsStack (validations, fields, data, messages, formatter) {
return Object
.keys(fields)
.reduce((flatValidations, field) => {
fields[field].map((rule) => {
flatValidations.push(validationFn(validations, rule, field, data, messages, formatter))
})
return flatValida... | javascript | function getValidationsStack (validations, fields, data, messages, formatter) {
return Object
.keys(fields)
.reduce((flatValidations, field) => {
fields[field].map((rule) => {
flatValidations.push(validationFn(validations, rule, field, data, messages, formatter))
})
return flatValida... | [
"function",
"getValidationsStack",
"(",
"validations",
",",
"fields",
",",
"data",
",",
"messages",
",",
"formatter",
")",
"{",
"return",
"Object",
".",
"keys",
"(",
"fields",
")",
".",
"reduce",
"(",
"(",
"flatValidations",
",",
"field",
")",
"=>",
"{",
... | This method loops over the fields and returns a flat stack of
validations for each field and multiple rules on that field.
Also all validation methods are wrapped inside a Lazy promise,
so they are executed when `.then` or `.catch` is called on
them.
@method getValidationsStack
@param {Object} validations - Object... | [
"This",
"method",
"loops",
"over",
"the",
"fields",
"and",
"returns",
"a",
"flat",
"stack",
"of",
"validations",
"for",
"each",
"field",
"and",
"multiple",
"rules",
"on",
"that",
"field",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/validator.js#L77-L86 |
13,408 | poppinss/indicative | src/core/validator.js | validate | function validate (validations, bail, data, fields, messages, formatter) {
return new Promise((resolve, reject) => {
messages = messages || {}
/**
* This is expanded form of fields and rules
* applied on them
*/
const parsedFields = parse(fields, data)
/**
* A flat validations st... | javascript | function validate (validations, bail, data, fields, messages, formatter) {
return new Promise((resolve, reject) => {
messages = messages || {}
/**
* This is expanded form of fields and rules
* applied on them
*/
const parsedFields = parse(fields, data)
/**
* A flat validations st... | [
"function",
"validate",
"(",
"validations",
",",
"bail",
",",
"data",
",",
"fields",
",",
"messages",
",",
"formatter",
")",
"{",
"return",
"new",
"Promise",
"(",
"(",
"resolve",
",",
"reject",
")",
"=>",
"{",
"messages",
"=",
"messages",
"||",
"{",
"}... | Run `validations` on `data` using rules defined on `fields`.
@method validate
@param {Object} validations - Object of available validations
@param {Boolean} bail - Whether to bail on first error or not
@param {Object} data - Data to validate
@param {Object} fields - Fields and their rules
@p... | [
"Run",
"validations",
"on",
"data",
"using",
"rules",
"defined",
"on",
"fields",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/validator.js#L102-L126 |
13,409 | poppinss/indicative | src/core/sanitizor.js | sanitizeField | function sanitizeField (sanitizations, value, rules) {
let result = value
rules.forEach((rule) => {
const ruleFn = snakeToCamelCase(rule.name)
if (typeof (sanitizations[ruleFn]) !== 'function') {
throw new Error(`${ruleFn} is not a sanitization method`)
}
result = sanitizations[ruleFn](result... | javascript | function sanitizeField (sanitizations, value, rules) {
let result = value
rules.forEach((rule) => {
const ruleFn = snakeToCamelCase(rule.name)
if (typeof (sanitizations[ruleFn]) !== 'function') {
throw new Error(`${ruleFn} is not a sanitization method`)
}
result = sanitizations[ruleFn](result... | [
"function",
"sanitizeField",
"(",
"sanitizations",
",",
"value",
",",
"rules",
")",
"{",
"let",
"result",
"=",
"value",
"rules",
".",
"forEach",
"(",
"(",
"rule",
")",
"=>",
"{",
"const",
"ruleFn",
"=",
"snakeToCamelCase",
"(",
"rule",
".",
"name",
")",
... | Runs a bunch of sanitization rules on a given value
@method sanitizeField
@param {Object} sanitizations
@param {Mixed} value
@param {Array} rules
@return {Mixed}
@throws {Exception} If sanitization rule doesnt exists | [
"Runs",
"a",
"bunch",
"of",
"sanitization",
"rules",
"on",
"a",
"given",
"value"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/sanitizor.js#L93-L105 |
13,410 | poppinss/indicative | bin/inlineDocs.js | getFiles | function getFiles (location, filterFn) {
return new Promise((resolve, reject) => {
const files = []
klaw(location)
.on('data', (item) => {
if (!item.stats.isDirectory() && filterFn(item)) {
files.push(item.path)
}
})
.on('end', () => resolve(files))
.on('error', reject)
}... | javascript | function getFiles (location, filterFn) {
return new Promise((resolve, reject) => {
const files = []
klaw(location)
.on('data', (item) => {
if (!item.stats.isDirectory() && filterFn(item)) {
files.push(item.path)
}
})
.on('end', () => resolve(files))
.on('error', reject)
}... | [
"function",
"getFiles",
"(",
"location",
",",
"filterFn",
")",
"{",
"return",
"new",
"Promise",
"(",
"(",
"resolve",
",",
"reject",
")",
"=>",
"{",
"const",
"files",
"=",
"[",
"]",
"klaw",
"(",
"location",
")",
".",
"on",
"(",
"'data'",
",",
"(",
"... | Walks over a location and reads all .js files
@method getFiles
@param {String} location
@param {Function} filterFn
@return {Array} | [
"Walks",
"over",
"a",
"location",
"and",
"reads",
"all",
".",
"js",
"files"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/inlineDocs.js#L50-L62 |
13,411 | poppinss/indicative | bin/inlineDocs.js | readFiles | async function readFiles (locations) {
return Promise.all(locations.map((location) => {
return fs.readFile(location, 'utf-8')
}))
} | javascript | async function readFiles (locations) {
return Promise.all(locations.map((location) => {
return fs.readFile(location, 'utf-8')
}))
} | [
"async",
"function",
"readFiles",
"(",
"locations",
")",
"{",
"return",
"Promise",
".",
"all",
"(",
"locations",
".",
"map",
"(",
"(",
"location",
")",
"=>",
"{",
"return",
"fs",
".",
"readFile",
"(",
"location",
",",
"'utf-8'",
")",
"}",
")",
")",
"... | Returns an array of files in parallel
@method readFiles
@param {Array} locations
@return {Array} | [
"Returns",
"an",
"array",
"of",
"files",
"in",
"parallel"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/inlineDocs.js#L73-L77 |
13,412 | poppinss/indicative | bin/inlineDocs.js | extractComments | function extractComments (contents) {
let context = 'idle'
const lines = []
contents.split('\n').forEach((line) => {
if (line.trim() === '/**') {
context = 'in'
return
}
if (line.trim() === '*/') {
context = 'out'
return
}
if (context === 'in') {
lines.push(line... | javascript | function extractComments (contents) {
let context = 'idle'
const lines = []
contents.split('\n').forEach((line) => {
if (line.trim() === '/**') {
context = 'in'
return
}
if (line.trim() === '*/') {
context = 'out'
return
}
if (context === 'in') {
lines.push(line... | [
"function",
"extractComments",
"(",
"contents",
")",
"{",
"let",
"context",
"=",
"'idle'",
"const",
"lines",
"=",
"[",
"]",
"contents",
".",
"split",
"(",
"'\\n'",
")",
".",
"forEach",
"(",
"(",
"line",
")",
"=>",
"{",
"if",
"(",
"line",
".",
"trim",... | Extract comments from the top of the file. Also this method
assumes, each block of content has only one top of comments
section.
@method extractComments
@param {String} contents
@return {String} | [
"Extract",
"comments",
"from",
"the",
"top",
"of",
"the",
"file",
".",
"Also",
"this",
"method",
"assumes",
"each",
"block",
"of",
"content",
"has",
"only",
"one",
"top",
"of",
"comments",
"section",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/inlineDocs.js#L90-L109 |
13,413 | poppinss/indicative | bin/inlineDocs.js | writeDocs | async function writeDocs (basePath, nodes) {
Promise.all(nodes.map((node) => {
const location = path.join(basePath, node.location.replace(srcPath, '').replace(/\.js$/, '.adoc'))
return fs.outputFile(location, node.comments)
}))
} | javascript | async function writeDocs (basePath, nodes) {
Promise.all(nodes.map((node) => {
const location = path.join(basePath, node.location.replace(srcPath, '').replace(/\.js$/, '.adoc'))
return fs.outputFile(location, node.comments)
}))
} | [
"async",
"function",
"writeDocs",
"(",
"basePath",
",",
"nodes",
")",
"{",
"Promise",
".",
"all",
"(",
"nodes",
".",
"map",
"(",
"(",
"node",
")",
"=>",
"{",
"const",
"location",
"=",
"path",
".",
"join",
"(",
"basePath",
",",
"node",
".",
"location"... | Writes all docs to their respective files
@method writeDocs
@param {String} basePath
@param {Array} nodes
@return {void} | [
"Writes",
"all",
"docs",
"to",
"their",
"respective",
"files"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/inlineDocs.js#L121-L126 |
13,414 | poppinss/indicative | bin/inlineDocs.js | srcToDocs | async function srcToDocs (dir) {
const location = path.join(srcPath, dir)
const srcFiles = await getFiles(location, (item) => item.path.endsWith('.js') && !item.path.endsWith('index.js'))
const filesContents = await readFiles(srcFiles)
const filesComments = srcFiles.map((location, index) => {
const fnName =... | javascript | async function srcToDocs (dir) {
const location = path.join(srcPath, dir)
const srcFiles = await getFiles(location, (item) => item.path.endsWith('.js') && !item.path.endsWith('index.js'))
const filesContents = await readFiles(srcFiles)
const filesComments = srcFiles.map((location, index) => {
const fnName =... | [
"async",
"function",
"srcToDocs",
"(",
"dir",
")",
"{",
"const",
"location",
"=",
"path",
".",
"join",
"(",
"srcPath",
",",
"dir",
")",
"const",
"srcFiles",
"=",
"await",
"getFiles",
"(",
"location",
",",
"(",
"item",
")",
"=>",
"item",
".",
"path",
... | Converts all source files inside a directory to `.adoc`
files inside docs directory
@method srcToDocs
@param {String} dir
@return {void} | [
"Converts",
"all",
"source",
"files",
"inside",
"a",
"directory",
"to",
".",
"adoc",
"files",
"inside",
"docs",
"directory"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/inlineDocs.js#L138-L149 |
13,415 | poppinss/indicative | src/core/parse.js | parseRules | function parseRules (fields, data) {
data = data || {}
return Object.keys(fields).reduce((result, field) => {
let rules = fields[field]
/**
* Strings are passed to haye for further processing
* and if rules are not an array or a string, then
* we should blow.
*/
if (typeof (rules) ... | javascript | function parseRules (fields, data) {
data = data || {}
return Object.keys(fields).reduce((result, field) => {
let rules = fields[field]
/**
* Strings are passed to haye for further processing
* and if rules are not an array or a string, then
* we should blow.
*/
if (typeof (rules) ... | [
"function",
"parseRules",
"(",
"fields",
",",
"data",
")",
"{",
"data",
"=",
"data",
"||",
"{",
"}",
"return",
"Object",
".",
"keys",
"(",
"fields",
")",
".",
"reduce",
"(",
"(",
"result",
",",
"field",
")",
"=>",
"{",
"let",
"rules",
"=",
"fields"... | This method parses the rules object into a new object with
expanded field names and transformed rules.
### Expanding fields
One can define `*` expression to denote an array of fields
to be validated.
The `*` expression is expanded based upon the available data.
For example
```js
const rules = {
'users.*.username': r... | [
"This",
"method",
"parses",
"the",
"rules",
"object",
"into",
"a",
"new",
"object",
"with",
"expanded",
"field",
"names",
"and",
"transformed",
"rules",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/parse.js#L59-L90 |
13,416 | poppinss/indicative | bin/sauceLabs.js | function (route, body, method = 'post') {
return got(`https://saucelabs.com/rest/v1/${process.env.SAUCE_USERNAME}/${route}`, {
method,
json: true,
body,
headers: {
Authorization: `Basic ${getCredentials()}`
}
}).then((response) => {
return response.body
}).catch((error) => {
thro... | javascript | function (route, body, method = 'post') {
return got(`https://saucelabs.com/rest/v1/${process.env.SAUCE_USERNAME}/${route}`, {
method,
json: true,
body,
headers: {
Authorization: `Basic ${getCredentials()}`
}
}).then((response) => {
return response.body
}).catch((error) => {
thro... | [
"function",
"(",
"route",
",",
"body",
",",
"method",
"=",
"'post'",
")",
"{",
"return",
"got",
"(",
"`",
"${",
"process",
".",
"env",
".",
"SAUCE_USERNAME",
"}",
"${",
"route",
"}",
"`",
",",
"{",
"method",
",",
"json",
":",
"true",
",",
"body",
... | Makes an http request to sauceLabs
@method makeHttpRequest
@param {String} route
@param {Object} body
@param {String} [method = 'post']
@return {Promise} | [
"Makes",
"an",
"http",
"request",
"to",
"sauceLabs"
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/bin/sauceLabs.js#L37-L50 | |
13,417 | poppinss/indicative | src/core/getMessage.js | getMessage | function getMessage (messages, field, validation, args) {
/**
* Since we allow array expression as `*`, we want all index of the
* current field to be replaced with `.*`, so that we get the
* right message.
*/
const originalField = field.replace(/\.\d/g, '.*')
const camelizedValidation = snakeToCamelC... | javascript | function getMessage (messages, field, validation, args) {
/**
* Since we allow array expression as `*`, we want all index of the
* current field to be replaced with `.*`, so that we get the
* right message.
*/
const originalField = field.replace(/\.\d/g, '.*')
const camelizedValidation = snakeToCamelC... | [
"function",
"getMessage",
"(",
"messages",
",",
"field",
",",
"validation",
",",
"args",
")",
"{",
"/**\n * Since we allow array expression as `*`, we want all index of the\n * current field to be replaced with `.*`, so that we get the\n * right message.\n */",
"const",
"original... | Returns message for a given field and a validation rule. The priority is
defined as follows in order from top to bottom.
1. Message for `field.validation`
2. Message for validation
3. Default message
### Templating
Support dynamic placeholders in messages as shown below.
```
{{ validation }} validation failed on {{ ... | [
"Returns",
"message",
"for",
"a",
"given",
"field",
"and",
"a",
"validation",
"rule",
".",
"The",
"priority",
"is",
"defined",
"as",
"follows",
"in",
"order",
"from",
"top",
"to",
"bottom",
"."
] | bb3e149ced03e8e0c51e5169e1e2a7282b956d9a | https://github.com/poppinss/indicative/blob/bb3e149ced03e8e0c51e5169e1e2a7282b956d9a/src/core/getMessage.js#L52-L70 |
13,418 | brehaut/color-js | color.js | function(bytes) {
bytes = bytes || 2;
var max = Math.pow(16, bytes) - 1;
var css = [
"#",
pad(Math.round(this.red * max).toString(16).toUpperCase(), bytes),
pad(Math.round(this.green * max).toString(16).toUpperCase(), bytes),
... | javascript | function(bytes) {
bytes = bytes || 2;
var max = Math.pow(16, bytes) - 1;
var css = [
"#",
pad(Math.round(this.red * max).toString(16).toUpperCase(), bytes),
pad(Math.round(this.green * max).toString(16).toUpperCase(), bytes),
... | [
"function",
"(",
"bytes",
")",
"{",
"bytes",
"=",
"bytes",
"||",
"2",
";",
"var",
"max",
"=",
"Math",
".",
"pow",
"(",
"16",
",",
"bytes",
")",
"-",
"1",
";",
"var",
"css",
"=",
"[",
"\"#\"",
",",
"pad",
"(",
"Math",
".",
"round",
"(",
"this"... | convert to a CSS string. defaults to two bytes a value | [
"convert",
"to",
"a",
"CSS",
"string",
".",
"defaults",
"to",
"two",
"bytes",
"a",
"value"
] | 23fc53428d972efb9f1f365781d8ba0407ae7213 | https://github.com/brehaut/color-js/blob/23fc53428d972efb9f1f365781d8ba0407ae7213/color.js#L412-L424 | |
13,419 | chevex-archived/mongoose-auto-increment | index.js | function (callback) {
IdentityCounter.findOneAndUpdate(
{ model: settings.model, field: settings.field },
{ count: settings.startAt - settings.incrementBy },
{ new: true }, // new: true specifies that the callback should get the updated counter.
function (err) {
if (err) return callb... | javascript | function (callback) {
IdentityCounter.findOneAndUpdate(
{ model: settings.model, field: settings.field },
{ count: settings.startAt - settings.incrementBy },
{ new: true }, // new: true specifies that the callback should get the updated counter.
function (err) {
if (err) return callb... | [
"function",
"(",
"callback",
")",
"{",
"IdentityCounter",
".",
"findOneAndUpdate",
"(",
"{",
"model",
":",
"settings",
".",
"model",
",",
"field",
":",
"settings",
".",
"field",
"}",
",",
"{",
"count",
":",
"settings",
".",
"startAt",
"-",
"settings",
".... | Declare a function to reset counter at the start value - increment value. | [
"Declare",
"a",
"function",
"to",
"reset",
"counter",
"at",
"the",
"start",
"value",
"-",
"increment",
"value",
"."
] | 50bd2a642c7565cf0a9f2c368d437b83160ad0a6 | https://github.com/chevex-archived/mongoose-auto-increment/blob/50bd2a642c7565cf0a9f2c368d437b83160ad0a6/index.js#L104-L114 | |
13,420 | chevex-archived/mongoose-auto-increment | index.js | function (err, updatedIdentityCounter) {
if (err) return next(err);
// If there are no errors then go ahead and set the document's field to the current count.
doc[settings.field] = updatedIdentityCounter.count;
// Continue with default document save functi... | javascript | function (err, updatedIdentityCounter) {
if (err) return next(err);
// If there are no errors then go ahead and set the document's field to the current count.
doc[settings.field] = updatedIdentityCounter.count;
// Continue with default document save functi... | [
"function",
"(",
"err",
",",
"updatedIdentityCounter",
")",
"{",
"if",
"(",
"err",
")",
"return",
"next",
"(",
"err",
")",
";",
"// If there are no errors then go ahead and set the document's field to the current count.",
"doc",
"[",
"settings",
".",
"field",
"]",
"="... | Receive the updated counter. | [
"Receive",
"the",
"updated",
"counter",
"."
] | 50bd2a642c7565cf0a9f2c368d437b83160ad0a6 | https://github.com/chevex-archived/mongoose-auto-increment/blob/50bd2a642c7565cf0a9f2c368d437b83160ad0a6/index.js#L157-L163 | |
13,421 | StephanWagner/jBox | dist/jBox.all.js | addUnscrollClassName | function addUnscrollClassName() {
if (document.getElementById('unscroll-class-name')) {
return;
}
var css = '.unscrollable { overflow-y: hidden !important; }',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
... | javascript | function addUnscrollClassName() {
if (document.getElementById('unscroll-class-name')) {
return;
}
var css = '.unscrollable { overflow-y: hidden !important; }',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
... | [
"function",
"addUnscrollClassName",
"(",
")",
"{",
"if",
"(",
"document",
".",
"getElementById",
"(",
"'unscroll-class-name'",
")",
")",
"{",
"return",
";",
"}",
"var",
"css",
"=",
"'.unscrollable { overflow-y: hidden !important; }'",
",",
"head",
"=",
"document",
... | Add unscroll class to head | [
"Add",
"unscroll",
"class",
"to",
"head"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L49-L60 |
13,422 | StephanWagner/jBox | dist/jBox.all.js | function (el)
{
// Extract the href or the onclick event if no submit event is passed
if (!this.options.confirm) {
var submit = el.attr('onclick') ? el.attr('onclick') : (el.attr('href') ? (el.attr('target') ? 'window.open("' + el.attr('href') + '", "' + el.attr('target') + '");' : 'window.loca... | javascript | function (el)
{
// Extract the href or the onclick event if no submit event is passed
if (!this.options.confirm) {
var submit = el.attr('onclick') ? el.attr('onclick') : (el.attr('href') ? (el.attr('target') ? 'window.open("' + el.attr('href') + '", "' + el.attr('target') + '");' : 'window.loca... | [
"function",
"(",
"el",
")",
"{",
"// Extract the href or the onclick event if no submit event is passed",
"if",
"(",
"!",
"this",
".",
"options",
".",
"confirm",
")",
"{",
"var",
"submit",
"=",
"el",
".",
"attr",
"(",
"'onclick'",
")",
"?",
"el",
".",
"attr",
... | Triggered when jBox is attached to the element | [
"Triggered",
"when",
"jBox",
"is",
"attached",
"to",
"the",
"element"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2222-L2229 | |
13,423 | StephanWagner/jBox | dist/jBox.all.js | function ()
{
// Set the new action for the submit button
this.submitButton.off('click.jBox-Confirm' + this.id).on('click.jBox-Confirm' + this.id, function () { this.options.confirm ? this.options.confirm() : eval(this.source.data('jBox-Confirm-submit')); this.options.closeOnConfirm && this.close(); }.b... | javascript | function ()
{
// Set the new action for the submit button
this.submitButton.off('click.jBox-Confirm' + this.id).on('click.jBox-Confirm' + this.id, function () { this.options.confirm ? this.options.confirm() : eval(this.source.data('jBox-Confirm-submit')); this.options.closeOnConfirm && this.close(); }.b... | [
"function",
"(",
")",
"{",
"// Set the new action for the submit button",
"this",
".",
"submitButton",
".",
"off",
"(",
"'click.jBox-Confirm'",
"+",
"this",
".",
"id",
")",
".",
"on",
"(",
"'click.jBox-Confirm'",
"+",
"this",
".",
"id",
",",
"function",
"(",
"... | Triggered when jBox is opened | [
"Triggered",
"when",
"jBox",
"is",
"opened"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2249-L2253 | |
13,424 | StephanWagner/jBox | dist/jBox.all.js | function ()
{
// Append image label containers
this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper);
this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery... | javascript | function ()
{
// Append image label containers
this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper);
this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery... | [
"function",
"(",
")",
"{",
"// Append image label containers",
"this",
".",
"imageLabel",
"=",
"jQuery",
"(",
"'<div/>'",
",",
"{",
"'class'",
":",
"'jBox-image-label-container'",
"}",
")",
".",
"appendTo",
"(",
"this",
".",
"wrapper",
")",
";",
"this",
".",
... | Triggered when jBox was created | [
"Triggered",
"when",
"jBox",
"was",
"created"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2507-L2539 | |
13,425 | StephanWagner/jBox | dist/jBox.all.js | function ()
{
// Add key events
jQuery(document).on('keyup.jBox-Image-' + this.id, function (ev) {
(ev.keyCode == 37) && this.showImage('prev');
(ev.keyCode == 39) && this.showImage('next');
}.bind(this));
// Load the image from the attached element
this.showImage('ope... | javascript | function ()
{
// Add key events
jQuery(document).on('keyup.jBox-Image-' + this.id, function (ev) {
(ev.keyCode == 37) && this.showImage('prev');
(ev.keyCode == 39) && this.showImage('next');
}.bind(this));
// Load the image from the attached element
this.showImage('ope... | [
"function",
"(",
")",
"{",
"// Add key events",
"jQuery",
"(",
"document",
")",
".",
"on",
"(",
"'keyup.jBox-Image-'",
"+",
"this",
".",
"id",
",",
"function",
"(",
"ev",
")",
"{",
"(",
"ev",
".",
"keyCode",
"==",
"37",
")",
"&&",
"this",
".",
"showI... | Triggered when jBox opens | [
"Triggered",
"when",
"jBox",
"opens"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2544-L2554 | |
13,426 | StephanWagner/jBox | dist/jBox.all.js | function ()
{
// Cache position values
this.defaultNoticePosition = jQuery.extend({}, this.options.position);
// Type Notice has its own adjust position function
this._adjustNoticePositon = function () {
var win = jQuery(window);
var windowDimensions = {
x: win.wid... | javascript | function ()
{
// Cache position values
this.defaultNoticePosition = jQuery.extend({}, this.options.position);
// Type Notice has its own adjust position function
this._adjustNoticePositon = function () {
var win = jQuery(window);
var windowDimensions = {
x: win.wid... | [
"function",
"(",
")",
"{",
"// Cache position values",
"this",
".",
"defaultNoticePosition",
"=",
"jQuery",
".",
"extend",
"(",
"{",
"}",
",",
"this",
".",
"options",
".",
"position",
")",
";",
"// Type Notice has its own adjust position function",
"this",
".",
"_... | Triggered when notice is initialized | [
"Triggered",
"when",
"notice",
"is",
"initialized"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2626-L2666 | |
13,427 | StephanWagner/jBox | dist/jBox.all.js | function ()
{
// Bail if we're stacking
if (this.options.stack) {
return;
}
// Adjust position when opening
this._adjustNoticePositon();
// Loop through notices at same window corner destroy them
jQuery.each(jQuery('.jBox-Notice'), function (index, el)
{
... | javascript | function ()
{
// Bail if we're stacking
if (this.options.stack) {
return;
}
// Adjust position when opening
this._adjustNoticePositon();
// Loop through notices at same window corner destroy them
jQuery.each(jQuery('.jBox-Notice'), function (index, el)
{
... | [
"function",
"(",
")",
"{",
"// Bail if we're stacking",
"if",
"(",
"this",
".",
"options",
".",
"stack",
")",
"{",
"return",
";",
"}",
"// Adjust position when opening",
"this",
".",
"_adjustNoticePositon",
"(",
")",
";",
"// Loop through notices at same window corner... | Triggered when notice opens | [
"Triggered",
"when",
"notice",
"opens"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2683-L2709 | |
13,428 | StephanWagner/jBox | dist/jBox.all.js | function ()
{
var stacks = {};
jQuery.each(jQuery('.jBox-Notice'), function (index, el)
{
el = jQuery(el);
var pos = el.data('jBox-Notice-position');
if (!stacks[pos]) {
stacks[pos] = [];
}
stacks[pos].push(el);
});
... | javascript | function ()
{
var stacks = {};
jQuery.each(jQuery('.jBox-Notice'), function (index, el)
{
el = jQuery(el);
var pos = el.data('jBox-Notice-position');
if (!stacks[pos]) {
stacks[pos] = [];
}
stacks[pos].push(el);
});
... | [
"function",
"(",
")",
"{",
"var",
"stacks",
"=",
"{",
"}",
";",
"jQuery",
".",
"each",
"(",
"jQuery",
"(",
"'.jBox-Notice'",
")",
",",
"function",
"(",
"index",
",",
"el",
")",
"{",
"el",
"=",
"jQuery",
"(",
"el",
")",
";",
"var",
"pos",
"=",
"... | Triggered when resizing window etc. | [
"Triggered",
"when",
"resizing",
"window",
"etc",
"."
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2713-L2736 | |
13,429 | StephanWagner/jBox | Demo/Playground/Playground.Avatars.js | function () {
// Create the containers for the liked or disliked avatars
if (initial) {
$('<div id="LikedAvatars" class="AvatarsCollection"/>').appendTo($('body'));
$('<div id="DislikedAvatars" class="AvatarsCollection"/>').appendTo($('body'));
}
$.each(this.footer.... | javascript | function () {
// Create the containers for the liked or disliked avatars
if (initial) {
$('<div id="LikedAvatars" class="AvatarsCollection"/>').appendTo($('body'));
$('<div id="DislikedAvatars" class="AvatarsCollection"/>').appendTo($('body'));
}
$.each(this.footer.... | [
"function",
"(",
")",
"{",
"// Create the containers for the liked or disliked avatars",
"if",
"(",
"initial",
")",
"{",
"$",
"(",
"'<div id=\"LikedAvatars\" class=\"AvatarsCollection\"/>'",
")",
".",
"appendTo",
"(",
"$",
"(",
"'body'",
")",
")",
";",
"$",
"(",
"'<... | When the jBox is created, add the click events to the buttons | [
"When",
"the",
"jBox",
"is",
"created",
"add",
"the",
"click",
"events",
"to",
"the",
"buttons"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/Demo/Playground/Playground.Avatars.js#L124-L181 | |
13,430 | StephanWagner/jBox | Demo/Playground/Playground.Avatars.js | function () {
// Set title and content depending on current index
this.setTitle(DemoAvatars.Avatars[DemoAvatars.current]);
this.content.css({backgroundImage: 'url(https://stephanwagner.me/img/jBox/avatar/' + DemoAvatars.Avatars[DemoAvatars.current] + '.svg)'});
// If it's the inita... | javascript | function () {
// Set title and content depending on current index
this.setTitle(DemoAvatars.Avatars[DemoAvatars.current]);
this.content.css({backgroundImage: 'url(https://stephanwagner.me/img/jBox/avatar/' + DemoAvatars.Avatars[DemoAvatars.current] + '.svg)'});
// If it's the inita... | [
"function",
"(",
")",
"{",
"// Set title and content depending on current index",
"this",
".",
"setTitle",
"(",
"DemoAvatars",
".",
"Avatars",
"[",
"DemoAvatars",
".",
"current",
"]",
")",
";",
"this",
".",
"content",
".",
"css",
"(",
"{",
"backgroundImage",
":"... | When we open the jBox, set the new content and show the tooltips if it's the initial jBox | [
"When",
"we",
"open",
"the",
"jBox",
"set",
"the",
"new",
"content",
"and",
"show",
"the",
"tooltips",
"if",
"it",
"s",
"the",
"initial",
"jBox"
] | 63857f9529ad8f9c491d5a5bc7fe44135f74e927 | https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/Demo/Playground/Playground.Avatars.js#L184-L221 | |
13,431 | minio/minio-js | src/main/signing.js | getCredential | function getCredential(accessKey, region, requestDate) {
if (!isString(accessKey)) {
throw new TypeError('accessKey should be of type "string"')
}
if (!isString(region)) {
throw new TypeError('region should be of type "string"')
}
if (!isObject(requestDate)) {
throw new TypeError('requestDate shou... | javascript | function getCredential(accessKey, region, requestDate) {
if (!isString(accessKey)) {
throw new TypeError('accessKey should be of type "string"')
}
if (!isString(region)) {
throw new TypeError('region should be of type "string"')
}
if (!isObject(requestDate)) {
throw new TypeError('requestDate shou... | [
"function",
"getCredential",
"(",
"accessKey",
",",
"region",
",",
"requestDate",
")",
"{",
"if",
"(",
"!",
"isString",
"(",
"accessKey",
")",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"'accessKey should be of type \"string\"'",
")",
"}",
"if",
"(",
"!",
"... | generate a credential string | [
"generate",
"a",
"credential",
"string"
] | 84a3e57809499c8dafb8afb4abf5162dd22c95ef | https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L79-L90 |
13,432 | minio/minio-js | src/main/signing.js | getSignedHeaders | function getSignedHeaders(headers) {
if (!isObject(headers)) {
throw new TypeError('request should be of type "object"')
}
// Excerpts from @lsegal - https://github.com/aws/aws-sdk-js/issues/659#issuecomment-120477258
//
// User-Agent:
//
// This is ignored from signing because signing this caus... | javascript | function getSignedHeaders(headers) {
if (!isObject(headers)) {
throw new TypeError('request should be of type "object"')
}
// Excerpts from @lsegal - https://github.com/aws/aws-sdk-js/issues/659#issuecomment-120477258
//
// User-Agent:
//
// This is ignored from signing because signing this caus... | [
"function",
"getSignedHeaders",
"(",
"headers",
")",
"{",
"if",
"(",
"!",
"isObject",
"(",
"headers",
")",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"'request should be of type \"object\"'",
")",
"}",
"// Excerpts from @lsegal - https://github.com/aws/aws-sdk-js/issues/... | Returns signed headers array - alphabetically sorted | [
"Returns",
"signed",
"headers",
"array",
"-",
"alphabetically",
"sorted"
] | 84a3e57809499c8dafb8afb4abf5162dd22c95ef | https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L93-L128 |
13,433 | minio/minio-js | src/main/signing.js | getSigningKey | function getSigningKey(date, region, secretKey) {
if (!isObject(date)) {
throw new TypeError('date should be of type "object"')
}
if (!isString(region)) {
throw new TypeError('region should be of type "string"')
}
if (!isString(secretKey)) {
throw new TypeError('secretKey should be of type "string... | javascript | function getSigningKey(date, region, secretKey) {
if (!isObject(date)) {
throw new TypeError('date should be of type "object"')
}
if (!isString(region)) {
throw new TypeError('region should be of type "string"')
}
if (!isString(secretKey)) {
throw new TypeError('secretKey should be of type "string... | [
"function",
"getSigningKey",
"(",
"date",
",",
"region",
",",
"secretKey",
")",
"{",
"if",
"(",
"!",
"isObject",
"(",
"date",
")",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"'date should be of type \"object\"'",
")",
"}",
"if",
"(",
"!",
"isString",
"(",... | returns the key used for calculating signature | [
"returns",
"the",
"key",
"used",
"for",
"calculating",
"signature"
] | 84a3e57809499c8dafb8afb4abf5162dd22c95ef | https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L131-L146 |
13,434 | minio/minio-js | src/main/signing.js | getStringToSign | function getStringToSign(canonicalRequest, requestDate, region) {
if (!isString(canonicalRequest)) {
throw new TypeError('canonicalRequest should be of type "string"')
}
if (!isObject(requestDate)) {
throw new TypeError('requestDate should be of type "object"')
}
if (!isString(region)) {
throw new... | javascript | function getStringToSign(canonicalRequest, requestDate, region) {
if (!isString(canonicalRequest)) {
throw new TypeError('canonicalRequest should be of type "string"')
}
if (!isObject(requestDate)) {
throw new TypeError('requestDate should be of type "object"')
}
if (!isString(region)) {
throw new... | [
"function",
"getStringToSign",
"(",
"canonicalRequest",
",",
"requestDate",
",",
"region",
")",
"{",
"if",
"(",
"!",
"isString",
"(",
"canonicalRequest",
")",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"'canonicalRequest should be of type \"string\"'",
")",
"}",
... | returns the string that needs to be signed | [
"returns",
"the",
"string",
"that",
"needs",
"to",
"be",
"signed"
] | 84a3e57809499c8dafb8afb4abf5162dd22c95ef | https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L149-L167 |
13,435 | watson/bonjour | lib/registry.js | probe | function probe (mdns, service, cb) {
var sent = false
var retries = 0
var timer
mdns.on('response', onresponse)
setTimeout(send, Math.random() * 250)
function send () {
// abort if the service have or is being stopped in the meantime
if (!service._activated || service._destroyed) return
mdns.... | javascript | function probe (mdns, service, cb) {
var sent = false
var retries = 0
var timer
mdns.on('response', onresponse)
setTimeout(send, Math.random() * 250)
function send () {
// abort if the service have or is being stopped in the meantime
if (!service._activated || service._destroyed) return
mdns.... | [
"function",
"probe",
"(",
"mdns",
",",
"service",
",",
"cb",
")",
"{",
"var",
"sent",
"=",
"false",
"var",
"retries",
"=",
"0",
"var",
"timer",
"mdns",
".",
"on",
"(",
"'response'",
",",
"onresponse",
")",
"setTimeout",
"(",
"send",
",",
"Math",
".",... | Check if a service name is already in use on the network.
Used before announcing the new service.
To guard against race conditions where multiple services are started
simultaneously on the network, wait a random amount of time (between
0 and 250 ms) before probing.
TODO: Add support for Simultaneous Probe Tiebreakin... | [
"Check",
"if",
"a",
"service",
"name",
"is",
"already",
"in",
"use",
"on",
"the",
"network",
"."
] | bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098 | https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/registry.js#L78-L119 |
13,436 | watson/bonjour | lib/registry.js | announce | function announce (server, service) {
var delay = 1000
var packet = service._records()
server.register(packet)
;(function broadcast () {
// abort if the service have or is being stopped in the meantime
if (!service._activated || service._destroyed) return
server.mdns.respond(packet, function () {... | javascript | function announce (server, service) {
var delay = 1000
var packet = service._records()
server.register(packet)
;(function broadcast () {
// abort if the service have or is being stopped in the meantime
if (!service._activated || service._destroyed) return
server.mdns.respond(packet, function () {... | [
"function",
"announce",
"(",
"server",
",",
"service",
")",
"{",
"var",
"delay",
"=",
"1000",
"var",
"packet",
"=",
"service",
".",
"_records",
"(",
")",
"server",
".",
"register",
"(",
"packet",
")",
";",
"(",
"function",
"broadcast",
"(",
")",
"{",
... | Initial service announcement
Used to announce new services when they are first registered.
Broadcasts right away, then after 3 seconds, 9 seconds, 27 seconds,
and so on, up to a maximum interval of one hour. | [
"Initial",
"service",
"announcement"
] | bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098 | https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/registry.js#L129-L153 |
13,437 | watson/bonjour | lib/registry.js | teardown | function teardown (server, services, cb) {
if (!Array.isArray(services)) services = [services]
services = services.filter(function (service) {
return service._activated // ignore services not currently starting or started
})
var records = flatten.depth(services.map(function (service) {
service._activa... | javascript | function teardown (server, services, cb) {
if (!Array.isArray(services)) services = [services]
services = services.filter(function (service) {
return service._activated // ignore services not currently starting or started
})
var records = flatten.depth(services.map(function (service) {
service._activa... | [
"function",
"teardown",
"(",
"server",
",",
"services",
",",
"cb",
")",
"{",
"if",
"(",
"!",
"Array",
".",
"isArray",
"(",
"services",
")",
")",
"services",
"=",
"[",
"services",
"]",
"services",
"=",
"services",
".",
"filter",
"(",
"function",
"(",
... | Stop the given services
Besides removing a service from the mDNS registry, a "goodbye"
message is sent for each service to let the network know about the
shutdown. | [
"Stop",
"the",
"given",
"services"
] | bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098 | https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/registry.js#L162-L189 |
13,438 | watson/bonjour | lib/browser.js | Browser | function Browser (mdns, opts, onup) {
if (typeof opts === 'function') return new Browser(mdns, null, opts)
EventEmitter.call(this)
this._mdns = mdns
this._onresponse = null
this._serviceMap = {}
this._txt = dnsTxt(opts.txt)
if (!opts || !opts.type) {
this._name = WILDCARD
this._wildcard = true
... | javascript | function Browser (mdns, opts, onup) {
if (typeof opts === 'function') return new Browser(mdns, null, opts)
EventEmitter.call(this)
this._mdns = mdns
this._onresponse = null
this._serviceMap = {}
this._txt = dnsTxt(opts.txt)
if (!opts || !opts.type) {
this._name = WILDCARD
this._wildcard = true
... | [
"function",
"Browser",
"(",
"mdns",
",",
"opts",
",",
"onup",
")",
"{",
"if",
"(",
"typeof",
"opts",
"===",
"'function'",
")",
"return",
"new",
"Browser",
"(",
"mdns",
",",
"null",
",",
"opts",
")",
"EventEmitter",
".",
"call",
"(",
"this",
")",
"thi... | Start a browser
The browser listens for services by querying for PTR records of a given
type, protocol and domain, e.g. _http._tcp.local.
If no type is given, a wild card search is performed.
An internal list of online services is kept which starts out empty. When
ever a new service is discovered, it's added to the ... | [
"Start",
"a",
"browser"
] | bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098 | https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/browser.js#L30-L54 |
13,439 | ocombe/ocLazyLoad | examples/requireJSExample/js/ng-grid-2.0.11.debug.js | function (obj, columnName) {
if (typeof obj !== "object" || typeof columnName !== "string") {
return obj;
}
var args = columnName.split('.');
var cObj = obj;
if (args.length > 1) {
for (var i = 1, len = args.length; i < len; i++) {
cObj = cObj[args[i]];
if (!cObj) {
return obj;
... | javascript | function (obj, columnName) {
if (typeof obj !== "object" || typeof columnName !== "string") {
return obj;
}
var args = columnName.split('.');
var cObj = obj;
if (args.length > 1) {
for (var i = 1, len = args.length; i < len; i++) {
cObj = cObj[args[i]];
if (!cObj) {
return obj;
... | [
"function",
"(",
"obj",
",",
"columnName",
")",
"{",
"if",
"(",
"typeof",
"obj",
"!==",
"\"object\"",
"||",
"typeof",
"columnName",
"!==",
"\"string\"",
")",
"{",
"return",
"obj",
";",
"}",
"var",
"args",
"=",
"columnName",
".",
"split",
"(",
"'.'",
")... | Traversing through the object to find the value that we want. If fail, then return the original object. | [
"Traversing",
"through",
"the",
"object",
"to",
"find",
"the",
"value",
"that",
"we",
"want",
".",
"If",
"fail",
"then",
"return",
"the",
"original",
"object",
"."
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/examples/requireJSExample/js/ng-grid-2.0.11.debug.js#L2686-L2702 | |
13,440 | ocombe/ocLazyLoad | dist/ocLazyLoad.require.js | stringify | function stringify(obj) {
try {
return JSON.stringify(obj);
} catch (e) {
var cache = [];
return JSON.stringify(obj, function (key, value) {
if (angular.isObject(value) && value !== null) {
if (cache.inde... | javascript | function stringify(obj) {
try {
return JSON.stringify(obj);
} catch (e) {
var cache = [];
return JSON.stringify(obj, function (key, value) {
if (angular.isObject(value) && value !== null) {
if (cache.inde... | [
"function",
"stringify",
"(",
"obj",
")",
"{",
"try",
"{",
"return",
"JSON",
".",
"stringify",
"(",
"obj",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"var",
"cache",
"=",
"[",
"]",
";",
"return",
"JSON",
".",
"stringify",
"(",
"obj",
",",
"funct... | Like JSON.stringify but that doesn't throw on circular references
@param obj | [
"Like",
"JSON",
".",
"stringify",
"but",
"that",
"doesn",
"t",
"throw",
"on",
"circular",
"references"
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L139-L156 |
13,441 | ocombe/ocLazyLoad | dist/ocLazyLoad.require.js | getModuleConfig | function getModuleConfig(moduleName) {
if (!angular.isString(moduleName)) {
throw new Error('You need to give the name of the module to get');
}
if (!modules[moduleName]) {
return null;
}
... | javascript | function getModuleConfig(moduleName) {
if (!angular.isString(moduleName)) {
throw new Error('You need to give the name of the module to get');
}
if (!modules[moduleName]) {
return null;
}
... | [
"function",
"getModuleConfig",
"(",
"moduleName",
")",
"{",
"if",
"(",
"!",
"angular",
".",
"isString",
"(",
"moduleName",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"'You need to give the name of the module to get'",
")",
";",
"}",
"if",
"(",
"!",
"modules"... | Let you get a module config object
@param moduleName String the name of the module
@returns {*} | [
"Let",
"you",
"get",
"a",
"module",
"config",
"object"
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L420-L428 |
13,442 | ocombe/ocLazyLoad | dist/ocLazyLoad.require.js | setModuleConfig | function setModuleConfig(moduleConfig) {
if (!angular.isObject(moduleConfig)) {
throw new Error('You need to give the module config object to set');
}
modules[moduleConfig.name] = moduleConfig;
return moduleConfig;
... | javascript | function setModuleConfig(moduleConfig) {
if (!angular.isObject(moduleConfig)) {
throw new Error('You need to give the module config object to set');
}
modules[moduleConfig.name] = moduleConfig;
return moduleConfig;
... | [
"function",
"setModuleConfig",
"(",
"moduleConfig",
")",
"{",
"if",
"(",
"!",
"angular",
".",
"isObject",
"(",
"moduleConfig",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"'You need to give the module config object to set'",
")",
";",
"}",
"modules",
"[",
"modu... | Let you define a module config object
@param moduleConfig Object the module config object
@returns {*} | [
"Let",
"you",
"define",
"a",
"module",
"config",
"object"
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L435-L441 |
13,443 | ocombe/ocLazyLoad | dist/ocLazyLoad.require.js | isLoaded | function isLoaded(modulesNames) {
var moduleLoaded = function moduleLoaded(module) {
var isLoaded = regModules.indexOf(module) > -1;
if (!isLoaded) {
isLoaded = !!moduleExists(module);
}
... | javascript | function isLoaded(modulesNames) {
var moduleLoaded = function moduleLoaded(module) {
var isLoaded = regModules.indexOf(module) > -1;
if (!isLoaded) {
isLoaded = !!moduleExists(module);
}
... | [
"function",
"isLoaded",
"(",
"modulesNames",
")",
"{",
"var",
"moduleLoaded",
"=",
"function",
"moduleLoaded",
"(",
"module",
")",
"{",
"var",
"isLoaded",
"=",
"regModules",
".",
"indexOf",
"(",
"module",
")",
">",
"-",
"1",
";",
"if",
"(",
"!",
"isLoade... | Let you check if a module has been loaded into Angular or not
@param modulesNames String/Object a module name, or a list of module names
@returns {boolean} | [
"Let",
"you",
"check",
"if",
"a",
"module",
"has",
"been",
"loaded",
"into",
"Angular",
"or",
"not"
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L456-L478 |
13,444 | ocombe/ocLazyLoad | dist/ocLazyLoad.require.js | getModule | function getModule(moduleName) {
try {
return ngModuleFct(moduleName);
} catch (e) {
// this error message really suxx
if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {
... | javascript | function getModule(moduleName) {
try {
return ngModuleFct(moduleName);
} catch (e) {
// this error message really suxx
if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {
... | [
"function",
"getModule",
"(",
"moduleName",
")",
"{",
"try",
"{",
"return",
"ngModuleFct",
"(",
"moduleName",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"// this error message really suxx",
"if",
"(",
"/",
"No module",
"/",
".",
"test",
"(",
"e",
")",
"... | Returns a module if it exists
@param moduleName
@returns {module} | [
"Returns",
"a",
"module",
"if",
"it",
"exists"
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L492-L502 |
13,445 | ocombe/ocLazyLoad | dist/ocLazyLoad.require.js | inject | function inject(moduleName) {
var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var self = this,
deferred =... | javascript | function inject(moduleName) {
var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var self = this,
deferred =... | [
"function",
"inject",
"(",
"moduleName",
")",
"{",
"var",
"localParams",
"=",
"arguments",
".",
"length",
"<=",
"1",
"||",
"arguments",
"[",
"1",
"]",
"===",
"undefined",
"?",
"{",
"}",
":",
"arguments",
"[",
"1",
"]",
";",
"var",
"real",
"=",
"argum... | Inject new modules into Angular
@param moduleName
@param localParams
@param real | [
"Inject",
"new",
"modules",
"into",
"Angular"
] | c282f8f47736c195a4079024f62f3c9e16420619 | https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L622-L672 |
13,446 | webpack-contrib/less-loader | src/getOptions.js | getOptions | function getOptions(loaderContext) {
const options = {
plugins: [],
relativeUrls: true,
...clone(loaderUtils.getOptions(loaderContext)),
};
// We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry
options.filename = loaderContext.resource;... | javascript | function getOptions(loaderContext) {
const options = {
plugins: [],
relativeUrls: true,
...clone(loaderUtils.getOptions(loaderContext)),
};
// We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry
options.filename = loaderContext.resource;... | [
"function",
"getOptions",
"(",
"loaderContext",
")",
"{",
"const",
"options",
"=",
"{",
"plugins",
":",
"[",
"]",
",",
"relativeUrls",
":",
"true",
",",
"...",
"clone",
"(",
"loaderUtils",
".",
"getOptions",
"(",
"loaderContext",
")",
")",
",",
"}",
";",... | Retrieves the options from the loaderContext, makes a deep copy of it and normalizes it for further consumption.
@param {LoaderContext} loaderContext | [
"Retrieves",
"the",
"options",
"from",
"the",
"loaderContext",
"makes",
"a",
"deep",
"copy",
"of",
"it",
"and",
"normalizes",
"it",
"for",
"further",
"consumption",
"."
] | 821c12d407b36f49aacc506737a02d1dc46aee56 | https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/getOptions.js#L11-L38 |
13,447 | webpack-contrib/less-loader | src/createWebpackLessPlugin.js | createWebpackLessPlugin | function createWebpackLessPlugin(loaderContext) {
const { fs } = loaderContext;
const resolve = pify(loaderContext.resolve.bind(loaderContext));
const loadModule = pify(loaderContext.loadModule.bind(loaderContext));
const readFile = pify(fs.readFile.bind(fs));
class WebpackFileManager extends less.FileManage... | javascript | function createWebpackLessPlugin(loaderContext) {
const { fs } = loaderContext;
const resolve = pify(loaderContext.resolve.bind(loaderContext));
const loadModule = pify(loaderContext.loadModule.bind(loaderContext));
const readFile = pify(fs.readFile.bind(fs));
class WebpackFileManager extends less.FileManage... | [
"function",
"createWebpackLessPlugin",
"(",
"loaderContext",
")",
"{",
"const",
"{",
"fs",
"}",
"=",
"loaderContext",
";",
"const",
"resolve",
"=",
"pify",
"(",
"loaderContext",
".",
"resolve",
".",
"bind",
"(",
"loaderContext",
")",
")",
";",
"const",
"load... | Creates a Less plugin that uses webpack's resolving engine that is provided by the loaderContext.
@param {LoaderContext} loaderContext
@param {string=} root
@returns {LessPlugin} | [
"Creates",
"a",
"Less",
"plugin",
"that",
"uses",
"webpack",
"s",
"resolving",
"engine",
"that",
"is",
"provided",
"by",
"the",
"loaderContext",
"."
] | 821c12d407b36f49aacc506737a02d1dc46aee56 | https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/createWebpackLessPlugin.js#L30-L100 |
13,448 | webpack-contrib/less-loader | src/processResult.js | processResult | function processResult(loaderContext, resultPromise) {
const { callback } = loaderContext;
resultPromise
.then(
({ css, map, imports }) => {
imports.forEach(loaderContext.addDependency, loaderContext);
return {
// Removing the sourceMappingURL comment.
// See removeSou... | javascript | function processResult(loaderContext, resultPromise) {
const { callback } = loaderContext;
resultPromise
.then(
({ css, map, imports }) => {
imports.forEach(loaderContext.addDependency, loaderContext);
return {
// Removing the sourceMappingURL comment.
// See removeSou... | [
"function",
"processResult",
"(",
"loaderContext",
",",
"resultPromise",
")",
"{",
"const",
"{",
"callback",
"}",
"=",
"loaderContext",
";",
"resultPromise",
".",
"then",
"(",
"(",
"{",
"css",
",",
"map",
",",
"imports",
"}",
")",
"=>",
"{",
"imports",
"... | Removes the sourceMappingURL from the generated CSS, parses the source map and calls the next loader.
@param {loaderContext} loaderContext
@param {Promise<LessResult>} resultPromise | [
"Removes",
"the",
"sourceMappingURL",
"from",
"the",
"generated",
"CSS",
"parses",
"the",
"source",
"map",
"and",
"calls",
"the",
"next",
"loader",
"."
] | 821c12d407b36f49aacc506737a02d1dc46aee56 | https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/processResult.js#L10-L34 |
13,449 | webpack-contrib/less-loader | src/formatLessError.js | formatLessError | function formatLessError(err) {
/* eslint-disable no-param-reassign */
const msg = err.message;
// Instruct webpack to hide the JS stack from the console
// Usually you're only interested in the SASS stack in this case.
err.hideStack = true;
err.message = [
os.EOL,
...getFileExcerptIfPossible(err)... | javascript | function formatLessError(err) {
/* eslint-disable no-param-reassign */
const msg = err.message;
// Instruct webpack to hide the JS stack from the console
// Usually you're only interested in the SASS stack in this case.
err.hideStack = true;
err.message = [
os.EOL,
...getFileExcerptIfPossible(err)... | [
"function",
"formatLessError",
"(",
"err",
")",
"{",
"/* eslint-disable no-param-reassign */",
"const",
"msg",
"=",
"err",
".",
"message",
";",
"// Instruct webpack to hide the JS stack from the console",
"// Usually you're only interested in the SASS stack in this case.",
"err",
"... | Beautifies the error message from Less.
@param {LessError} lessErr
@param {string} lessErr.type - e.g. 'Name'
@param {string} lessErr.message - e.g. '.undefined-mixin is undefined'
@param {string} lessErr.filename - e.g. '/path/to/style.less'
@param {number} lessErr.index - e.g. 352
@param {number} lessErr.line - e.g.... | [
"Beautifies",
"the",
"error",
"message",
"from",
"Less",
"."
] | 821c12d407b36f49aacc506737a02d1dc46aee56 | https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/formatLessError.js#L45-L61 |
13,450 | GriddleGriddle/Griddle | src/utils/columnUtils.js | getColumnPropertiesFromColumnArray | function getColumnPropertiesFromColumnArray(columnProperties, columns) {
return columns.reduce((previous, current, i) => {
previous[current] = { id: current, order: offset + i };
return previous;
},
columnProperties);
} | javascript | function getColumnPropertiesFromColumnArray(columnProperties, columns) {
return columns.reduce((previous, current, i) => {
previous[current] = { id: current, order: offset + i };
return previous;
},
columnProperties);
} | [
"function",
"getColumnPropertiesFromColumnArray",
"(",
"columnProperties",
",",
"columns",
")",
"{",
"return",
"columns",
".",
"reduce",
"(",
"(",
"previous",
",",
"current",
",",
"i",
")",
"=>",
"{",
"previous",
"[",
"current",
"]",
"=",
"{",
"id",
":",
"... | Gets a column properties object from an array of columnNames
@param {Array<string>} columns - array of column names | [
"Gets",
"a",
"column",
"properties",
"object",
"from",
"an",
"array",
"of",
"columnNames"
] | f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891 | https://github.com/GriddleGriddle/Griddle/blob/f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891/src/utils/columnUtils.js#L6-L12 |
13,451 | GriddleGriddle/Griddle | src/utils/compositionUtils.js | buildGriddleReducerObject | function buildGriddleReducerObject(reducerObjects) {
let reducerMethodsWithoutHooks = [];
let beforeHooks = [];
let afterHooks = [];
let beforeReduceAll = [];
let afterReduceAll = [];
if (reducerObjects.length > 0) {
// remove the hooks and extend the object
for(const key in reducerObjects) {
... | javascript | function buildGriddleReducerObject(reducerObjects) {
let reducerMethodsWithoutHooks = [];
let beforeHooks = [];
let afterHooks = [];
let beforeReduceAll = [];
let afterReduceAll = [];
if (reducerObjects.length > 0) {
// remove the hooks and extend the object
for(const key in reducerObjects) {
... | [
"function",
"buildGriddleReducerObject",
"(",
"reducerObjects",
")",
"{",
"let",
"reducerMethodsWithoutHooks",
"=",
"[",
"]",
";",
"let",
"beforeHooks",
"=",
"[",
"]",
";",
"let",
"afterHooks",
"=",
"[",
"]",
";",
"let",
"beforeReduceAll",
"=",
"[",
"]",
";"... | Builds a new reducer that composes hooks and extends standard reducers between reducerObjects
@param {Object <array>} reducers - An array of reducerObjects
Note: this used to be exported, but the same properties are available from buildGriddleReducer.
TODO: This method should be broken down a bit -- it's doing too much... | [
"Builds",
"a",
"new",
"reducer",
"that",
"composes",
"hooks",
"and",
"extends",
"standard",
"reducers",
"between",
"reducerObjects"
] | f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891 | https://github.com/GriddleGriddle/Griddle/blob/f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891/src/utils/compositionUtils.js#L177-L216 |
13,452 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-file/www/FileEntry.js | function(name, fullPath, fileSystem, nativeURL) {
// remove trailing slash if it is present
if (fullPath && /\/$/.test(fullPath)) {
fullPath = fullPath.substring(0, fullPath.length - 1);
}
if (nativeURL && /\/$/.test(nativeURL)) {
nativeURL = nativeURL.substring(0, nativeURL.length - 1);... | javascript | function(name, fullPath, fileSystem, nativeURL) {
// remove trailing slash if it is present
if (fullPath && /\/$/.test(fullPath)) {
fullPath = fullPath.substring(0, fullPath.length - 1);
}
if (nativeURL && /\/$/.test(nativeURL)) {
nativeURL = nativeURL.substring(0, nativeURL.length - 1);... | [
"function",
"(",
"name",
",",
"fullPath",
",",
"fileSystem",
",",
"nativeURL",
")",
"{",
"// remove trailing slash if it is present",
"if",
"(",
"fullPath",
"&&",
"/",
"\\/$",
"/",
".",
"test",
"(",
"fullPath",
")",
")",
"{",
"fullPath",
"=",
"fullPath",
"."... | An interface representing a file on the file system.
{boolean} isFile always true (readonly)
{boolean} isDirectory always false (readonly)
{DOMString} name of the file, excluding the path leading to it (readonly)
{DOMString} fullPath the absolute full path to the file (readonly)
{FileSystem} filesystem on which the fi... | [
"An",
"interface",
"representing",
"a",
"file",
"on",
"the",
"file",
"system",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-file/www/FileEntry.js#L39-L49 | |
13,453 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/afterPrepare.js | run | function run(context) {
const preferences = configPreferences.read(context);
const platforms = context.opts.cordova.platforms;
platforms.forEach(platform => {
if (platform === ANDROID) {
androidManifest.writePreferences(context, preferences);
}
if (platform === IOS) {
iosD... | javascript | function run(context) {
const preferences = configPreferences.read(context);
const platforms = context.opts.cordova.platforms;
platforms.forEach(platform => {
if (platform === ANDROID) {
androidManifest.writePreferences(context, preferences);
}
if (platform === IOS) {
iosD... | [
"function",
"run",
"(",
"context",
")",
"{",
"const",
"preferences",
"=",
"configPreferences",
".",
"read",
"(",
"context",
")",
";",
"const",
"platforms",
"=",
"context",
".",
"opts",
".",
"cordova",
".",
"platforms",
";",
"platforms",
".",
"forEach",
"("... | builds after platform config | [
"builds",
"after",
"platform",
"config"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/afterPrepare.js#L14-L26 |
13,454 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/index.js | execute | function execute(method, params) {
var output = !params ? [] : params;
if (method == "getStandardEvents") {
return new Promise(function promise(resolve, reject) {
resolve(standardEvent);
});
}
return new Promise(function promise(resolve, reject) {
exec(
function success(res) {
... | javascript | function execute(method, params) {
var output = !params ? [] : params;
if (method == "getStandardEvents") {
return new Promise(function promise(resolve, reject) {
resolve(standardEvent);
});
}
return new Promise(function promise(resolve, reject) {
exec(
function success(res) {
... | [
"function",
"execute",
"(",
"method",
",",
"params",
")",
"{",
"var",
"output",
"=",
"!",
"params",
"?",
"[",
"]",
":",
"params",
";",
"if",
"(",
"method",
"==",
"\"getStandardEvents\"",
")",
"{",
"return",
"new",
"Promise",
"(",
"function",
"promise",
... | JavsSript to SDK wrappers | [
"JavsSript",
"to",
"SDK",
"wrappers"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/index.js#L33-L55 |
13,455 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-file/www/FileReader.js | function() {
this._readyState = 0;
this._error = null;
this._result = null;
this._progress = null;
this._localURL = '';
this._realReader = origFileReader ? new origFileReader() : {};
} | javascript | function() {
this._readyState = 0;
this._error = null;
this._result = null;
this._progress = null;
this._localURL = '';
this._realReader = origFileReader ? new origFileReader() : {};
} | [
"function",
"(",
")",
"{",
"this",
".",
"_readyState",
"=",
"0",
";",
"this",
".",
"_error",
"=",
"null",
";",
"this",
".",
"_result",
"=",
"null",
";",
"this",
".",
"_progress",
"=",
"null",
";",
"this",
".",
"_localURL",
"=",
"''",
";",
"this",
... | This class reads the mobile device file system.
For Android:
The root directory is the root of the file system.
To read from the SD card, the file name is "sdcard/my_file.txt"
@constructor | [
"This",
"class",
"reads",
"the",
"mobile",
"device",
"file",
"system",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-file/www/FileReader.js#L37-L44 | |
13,456 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js | addDevelopmentTeam | function addDevelopmentTeam(preferences) {
const file = path.join(preferences.projectRoot, FILENAME);
let content = getBuildJson(file);
content = convertStringToJson(content);
createDefaultBuildJson(content);
updateDevelopmentTeam(content, preferences);
content = convertJsonToString(content);
... | javascript | function addDevelopmentTeam(preferences) {
const file = path.join(preferences.projectRoot, FILENAME);
let content = getBuildJson(file);
content = convertStringToJson(content);
createDefaultBuildJson(content);
updateDevelopmentTeam(content, preferences);
content = convertJsonToString(content);
... | [
"function",
"addDevelopmentTeam",
"(",
"preferences",
")",
"{",
"const",
"file",
"=",
"path",
".",
"join",
"(",
"preferences",
".",
"projectRoot",
",",
"FILENAME",
")",
";",
"let",
"content",
"=",
"getBuildJson",
"(",
"file",
")",
";",
"content",
"=",
"con... | updates the development team for Universal Links | [
"updates",
"the",
"development",
"team",
"for",
"Universal",
"Links"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js#L14-L23 |
13,457 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js | updateDevelopmentTeam | function updateDevelopmentTeam(content, preferences) {
const release = preferences.iosTeamRelease;
const debug = preferences.iosTeamDebug
? preferences.iosTeamDebug
: preferences.iosTeamRelease;
if (release === null) {
throw new Error(
'BRANCH SDK: Invalid "ios-team-release" in <b... | javascript | function updateDevelopmentTeam(content, preferences) {
const release = preferences.iosTeamRelease;
const debug = preferences.iosTeamDebug
? preferences.iosTeamDebug
: preferences.iosTeamRelease;
if (release === null) {
throw new Error(
'BRANCH SDK: Invalid "ios-team-release" in <b... | [
"function",
"updateDevelopmentTeam",
"(",
"content",
",",
"preferences",
")",
"{",
"const",
"release",
"=",
"preferences",
".",
"iosTeamRelease",
";",
"const",
"debug",
"=",
"preferences",
".",
"iosTeamDebug",
"?",
"preferences",
".",
"iosTeamDebug",
":",
"prefere... | update build.json with developmentTeam from config.xml | [
"update",
"build",
".",
"json",
"with",
"developmentTeam",
"from",
"config",
".",
"xml"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js#L88-L102 |
13,458 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js | function (successCB, failureCB, args, env) {
var result = new PluginResult(args, env);
var response = g11n.getInstance().InvokeMethod('getPreferredLanguage', args);
var data = JSON.parse(response);
console.log('getPreferredLanguage: ' + JSON.stringify(response));
if (data.error ... | javascript | function (successCB, failureCB, args, env) {
var result = new PluginResult(args, env);
var response = g11n.getInstance().InvokeMethod('getPreferredLanguage', args);
var data = JSON.parse(response);
console.log('getPreferredLanguage: ' + JSON.stringify(response));
if (data.error ... | [
"function",
"(",
"successCB",
",",
"failureCB",
",",
"args",
",",
"env",
")",
"{",
"var",
"result",
"=",
"new",
"PluginResult",
"(",
"args",
",",
"env",
")",
";",
"var",
"response",
"=",
"g11n",
".",
"getInstance",
"(",
")",
".",
"InvokeMethod",
"(",
... | Returns the string identifier for the client's current language.
It returns the language identifier string to the successCB callback with a
properties object as a parameter. If there is an error getting the language,
then the errorCB callback is invoked.
@param {Function} successCB
@param {Function} errorCB
@return O... | [
"Returns",
"the",
"string",
"identifier",
"for",
"the",
"client",
"s",
"current",
"language",
".",
"It",
"returns",
"the",
"language",
"identifier",
"string",
"to",
"the",
"successCB",
"callback",
"with",
"a",
"properties",
"object",
"as",
"a",
"parameter",
".... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js#L44-L60 | |
13,459 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js | function (successCB, failureCB, args, env) {
var result = new PluginResult(args, env);
var response = g11n.getInstance().InvokeMethod('getNumberPattern', args);
var data = JSON.parse(response);
console.log('getNumberPattern: ' + JSON.stringify(response));
if (data.error !== unde... | javascript | function (successCB, failureCB, args, env) {
var result = new PluginResult(args, env);
var response = g11n.getInstance().InvokeMethod('getNumberPattern', args);
var data = JSON.parse(response);
console.log('getNumberPattern: ' + JSON.stringify(response));
if (data.error !== unde... | [
"function",
"(",
"successCB",
",",
"failureCB",
",",
"args",
",",
"env",
")",
"{",
"var",
"result",
"=",
"new",
"PluginResult",
"(",
"args",
",",
"env",
")",
";",
"var",
"response",
"=",
"g11n",
".",
"getInstance",
"(",
")",
".",
"InvokeMethod",
"(",
... | Returns a pattern string for formatting and parsing numbers according to the client's user
preferences. It returns the pattern to the successCB callback with a properties object as a
parameter. If there is an error obtaining the pattern, then the errorCB callback is invoked.
The defaults are: type="decimal"
@param {F... | [
"Returns",
"a",
"pattern",
"string",
"for",
"formatting",
"and",
"parsing",
"numbers",
"according",
"to",
"the",
"client",
"s",
"user",
"preferences",
".",
"It",
"returns",
"the",
"pattern",
"to",
"the",
"successCB",
"callback",
"with",
"a",
"properties",
"obj... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js#L483-L506 | |
13,460 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js | function (date, successCB, failureCB, options) {
argscheck.checkArgs('dfFO', 'Globalization.dateToString', arguments);
var dateValue = date.valueOf();
exec(successCB, failureCB, 'Globalization', 'dateToString', [{'date': dateValue, 'options': options}]);
} | javascript | function (date, successCB, failureCB, options) {
argscheck.checkArgs('dfFO', 'Globalization.dateToString', arguments);
var dateValue = date.valueOf();
exec(successCB, failureCB, 'Globalization', 'dateToString', [{'date': dateValue, 'options': options}]);
} | [
"function",
"(",
"date",
",",
"successCB",
",",
"failureCB",
",",
"options",
")",
"{",
"argscheck",
".",
"checkArgs",
"(",
"'dfFO'",
",",
"'Globalization.dateToString'",
",",
"arguments",
")",
";",
"var",
"dateValue",
"=",
"date",
".",
"valueOf",
"(",
")",
... | Returns a date formatted as a string according to the client's user preferences and
calendar using the time zone of the client. It returns the formatted date string to the
successCB callback with a properties object as a parameter. If there is an error
formatting the date, then the errorCB callback is invoked.
The def... | [
"Returns",
"a",
"date",
"formatted",
"as",
"a",
"string",
"according",
"to",
"the",
"client",
"s",
"user",
"preferences",
"and",
"calendar",
"using",
"the",
"time",
"zone",
"of",
"the",
"client",
".",
"It",
"returns",
"the",
"formatted",
"date",
"string",
... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js#L97-L101 | |
13,461 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js | function (currencyCode, successCB, failureCB) {
argscheck.checkArgs('sfF', 'Globalization.getCurrencyPattern', arguments);
exec(successCB, failureCB, 'Globalization', 'getCurrencyPattern', [{'currencyCode': currencyCode}]);
} | javascript | function (currencyCode, successCB, failureCB) {
argscheck.checkArgs('sfF', 'Globalization.getCurrencyPattern', arguments);
exec(successCB, failureCB, 'Globalization', 'getCurrencyPattern', [{'currencyCode': currencyCode}]);
} | [
"function",
"(",
"currencyCode",
",",
"successCB",
",",
"failureCB",
")",
"{",
"argscheck",
".",
"checkArgs",
"(",
"'sfF'",
",",
"'Globalization.getCurrencyPattern'",
",",
"arguments",
")",
";",
"exec",
"(",
"successCB",
",",
"failureCB",
",",
"'Globalization'",
... | Returns a pattern string for formatting and parsing currency values according to the client's
user preferences and ISO 4217 currency code. It returns the pattern to the successCB callback with a
properties object as a parameter. If there is an error obtaining the pattern, then the errorCB
callback is invoked.
@param {... | [
"Returns",
"a",
"pattern",
"string",
"for",
"formatting",
"and",
"parsing",
"currency",
"values",
"according",
"to",
"the",
"client",
"s",
"user",
"preferences",
"and",
"ISO",
"4217",
"currency",
"code",
".",
"It",
"returns",
"the",
"pattern",
"to",
"the",
"... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js#L379-L382 | |
13,462 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/www/MediaFile.js | function(name, localURL, type, lastModifiedDate, size){
MediaFile.__super__.constructor.apply(this, arguments);
} | javascript | function(name, localURL, type, lastModifiedDate, size){
MediaFile.__super__.constructor.apply(this, arguments);
} | [
"function",
"(",
"name",
",",
"localURL",
",",
"type",
",",
"lastModifiedDate",
",",
"size",
")",
"{",
"MediaFile",
".",
"__super__",
".",
"constructor",
".",
"apply",
"(",
"this",
",",
"arguments",
")",
";",
"}"
] | Represents a single file.
name {DOMString} name of the file, without path information
fullPath {DOMString} the full path of the file, including the name
type {DOMString} mime type
lastModifiedDate {Date} last modified date
size {Number} size of the file in bytes | [
"Represents",
"a",
"single",
"file",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/www/MediaFile.js#L35-L37 | |
13,463 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | collectEventData | function collectEventData(element, eventType, touches, ev) {
// find out pointerType
var pointerType = ionic.Gestures.POINTER_TOUCH;
if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {
pointerType = ionic.Gestures.POINTER_MOUSE;
}
... | javascript | function collectEventData(element, eventType, touches, ev) {
// find out pointerType
var pointerType = ionic.Gestures.POINTER_TOUCH;
if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {
pointerType = ionic.Gestures.POINTER_MOUSE;
}
... | [
"function",
"collectEventData",
"(",
"element",
",",
"eventType",
",",
"touches",
",",
"ev",
")",
"{",
"// find out pointerType",
"var",
"pointerType",
"=",
"ionic",
".",
"Gestures",
".",
"POINTER_TOUCH",
";",
"if",
"(",
"ev",
".",
"type",
".",
"match",
"(",... | collect event data for ionic.Gestures js
@param {HTMLElement} element
@param {String} eventType like ionic.Gestures.EVENT_MOVE
@param {Object} eventData | [
"collect",
"event",
"data",
"for",
"ionic",
".",
"Gestures",
"js"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L1032-L1079 |
13,464 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function() {
if (keyboardHasPlugin()) {
window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow );
window.removeEventListener('native.keyboardhide', keyboardFocusOut);
} else {
document.body.removeEventListener('focusout', keyboardFocusOut);
}
document.body.remov... | javascript | function() {
if (keyboardHasPlugin()) {
window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow );
window.removeEventListener('native.keyboardhide', keyboardFocusOut);
} else {
document.body.removeEventListener('focusout', keyboardFocusOut);
}
document.body.remov... | [
"function",
"(",
")",
"{",
"if",
"(",
"keyboardHasPlugin",
"(",
")",
")",
"{",
"window",
".",
"removeEventListener",
"(",
"'native.keyboardshow'",
",",
"debouncedKeyboardNativeShow",
")",
";",
"window",
".",
"removeEventListener",
"(",
"'native.keyboardhide'",
",",
... | Remove all keyboard related event listeners, effectively disabling Ionic's
keyboard adjustments. | [
"Remove",
"all",
"keyboard",
"related",
"event",
"listeners",
"effectively",
"disabling",
"Ionic",
"s",
"keyboard",
"adjustments",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3776-L3795 | |
13,465 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | keyboardNativeShow | function keyboardNativeShow(e) {
clearTimeout(keyboardFocusOutTimer);
//console.log("keyboardNativeShow fired at: " + Date.now());
//console.log("keyboardNativeshow window.innerHeight: " + window.innerHeight);
if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) {
ionic.keyboard.isOpening = true;
io... | javascript | function keyboardNativeShow(e) {
clearTimeout(keyboardFocusOutTimer);
//console.log("keyboardNativeShow fired at: " + Date.now());
//console.log("keyboardNativeshow window.innerHeight: " + window.innerHeight);
if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) {
ionic.keyboard.isOpening = true;
io... | [
"function",
"keyboardNativeShow",
"(",
"e",
")",
"{",
"clearTimeout",
"(",
"keyboardFocusOutTimer",
")",
";",
"//console.log(\"keyboardNativeShow fired at: \" + Date.now());",
"//console.log(\"keyboardNativeshow window.innerHeight: \" + window.innerHeight);",
"if",
"(",
"!",
"ionic",... | Event handler for 'native.keyboardshow' event, sets keyboard.height to the
reported height and keyboard.isOpening to true. Then calls
keyboardWaitForResize with keyboardShow or keyboardUpdateViewportHeight as
the callback depending on whether the event was triggered by a focusin or
an orientationchange. | [
"Event",
"handler",
"for",
"native",
".",
"keyboardshow",
"event",
"sets",
"keyboard",
".",
"height",
"to",
"the",
"reported",
"height",
"and",
"keyboard",
".",
"isOpening",
"to",
"true",
".",
"Then",
"calls",
"keyboardWaitForResize",
"with",
"keyboardShow",
"or... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3847-L3865 |
13,466 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | keyboardFocusOut | function keyboardFocusOut() {
clearTimeout(keyboardFocusOutTimer);
//console.log("keyboardFocusOut fired at: " + Date.now());
//console.log("keyboardFocusOut event type: " + e.type);
if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) {
ionic.keyboard.isClosing = true;
ionic.keyboard.isOpening = fal... | javascript | function keyboardFocusOut() {
clearTimeout(keyboardFocusOutTimer);
//console.log("keyboardFocusOut fired at: " + Date.now());
//console.log("keyboardFocusOut event type: " + e.type);
if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) {
ionic.keyboard.isClosing = true;
ionic.keyboard.isOpening = fal... | [
"function",
"keyboardFocusOut",
"(",
")",
"{",
"clearTimeout",
"(",
"keyboardFocusOutTimer",
")",
";",
"//console.log(\"keyboardFocusOut fired at: \" + Date.now());",
"//console.log(\"keyboardFocusOut event type: \" + e.type);",
"if",
"(",
"ionic",
".",
"keyboard",
".",
"isOpen",... | Event handler for 'focusout' events. Sets keyboard.isClosing to true and
calls keyboardWaitForResize with keyboardHide as the callback after a small
timeout. | [
"Event",
"handler",
"for",
"focusout",
"events",
".",
"Sets",
"keyboard",
".",
"isClosing",
"to",
"true",
"and",
"calls",
"keyboardWaitForResize",
"with",
"keyboardHide",
"as",
"the",
"callback",
"after",
"a",
"small",
"timeout",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3944-L3972 |
13,467 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | keyboardOrientationChange | function keyboardOrientationChange() {
//console.log("orientationchange fired at: " + Date.now());
//console.log("orientation was: " + (ionic.keyboard.isLandscape ? "landscape" : "portrait"));
// toggle orientation
ionic.keyboard.isLandscape = !ionic.keyboard.isLandscape;
// //console.log("now orientation is... | javascript | function keyboardOrientationChange() {
//console.log("orientationchange fired at: " + Date.now());
//console.log("orientation was: " + (ionic.keyboard.isLandscape ? "landscape" : "portrait"));
// toggle orientation
ionic.keyboard.isLandscape = !ionic.keyboard.isLandscape;
// //console.log("now orientation is... | [
"function",
"keyboardOrientationChange",
"(",
")",
"{",
"//console.log(\"orientationchange fired at: \" + Date.now());",
"//console.log(\"orientation was: \" + (ionic.keyboard.isLandscape ? \"landscape\" : \"portrait\"));",
"// toggle orientation",
"ionic",
".",
"keyboard",
".",
"isLandscape... | Event handler for 'orientationchange' events. If using the keyboard plugin
and the keyboard is open on Android, sets wasOrientationChange to true so
nativeShow can update the viewport height with an accurate keyboard height.
If the keyboard isn't open or keyboard plugin isn't being used,
waits for the window to resize ... | [
"Event",
"handler",
"for",
"orientationchange",
"events",
".",
"If",
"using",
"the",
"keyboard",
"plugin",
"and",
"the",
"keyboard",
"is",
"open",
"on",
"Android",
"sets",
"wasOrientationChange",
"to",
"true",
"so",
"nativeShow",
"can",
"update",
"the",
"viewpor... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3985-L4010 |
13,468 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | keyboardShow | function keyboardShow() {
ionic.keyboard.isOpen = true;
ionic.keyboard.isOpening = false;
var details = {
keyboardHeight: keyboardGetHeight(),
viewportHeight: keyboardCurrentViewportHeight
};
if (keyboardActiveElement) {
details.target = keyboardActiveElement;
var elementBounds = keyboardA... | javascript | function keyboardShow() {
ionic.keyboard.isOpen = true;
ionic.keyboard.isOpening = false;
var details = {
keyboardHeight: keyboardGetHeight(),
viewportHeight: keyboardCurrentViewportHeight
};
if (keyboardActiveElement) {
details.target = keyboardActiveElement;
var elementBounds = keyboardA... | [
"function",
"keyboardShow",
"(",
")",
"{",
"ionic",
".",
"keyboard",
".",
"isOpen",
"=",
"true",
";",
"ionic",
".",
"keyboard",
".",
"isOpening",
"=",
"false",
";",
"var",
"details",
"=",
"{",
"keyboardHeight",
":",
"keyboardGetHeight",
"(",
")",
",",
"v... | On keyboard open sets keyboard state to open, adds CSS to the body
indicating the keyboard is open and tells the scroll view to resize and
the currently focused input into view if necessary. | [
"On",
"keyboard",
"open",
"sets",
"keyboard",
"state",
"to",
"open",
"adds",
"CSS",
"to",
"the",
"body",
"indicating",
"the",
"keyboard",
"is",
"open",
"and",
"tells",
"the",
"scroll",
"view",
"to",
"resize",
"and",
"the",
"currently",
"focused",
"input",
... | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L4156-L4193 |
13,469 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function(touches, timeStamp) {
var self = this;
// remember if the deceleration was just stopped
self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);
self.hintResize();
if (timeStamp instanceof Date) {
timeStamp = timeStamp.valueOf();
}
if (typeof timeStamp !== "numb... | javascript | function(touches, timeStamp) {
var self = this;
// remember if the deceleration was just stopped
self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);
self.hintResize();
if (timeStamp instanceof Date) {
timeStamp = timeStamp.valueOf();
}
if (typeof timeStamp !== "numb... | [
"function",
"(",
"touches",
",",
"timeStamp",
")",
"{",
"var",
"self",
"=",
"this",
";",
"// remember if the deceleration was just stopped",
"self",
".",
"__decStopped",
"=",
"!",
"!",
"(",
"self",
".",
"__isDecelerating",
"||",
"self",
".",
"__isAnimating",
")"... | Touch start handler for scrolling support | [
"Touch",
"start",
"handler",
"for",
"scrolling",
"support"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L6199-L6281 | |
13,470 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function(left, top, animate) {
var self = this;
if (!animate) {
self.el.scrollTop = top;
self.el.scrollLeft = left;
self.resize();
return;
}
var oldOverflowX = self.el.style.overflowX;
var oldOverflowY = self.el.style.overflowY;
clearTimeout(self.__s... | javascript | function(left, top, animate) {
var self = this;
if (!animate) {
self.el.scrollTop = top;
self.el.scrollLeft = left;
self.resize();
return;
}
var oldOverflowX = self.el.style.overflowX;
var oldOverflowY = self.el.style.overflowY;
clearTimeout(self.__s... | [
"function",
"(",
"left",
",",
"top",
",",
"animate",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"!",
"animate",
")",
"{",
"self",
".",
"el",
".",
"scrollTop",
"=",
"top",
";",
"self",
".",
"el",
".",
"scrollLeft",
"=",
"left",
";",
"... | Scrolls to the given position in px.
@param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>
@param top {Number} Vertical scroll position, keeps current if value is <code>null</code>
@param animate {Boolean} Whether the scrolling should happen using an animation | [
"Scrolls",
"to",
"the",
"given",
"position",
"in",
"px",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L7204-L7277 | |
13,471 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function() {
this.el = this.listEl = this.scrollEl = this.scrollView = null;
// ensure no scrolls have been left frozen
if (this.isScrollFreeze) {
self.scrollView.freeze(false);
}
} | javascript | function() {
this.el = this.listEl = this.scrollEl = this.scrollView = null;
// ensure no scrolls have been left frozen
if (this.isScrollFreeze) {
self.scrollView.freeze(false);
}
} | [
"function",
"(",
")",
"{",
"this",
".",
"el",
"=",
"this",
".",
"listEl",
"=",
"this",
".",
"scrollEl",
"=",
"this",
".",
"scrollView",
"=",
"null",
";",
"// ensure no scrolls have been left frozen",
"if",
"(",
"this",
".",
"isScrollFreeze",
")",
"{",
"sel... | Be sure to cleanup references. | [
"Be",
"sure",
"to",
"cleanup",
"references",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L7984-L7991 | |
13,472 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function(isInstant) {
if (this._lastDragOp) {
this._lastDragOp.clean && this._lastDragOp.clean(isInstant);
this._lastDragOp.deregister && this._lastDragOp.deregister();
this._lastDragOp = null;
}
} | javascript | function(isInstant) {
if (this._lastDragOp) {
this._lastDragOp.clean && this._lastDragOp.clean(isInstant);
this._lastDragOp.deregister && this._lastDragOp.deregister();
this._lastDragOp = null;
}
} | [
"function",
"(",
"isInstant",
")",
"{",
"if",
"(",
"this",
".",
"_lastDragOp",
")",
"{",
"this",
".",
"_lastDragOp",
".",
"clean",
"&&",
"this",
".",
"_lastDragOp",
".",
"clean",
"(",
"isInstant",
")",
";",
"this",
".",
"_lastDragOp",
".",
"deregister",
... | Clear any active drag effects on the list. | [
"Clear",
"any",
"active",
"drag",
"effects",
"on",
"the",
"list",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L8052-L8058 | |
13,473 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | compilationGenerator | function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
var compiled;
if (eager) {
return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
}
return function lazyCompilation() {
... | javascript | function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
var compiled;
if (eager) {
return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
}
return function lazyCompilation() {
... | [
"function",
"compilationGenerator",
"(",
"eager",
",",
"$compileNodes",
",",
"transcludeFn",
",",
"maxPriority",
",",
"ignoreDirective",
",",
"previousCompileContext",
")",
"{",
"var",
"compiled",
";",
"if",
"(",
"eager",
")",
"{",
"return",
"compile",
"(",
"$co... | A function generator that is used to support both eager and lazy compilation
linking function.
@param eager
@param $compileNodes
@param transcludeFn
@param maxPriority
@param ignoreDirective
@param previousCompileContext
@returns {Function} | [
"A",
"function",
"generator",
"that",
"is",
"used",
"to",
"support",
"both",
"eager",
"and",
"lazy",
"compilation",
"linking",
"function",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L21912-L21928 |
13,474 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | roundNumber | function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {
var digits = parsedNumber.d;
var fractionLen = digits.length - parsedNumber.i;
// determine fractionSize if it is not specified; `+fractionSize` converts it to a number
fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(mi... | javascript | function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {
var digits = parsedNumber.d;
var fractionLen = digits.length - parsedNumber.i;
// determine fractionSize if it is not specified; `+fractionSize` converts it to a number
fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(mi... | [
"function",
"roundNumber",
"(",
"parsedNumber",
",",
"fractionSize",
",",
"minFrac",
",",
"maxFrac",
")",
"{",
"var",
"digits",
"=",
"parsedNumber",
".",
"d",
";",
"var",
"fractionLen",
"=",
"digits",
".",
"length",
"-",
"parsedNumber",
".",
"i",
";",
"// ... | Round the parsed number to the specified number of decimal places
This function changed the parsedNumber in-place | [
"Round",
"the",
"parsed",
"number",
"to",
"the",
"specified",
"number",
"of",
"decimal",
"places",
"This",
"function",
"changed",
"the",
"parsedNumber",
"in",
"-",
"place"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L33195-L33250 |
13,475 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function(scope, $element, attrs, ctrl, $transclude) {
var previousElement, previousScope;
scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {
if (previousElement) {
$animate.leave(previousElement);
}
if (previousScope) {
previousScope.$de... | javascript | function(scope, $element, attrs, ctrl, $transclude) {
var previousElement, previousScope;
scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {
if (previousElement) {
$animate.leave(previousElement);
}
if (previousScope) {
previousScope.$de... | [
"function",
"(",
"scope",
",",
"$element",
",",
"attrs",
",",
"ctrl",
",",
"$transclude",
")",
"{",
"var",
"previousElement",
",",
"previousScope",
";",
"scope",
".",
"$watchCollection",
"(",
"attrs",
".",
"ngAnimateSwap",
"||",
"attrs",
"[",
"'for'",
"]",
... | we use 600 here to ensure that the directive is caught before others | [
"we",
"use",
"600",
"here",
"to",
"ensure",
"that",
"the",
"directive",
"is",
"caught",
"before",
"others"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L47433-L47451 | |
13,476 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | run | function run() {
var template;
$ionicTemplateCache._runCount++;
hasRun = true;
// ignore if race condition already zeroed out array
if (toCache.length === 0) return;
var i = 0;
while (i < 4 && (template = toCache.pop())) {
// note that inline templates are ignored by this request
... | javascript | function run() {
var template;
$ionicTemplateCache._runCount++;
hasRun = true;
// ignore if race condition already zeroed out array
if (toCache.length === 0) return;
var i = 0;
while (i < 4 && (template = toCache.pop())) {
// note that inline templates are ignored by this request
... | [
"function",
"run",
"(",
")",
"{",
"var",
"template",
";",
"$ionicTemplateCache",
".",
"_runCount",
"++",
";",
"hasRun",
"=",
"true",
";",
"// ignore if race condition already zeroed out array",
"if",
"(",
"toCache",
".",
"length",
"===",
"0",
")",
"return",
";",... | run through methods - internal method | [
"run",
"through",
"methods",
"-",
"internal",
"method"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L57615-L57633 |
13,477 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | checkInfiniteBounds | function checkInfiniteBounds() {
if (self.isLoading) return;
var maxScroll = {};
if (self.jsScrolling) {
maxScroll = self.getJSMaxScroll();
var scrollValues = self.scrollView.getValues();
if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||
(maxScroll.top !== -1 &... | javascript | function checkInfiniteBounds() {
if (self.isLoading) return;
var maxScroll = {};
if (self.jsScrolling) {
maxScroll = self.getJSMaxScroll();
var scrollValues = self.scrollView.getValues();
if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||
(maxScroll.top !== -1 &... | [
"function",
"checkInfiniteBounds",
"(",
")",
"{",
"if",
"(",
"self",
".",
"isLoading",
")",
"return",
";",
"var",
"maxScroll",
"=",
"{",
"}",
";",
"if",
"(",
"self",
".",
"jsScrolling",
")",
"{",
"maxScroll",
"=",
"self",
".",
"getJSMaxScroll",
"(",
")... | check if we've scrolled far enough to trigger an infinite scroll | [
"check",
"if",
"we",
"ve",
"scrolled",
"far",
"enough",
"to",
"trigger",
"an",
"infinite",
"scroll"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L58934-L58957 |
13,478 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | calculateMaxValue | function calculateMaxValue(maximum) {
var distance = ($attrs.distance || '2.5%').trim();
var isPercent = distance.indexOf('%') !== -1;
return isPercent ?
maximum * (1 - parseFloat(distance) / 100) :
maximum - parseFloat(distance);
} | javascript | function calculateMaxValue(maximum) {
var distance = ($attrs.distance || '2.5%').trim();
var isPercent = distance.indexOf('%') !== -1;
return isPercent ?
maximum * (1 - parseFloat(distance) / 100) :
maximum - parseFloat(distance);
} | [
"function",
"calculateMaxValue",
"(",
"maximum",
")",
"{",
"var",
"distance",
"=",
"(",
"$attrs",
".",
"distance",
"||",
"'2.5%'",
")",
".",
"trim",
"(",
")",
";",
"var",
"isPercent",
"=",
"distance",
".",
"indexOf",
"(",
"'%'",
")",
"!==",
"-",
"1",
... | determine pixel refresh distance based on % or value | [
"determine",
"pixel",
"refresh",
"distance",
"based",
"on",
"%",
"or",
"value"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L58994-L59000 |
13,479 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function(newWidth, newHeight) {
var requiresRefresh = self.dataLength && newWidth && newHeight &&
(newWidth !== self.width || newHeight !== self.height);
self.width = newWidth;
self.height = newHeight;
return !!requiresRefresh;
} | javascript | function(newWidth, newHeight) {
var requiresRefresh = self.dataLength && newWidth && newHeight &&
(newWidth !== self.width || newHeight !== self.height);
self.width = newWidth;
self.height = newHeight;
return !!requiresRefresh;
} | [
"function",
"(",
"newWidth",
",",
"newHeight",
")",
"{",
"var",
"requiresRefresh",
"=",
"self",
".",
"dataLength",
"&&",
"newWidth",
"&&",
"newHeight",
"&&",
"(",
"newWidth",
"!==",
"self",
".",
"width",
"||",
"newHeight",
"!==",
"self",
".",
"height",
")"... | A resize triggers a refresh only if we have data, the scrollView has size, and the size has changed. | [
"A",
"resize",
"triggers",
"a",
"refresh",
"only",
"if",
"we",
"have",
"data",
"the",
"scrollView",
"has",
"size",
"and",
"the",
"size",
"has",
"changed",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L62226-L62234 | |
13,480 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/ionic1/www/lib/ionic/js/ionic.bundle.js | function(newData) {
var requiresRefresh = newData.length > 0 || newData.length < self.dataLength;
self.dataLength = newData.length;
return !!requiresRefresh;
} | javascript | function(newData) {
var requiresRefresh = newData.length > 0 || newData.length < self.dataLength;
self.dataLength = newData.length;
return !!requiresRefresh;
} | [
"function",
"(",
"newData",
")",
"{",
"var",
"requiresRefresh",
"=",
"newData",
".",
"length",
">",
"0",
"||",
"newData",
".",
"length",
"<",
"self",
".",
"dataLength",
";",
"self",
".",
"dataLength",
"=",
"newData",
".",
"length",
";",
"return",
"!",
... | A change in data only triggers a refresh if the data has length, or if the data's length is less than before. | [
"A",
"change",
"in",
"data",
"only",
"triggers",
"a",
"refresh",
"if",
"the",
"data",
"has",
"length",
"or",
"if",
"the",
"data",
"s",
"length",
"is",
"less",
"than",
"before",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L62237-L62243 | |
13,481 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | toggleElements | function toggleElements() {
// convert arguments to array
var args = Array.prototype.slice.call(arguments);
args.forEach(function(buttonId) {
var buttonEl = document.getElementById(buttonId);
if (buttonEl) {
var curDisplayStyle = buttonEl.style.display;
... | javascript | function toggleElements() {
// convert arguments to array
var args = Array.prototype.slice.call(arguments);
args.forEach(function(buttonId) {
var buttonEl = document.getElementById(buttonId);
if (buttonEl) {
var curDisplayStyle = buttonEl.style.display;
... | [
"function",
"toggleElements",
"(",
")",
"{",
"// convert arguments to array",
"var",
"args",
"=",
"Array",
".",
"prototype",
".",
"slice",
".",
"call",
"(",
"arguments",
")",
";",
"args",
".",
"forEach",
"(",
"function",
"(",
"buttonId",
")",
"{",
"var",
"... | Helper function that toggles visibility of DOM elements with provided ids
@param {String} variable number of elements' ids which visibility needs to be toggled | [
"Helper",
"function",
"that",
"toggles",
"visibility",
"of",
"DOM",
"elements",
"with",
"provided",
"ids"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L50-L60 |
13,482 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | startCameraPreview | function startCameraPreview(takeCallback, errorCallback, selectCallback, retakeCallback) {
// try to select appropriate device for capture
// rear camera is preferred option
var expectedPanel = Windows.Devices.Enumeration.Panel.back;
Windows.Devices.Enumeration.DeviceInformation.findAllA... | javascript | function startCameraPreview(takeCallback, errorCallback, selectCallback, retakeCallback) {
// try to select appropriate device for capture
// rear camera is preferred option
var expectedPanel = Windows.Devices.Enumeration.Panel.back;
Windows.Devices.Enumeration.DeviceInformation.findAllA... | [
"function",
"startCameraPreview",
"(",
"takeCallback",
",",
"errorCallback",
",",
"selectCallback",
",",
"retakeCallback",
")",
"{",
"// try to select appropriate device for capture",
"// rear camera is preferred option",
"var",
"expectedPanel",
"=",
"Windows",
".",
"Devices",
... | Starts camera preview and binds provided callbacks to controls
@param {function} takeCallback Callback for Take button
@param {function} errorCallback Callback for Cancel button + default error callback
@param {function} selectCallback Callback for Select button
@param {function} retakeCallback Callback for Reta... | [
"Starts",
"camera",
"preview",
"and",
"binds",
"provided",
"callbacks",
"to",
"controls"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L102-L144 |
13,483 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | destroyCameraPreview | function destroyCameraPreview() {
capturePreview.pause();
capturePreview.src = null;
if (previewContainer) {
document.body.removeChild(previewContainer);
}
if (capture) {
capture.stopRecordAsync();
capture = null;
}
} | javascript | function destroyCameraPreview() {
capturePreview.pause();
capturePreview.src = null;
if (previewContainer) {
document.body.removeChild(previewContainer);
}
if (capture) {
capture.stopRecordAsync();
capture = null;
}
} | [
"function",
"destroyCameraPreview",
"(",
")",
"{",
"capturePreview",
".",
"pause",
"(",
")",
";",
"capturePreview",
".",
"src",
"=",
"null",
";",
"if",
"(",
"previewContainer",
")",
"{",
"document",
".",
"body",
".",
"removeChild",
"(",
"previewContainer",
"... | Destroys camera preview, removes all elements created | [
"Destroys",
"camera",
"preview",
"removes",
"all",
"elements",
"created"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L149-L159 |
13,484 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | function (successCallback, errorCallback) {
try {
createCameraUI();
startCameraPreview(function () {
// This callback called twice: whem video capture started and when it ended
// so we need to check capture status
i... | javascript | function (successCallback, errorCallback) {
try {
createCameraUI();
startCameraPreview(function () {
// This callback called twice: whem video capture started and when it ended
// so we need to check capture status
i... | [
"function",
"(",
"successCallback",
",",
"errorCallback",
")",
"{",
"try",
"{",
"createCameraUI",
"(",
")",
";",
"startCameraPreview",
"(",
"function",
"(",
")",
"{",
"// This callback called twice: whem video capture started and when it ended",
"// so we need to check captur... | Initiate video capture using MediaCapture class
@param {function} successCallback Called, when user clicked on preview, with captured file object
@param {function} errorCallback Called on any error | [
"Initiate",
"video",
"capture",
"using",
"MediaCapture",
"class"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L167-L205 | |
13,485 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | function (successCallback, errorCallback) {
try {
createCameraUI();
startCameraPreview(
// Callback for Take button - captures intermediate image file.
function () {
var encodingProperties = Windows.Media.MediaPr... | javascript | function (successCallback, errorCallback) {
try {
createCameraUI();
startCameraPreview(
// Callback for Take button - captures intermediate image file.
function () {
var encodingProperties = Windows.Media.MediaPr... | [
"function",
"(",
"successCallback",
",",
"errorCallback",
")",
"{",
"try",
"{",
"createCameraUI",
"(",
")",
";",
"startCameraPreview",
"(",
"// Callback for Take button - captures intermediate image file.",
"function",
"(",
")",
"{",
"var",
"encodingProperties",
"=",
"W... | Initiate image capture using MediaCapture class
@param {function} successCallback Called, when user clicked on preview, with captured file object
@param {function} errorCallback Called on any error | [
"Initiate",
"image",
"capture",
"using",
"MediaCapture",
"class"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L212-L265 | |
13,486 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | function () {
var encodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createJpeg(),
overwriteCollisionOption = Windows.Storage.CreationCollisionOption.replaceExisting,
tempFolder = Windows.Storage.ApplicationData.curr... | javascript | function () {
var encodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createJpeg(),
overwriteCollisionOption = Windows.Storage.CreationCollisionOption.replaceExisting,
tempFolder = Windows.Storage.ApplicationData.curr... | [
"function",
"(",
")",
"{",
"var",
"encodingProperties",
"=",
"Windows",
".",
"Media",
".",
"MediaProperties",
".",
"ImageEncodingProperties",
".",
"createJpeg",
"(",
")",
",",
"overwriteCollisionOption",
"=",
"Windows",
".",
"Storage",
".",
"CreationCollisionOption"... | Callback for Take button - captures intermediate image file. | [
"Callback",
"for",
"Take",
"button",
"-",
"captures",
"intermediate",
"image",
"file",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L217-L237 | |
13,487 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js | function () {
var generateUniqueCollisionOption = Windows.Storage.CreationCollisionOption.generateUniqueName,
localFolder = Windows.Storage.ApplicationData.current.localFolder;
capturedPictureFile.copyAsync(localFolder, capturedPictureFile.nam... | javascript | function () {
var generateUniqueCollisionOption = Windows.Storage.CreationCollisionOption.generateUniqueName,
localFolder = Windows.Storage.ApplicationData.current.localFolder;
capturedPictureFile.copyAsync(localFolder, capturedPictureFile.nam... | [
"function",
"(",
")",
"{",
"var",
"generateUniqueCollisionOption",
"=",
"Windows",
".",
"Storage",
".",
"CreationCollisionOption",
".",
"generateUniqueName",
",",
"localFolder",
"=",
"Windows",
".",
"Storage",
".",
"ApplicationData",
".",
"current",
".",
"localFolde... | Callback for Select button - copies intermediate file into persistent application's storage | [
"Callback",
"for",
"Select",
"button",
"-",
"copies",
"intermediate",
"file",
"into",
"persistent",
"application",
"s",
"storage"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L244-L255 | |
13,488 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/beforePrepare.js | run | function run(context) {
const preferences = configPreferences.read(context);
const platforms = context.opts.cordova.platforms;
platforms.forEach(platform => {
if (platform === IOS) {
iosPlist.addBranchSettings(preferences);
iosCapabilities.enableAssociatedDomains(preferences);
... | javascript | function run(context) {
const preferences = configPreferences.read(context);
const platforms = context.opts.cordova.platforms;
platforms.forEach(platform => {
if (platform === IOS) {
iosPlist.addBranchSettings(preferences);
iosCapabilities.enableAssociatedDomains(preferences);
... | [
"function",
"run",
"(",
"context",
")",
"{",
"const",
"preferences",
"=",
"configPreferences",
".",
"read",
"(",
"context",
")",
";",
"const",
"platforms",
"=",
"context",
".",
"opts",
".",
"cordova",
".",
"platforms",
";",
"platforms",
".",
"forEach",
"("... | builds before platform config | [
"builds",
"before",
"platform",
"config"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/beforePrepare.js#L14-L25 |
13,489 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js | writePreferences | function writePreferences(context, preferences) {
// read manifest
const manifest = getManifest(context);
// update manifest
manifest.file = updateBranchMetaData(manifest.file, preferences);
manifest.file = updateBranchReferrerTracking(manifest.file);
manifest.file = updateLaunchOptionToSingleT... | javascript | function writePreferences(context, preferences) {
// read manifest
const manifest = getManifest(context);
// update manifest
manifest.file = updateBranchMetaData(manifest.file, preferences);
manifest.file = updateBranchReferrerTracking(manifest.file);
manifest.file = updateLaunchOptionToSingleT... | [
"function",
"writePreferences",
"(",
"context",
",",
"preferences",
")",
"{",
"// read manifest",
"const",
"manifest",
"=",
"getManifest",
"(",
"context",
")",
";",
"// update manifest",
"manifest",
".",
"file",
"=",
"updateBranchMetaData",
"(",
"manifest",
".",
"... | injects config.xml preferences into AndroidManifest.xml file. | [
"injects",
"config",
".",
"xml",
"preferences",
"into",
"AndroidManifest",
".",
"xml",
"file",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js#L13-L38 |
13,490 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js | getManifest | function getManifest(context) {
let pathToManifest;
let manifest;
try {
// cordova platform add [email protected]
pathToManifest = path.join(
context.opts.projectRoot,
"platforms",
"android",
"AndroidManifest.xml"
);
manifest = xmlHelper.readXmlAsJson(pat... | javascript | function getManifest(context) {
let pathToManifest;
let manifest;
try {
// cordova platform add [email protected]
pathToManifest = path.join(
context.opts.projectRoot,
"platforms",
"android",
"AndroidManifest.xml"
);
manifest = xmlHelper.readXmlAsJson(pat... | [
"function",
"getManifest",
"(",
"context",
")",
"{",
"let",
"pathToManifest",
";",
"let",
"manifest",
";",
"try",
"{",
"// cordova platform add [email protected]",
"pathToManifest",
"=",
"path",
".",
"join",
"(",
"context",
".",
"opts",
".",
"projectRoot",
",",
"\"p... | get AndroidManifest.xml information | [
"get",
"AndroidManifest",
".",
"xml",
"information"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js#L41-L83 |
13,491 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-file/www/FileWriter.js | function(file) {
this.fileName = "";
this.length = 0;
if (file) {
this.localURL = file.localURL || file;
this.length = file.size || 0;
}
// default is to write at the beginning of the file
this.position = 0;
this.readyState = 0; // EMPTY
this.result = null;
// Erro... | javascript | function(file) {
this.fileName = "";
this.length = 0;
if (file) {
this.localURL = file.localURL || file;
this.length = file.size || 0;
}
// default is to write at the beginning of the file
this.position = 0;
this.readyState = 0; // EMPTY
this.result = null;
// Erro... | [
"function",
"(",
"file",
")",
"{",
"this",
".",
"fileName",
"=",
"\"\"",
";",
"this",
".",
"length",
"=",
"0",
";",
"if",
"(",
"file",
")",
"{",
"this",
".",
"localURL",
"=",
"file",
".",
"localURL",
"||",
"file",
";",
"this",
".",
"length",
"=",... | This class writes to the mobile device file system.
For Android:
The root directory is the root of the file system.
To write to the SD card, the file name is "sdcard/my_file.txt"
@constructor
@param file {File} File object containing file properties
@param append if true write to the end of the file, otherwise overwr... | [
"This",
"class",
"writes",
"to",
"the",
"mobile",
"device",
"file",
"system",
"."
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-file/www/FileWriter.js#L37-L61 | |
13,492 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js | makeCallbackButton | function makeCallbackButton (labelIndex) {
return function () {
if (modalWindow) {
modalWindow.removeEventListener('unload', onUnload, false);
modalWindow.close();
}
// checking if prompt
var promptInput = modalDocument.getElementById... | javascript | function makeCallbackButton (labelIndex) {
return function () {
if (modalWindow) {
modalWindow.removeEventListener('unload', onUnload, false);
modalWindow.close();
}
// checking if prompt
var promptInput = modalDocument.getElementById... | [
"function",
"makeCallbackButton",
"(",
"labelIndex",
")",
"{",
"return",
"function",
"(",
")",
"{",
"if",
"(",
"modalWindow",
")",
"{",
"modalWindow",
".",
"removeEventListener",
"(",
"'unload'",
",",
"onUnload",
",",
"false",
")",
";",
"modalWindow",
".",
"... | call callback and destroy modal | [
"call",
"callback",
"and",
"destroy",
"modal"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js#L93-L111 |
13,493 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js | enableAssociatedDomains | function enableAssociatedDomains(preferences) {
const entitlementsFile = path.join(
preferences.projectRoot,
"platforms",
"ios",
preferences.projectName,
"Resources",
`${preferences.projectName}.entitlements`
);
activateAssociativeDomains(
preferences.iosProjectMod... | javascript | function enableAssociatedDomains(preferences) {
const entitlementsFile = path.join(
preferences.projectRoot,
"platforms",
"ios",
preferences.projectName,
"Resources",
`${preferences.projectName}.entitlements`
);
activateAssociativeDomains(
preferences.iosProjectMod... | [
"function",
"enableAssociatedDomains",
"(",
"preferences",
")",
"{",
"const",
"entitlementsFile",
"=",
"path",
".",
"join",
"(",
"preferences",
".",
"projectRoot",
",",
"\"platforms\"",
",",
"\"ios\"",
",",
"preferences",
".",
"projectName",
",",
"\"Resources\"",
... | updates the xcode preferences to allow associated domains | [
"updates",
"the",
"xcode",
"preferences",
"to",
"allow",
"associated",
"domains"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js#L16-L32 |
13,494 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js | activateAssociativeDomains | function activateAssociativeDomains(xcodeProject, entitlementsFile) {
const configurations = removeComments(
xcodeProject.pbxXCBuildConfigurationSection()
);
let config;
let buildSettings;
for (config in configurations) {
buildSettings = configurations[config].buildSettings;
build... | javascript | function activateAssociativeDomains(xcodeProject, entitlementsFile) {
const configurations = removeComments(
xcodeProject.pbxXCBuildConfigurationSection()
);
let config;
let buildSettings;
for (config in configurations) {
buildSettings = configurations[config].buildSettings;
build... | [
"function",
"activateAssociativeDomains",
"(",
"xcodeProject",
",",
"entitlementsFile",
")",
"{",
"const",
"configurations",
"=",
"removeComments",
"(",
"xcodeProject",
".",
"pbxXCBuildConfigurationSection",
"(",
")",
")",
";",
"let",
"config",
";",
"let",
"buildSetti... | adds entitlement files to the xcode project | [
"adds",
"entitlement",
"files",
"to",
"the",
"xcode",
"project"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js#L35-L57 |
13,495 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js | removeComments | function removeComments(obj) {
const keys = Object.keys(obj);
const newObj = {};
for (let i = 0, len = keys.length; i < len; i++) {
if (!COMMENT_KEY.test(keys[i])) {
newObj[keys[i]] = obj[keys[i]];
}
}
return newObj;
} | javascript | function removeComments(obj) {
const keys = Object.keys(obj);
const newObj = {};
for (let i = 0, len = keys.length; i < len; i++) {
if (!COMMENT_KEY.test(keys[i])) {
newObj[keys[i]] = obj[keys[i]];
}
}
return newObj;
} | [
"function",
"removeComments",
"(",
"obj",
")",
"{",
"const",
"keys",
"=",
"Object",
".",
"keys",
"(",
"obj",
")",
";",
"const",
"newObj",
"=",
"{",
"}",
";",
"for",
"(",
"let",
"i",
"=",
"0",
",",
"len",
"=",
"keys",
".",
"length",
";",
"i",
"<... | removes comments from .pbx file | [
"removes",
"comments",
"from",
".",
"pbx",
"file"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js#L89-L100 |
13,496 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js | install | function install(context) {
// set properties
const q = context.requireCordovaModule("q");
var async = new q.defer(); // eslint-disable-line
const installFlagLocation = path.join(
context.opts.projectRoot,
"plugins",
context.opts.plugin.id,
INSTALLFLAGNAME
);
const depend... | javascript | function install(context) {
// set properties
const q = context.requireCordovaModule("q");
var async = new q.defer(); // eslint-disable-line
const installFlagLocation = path.join(
context.opts.projectRoot,
"plugins",
context.opts.plugin.id,
INSTALLFLAGNAME
);
const depend... | [
"function",
"install",
"(",
"context",
")",
"{",
"// set properties",
"const",
"q",
"=",
"context",
".",
"requireCordovaModule",
"(",
"\"q\"",
")",
";",
"var",
"async",
"=",
"new",
"q",
".",
"defer",
"(",
")",
";",
"// eslint-disable-line",
"const",
"install... | install the node dependencies for Branch SDK | [
"install",
"the",
"node",
"dependencies",
"for",
"Branch",
"SDK"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js#L16-L49 |
13,497 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js | installNodeModules | function installNodeModules(modules, callback) {
// base case
if (modules.length <= 0) {
return callback();
}
// install one at a time
const module = modules.pop();
console.log(`BRANCH SDK: Installing node dependency ${module}`);
const install = `npm install --prefix ./plugins/${SDK}... | javascript | function installNodeModules(modules, callback) {
// base case
if (modules.length <= 0) {
return callback();
}
// install one at a time
const module = modules.pop();
console.log(`BRANCH SDK: Installing node dependency ${module}`);
const install = `npm install --prefix ./plugins/${SDK}... | [
"function",
"installNodeModules",
"(",
"modules",
",",
"callback",
")",
"{",
"// base case",
"if",
"(",
"modules",
".",
"length",
"<=",
"0",
")",
"{",
"return",
"callback",
"(",
")",
";",
"}",
"// install one at a time",
"const",
"module",
"=",
"modules",
".... | installs the node modules via npm install one at a time | [
"installs",
"the",
"node",
"modules",
"via",
"npm",
"install",
"one",
"at",
"a",
"time"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js#L52-L74 |
13,498 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js | getNodeModulesToInstall | function getNodeModulesToInstall(dependencies) {
const modules = [];
for (const module in dependencies) {
if (dependencies.hasOwnProperty(module)) {
try {
require(module);
} catch (err) {
modules.push(module);
}
}
}
return modules;
} | javascript | function getNodeModulesToInstall(dependencies) {
const modules = [];
for (const module in dependencies) {
if (dependencies.hasOwnProperty(module)) {
try {
require(module);
} catch (err) {
modules.push(module);
}
}
}
return modules;
} | [
"function",
"getNodeModulesToInstall",
"(",
"dependencies",
")",
"{",
"const",
"modules",
"=",
"[",
"]",
";",
"for",
"(",
"const",
"module",
"in",
"dependencies",
")",
"{",
"if",
"(",
"dependencies",
".",
"hasOwnProperty",
"(",
"module",
")",
")",
"{",
"tr... | checks to see which node modules need to be installed from package.json.dependencies | [
"checks",
"to",
"see",
"which",
"node",
"modules",
"need",
"to",
"be",
"installed",
"from",
"package",
".",
"json",
".",
"dependencies"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js#L77-L89 |
13,499 | BranchMetrics/cordova-ionic-phonegap-branch-deep-linking | examples/phonegap1/plugins/cordova-plugin-camera/src/blackberry10/index.js | showCameraDialog | function showCameraDialog (done, cancel, fail) {
var wv = qnx.webplatform.createWebView(function () {
wv.url = 'local:///chrome/camera.html';
wv.allowQnxObject = true;
wv.allowRpc = true;
wv.zOrder = 1;
wv.setGeometry(0, 0, screen.width, screen.height);
wv.backgroundC... | javascript | function showCameraDialog (done, cancel, fail) {
var wv = qnx.webplatform.createWebView(function () {
wv.url = 'local:///chrome/camera.html';
wv.allowQnxObject = true;
wv.allowRpc = true;
wv.zOrder = 1;
wv.setGeometry(0, 0, screen.width, screen.height);
wv.backgroundC... | [
"function",
"showCameraDialog",
"(",
"done",
",",
"cancel",
",",
"fail",
")",
"{",
"var",
"wv",
"=",
"qnx",
".",
"webplatform",
".",
"createWebView",
"(",
"function",
"(",
")",
"{",
"wv",
".",
"url",
"=",
"'local:///chrome/camera.html'",
";",
"wv",
".",
... | open a webview with getUserMedia camera card implementation when camera card not available | [
"open",
"a",
"webview",
"with",
"getUserMedia",
"camera",
"card",
"implementation",
"when",
"camera",
"card",
"not",
"available"
] | 252f591fcc833ac9fe7fb0f535d351e0879a873c | https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-camera/src/blackberry10/index.js#L51-L86 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.