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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
12,500 | laverdet/node-fibers | build.js | afterBuild | function afterBuild() {
var targetPath = path.join(__dirname, 'build', debug ? 'Debug' : 'Release', 'fibers.node');
var installPath = path.join(__dirname, 'bin', modPath, 'fibers.node');
try {
fs.mkdirSync(path.join(__dirname, 'bin', modPath));
} catch (ex) {}
try {
fs.statSync(targetPath);
} catch (ex) {
... | javascript | function afterBuild() {
var targetPath = path.join(__dirname, 'build', debug ? 'Debug' : 'Release', 'fibers.node');
var installPath = path.join(__dirname, 'bin', modPath, 'fibers.node');
try {
fs.mkdirSync(path.join(__dirname, 'bin', modPath));
} catch (ex) {}
try {
fs.statSync(targetPath);
} catch (ex) {
... | [
"function",
"afterBuild",
"(",
")",
"{",
"var",
"targetPath",
"=",
"path",
".",
"join",
"(",
"__dirname",
",",
"'build'",
",",
"debug",
"?",
"'Debug'",
":",
"'Release'",
",",
"'fibers.node'",
")",
";",
"var",
"installPath",
"=",
"path",
".",
"join",
"(",... | Move it to expected location | [
"Move",
"it",
"to",
"expected",
"location"
] | 5c24f960bc8d2a5a4e1aaf5de5ded3587566a86f | https://github.com/laverdet/node-fibers/blob/5c24f960bc8d2a5a4e1aaf5de5ded3587566a86f/build.js#L89-L110 |
12,501 | zhanziyang/vue-croppa | docs/static/kute-page_files/common.d313593452690288a963.js | isArray | function isArray (arr) {
return Array.isArray
? Array.isArray(arr)
: Object.prototype.toString.call(arr) === '[object Array]'
} | javascript | function isArray (arr) {
return Array.isArray
? Array.isArray(arr)
: Object.prototype.toString.call(arr) === '[object Array]'
} | [
"function",
"isArray",
"(",
"arr",
")",
"{",
"return",
"Array",
".",
"isArray",
"?",
"Array",
".",
"isArray",
"(",
"arr",
")",
":",
"Object",
".",
"prototype",
".",
"toString",
".",
"call",
"(",
"arr",
")",
"===",
"'[object Array]'",
"}"
] | checks if passed argument is an array
@param {any} arr - the object to check
@return {Boolean} - true if `arr` is an array | [
"checks",
"if",
"passed",
"argument",
"is",
"an",
"array"
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/common.d313593452690288a963.js#L338-L342 |
12,502 | zhanziyang/vue-croppa | docs/static/kute-page_files/common.d313593452690288a963.js | function (info) { return Object.keys(info).reduce(function (escaped, key) {
var ref = info.__dangerouslyDisableSanitizers;
var isDisabled = ref && ref.indexOf(key) > -1;
var val = info[key];
escaped[key] = val;
if (key === '__dangerouslyDisableSanitizers') {
return escaped
}
... | javascript | function (info) { return Object.keys(info).reduce(function (escaped, key) {
var ref = info.__dangerouslyDisableSanitizers;
var isDisabled = ref && ref.indexOf(key) > -1;
var val = info[key];
escaped[key] = val;
if (key === '__dangerouslyDisableSanitizers') {
return escaped
}
... | [
"function",
"(",
"info",
")",
"{",
"return",
"Object",
".",
"keys",
"(",
"info",
")",
".",
"reduce",
"(",
"function",
"(",
"escaped",
",",
"key",
")",
"{",
"var",
"ref",
"=",
"info",
".",
"__dangerouslyDisableSanitizers",
";",
"var",
"isDisabled",
"=",
... | sanitizes potentially dangerous characters | [
"sanitizes",
"potentially",
"dangerous",
"characters"
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/common.d313593452690288a963.js#L498-L521 | |
12,503 | zhanziyang/vue-croppa | docs/static/kute-page_files/common.d313593452690288a963.js | VueMeta | function VueMeta (Vue, options) {
if ( options === void 0 ) options = {};
// set some default options
var defaultOptions = {
keyName: VUE_META_KEY_NAME,
attribute: VUE_META_ATTRIBUTE,
ssrAttribute: VUE_META_SERVER_RENDERED_ATTRIBUTE,
tagIDKeyName: VUE_META_TAG_LIST_ID_KEY_NAME
};
// combine o... | javascript | function VueMeta (Vue, options) {
if ( options === void 0 ) options = {};
// set some default options
var defaultOptions = {
keyName: VUE_META_KEY_NAME,
attribute: VUE_META_ATTRIBUTE,
ssrAttribute: VUE_META_SERVER_RENDERED_ATTRIBUTE,
tagIDKeyName: VUE_META_TAG_LIST_ID_KEY_NAME
};
// combine o... | [
"function",
"VueMeta",
"(",
"Vue",
",",
"options",
")",
"{",
"if",
"(",
"options",
"===",
"void",
"0",
")",
"options",
"=",
"{",
"}",
";",
"// set some default options",
"var",
"defaultOptions",
"=",
"{",
"keyName",
":",
"VUE_META_KEY_NAME",
",",
"attribute"... | Plugin install function.
@param {Function} Vue - the Vue constructor. | [
"Plugin",
"install",
"function",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/common.d313593452690288a963.js#L979-L1067 |
12,504 | zhanziyang/vue-croppa | docs/static/kute-page_files/common.d313593452690288a963.js | encodeURIComponentPretty | function encodeURIComponentPretty (str) {
return encodeURI(str).replace(/[\/?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
} | javascript | function encodeURIComponentPretty (str) {
return encodeURI(str).replace(/[\/?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
} | [
"function",
"encodeURIComponentPretty",
"(",
"str",
")",
"{",
"return",
"encodeURI",
"(",
"str",
")",
".",
"replace",
"(",
"/",
"[\\/?#]",
"/",
"g",
",",
"function",
"(",
"c",
")",
"{",
"return",
"'%'",
"+",
"c",
".",
"charCodeAt",
"(",
"0",
")",
"."... | Prettier encoding of URI path segments.
@param {string}
@return {string} | [
"Prettier",
"encoding",
"of",
"URI",
"path",
"segments",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/common.d313593452690288a963.js#L1808-L1812 |
12,505 | zhanziyang/vue-croppa | docs/static/kute-page_files/app.e653d17f57bebeb097ee.js | ansiHTML | function ansiHTML (text) {
// Returns the text if the string has no ANSI escape code.
if (!_regANSI.test(text)) {
return text
}
// Cache opened sequence.
var ansiCodes = []
// Replace with markup.
var ret = text.replace(/\033\[(\d+)*m/g, function (match, seq) {
var ot = _openTags[seq]
if (ot)... | javascript | function ansiHTML (text) {
// Returns the text if the string has no ANSI escape code.
if (!_regANSI.test(text)) {
return text
}
// Cache opened sequence.
var ansiCodes = []
// Replace with markup.
var ret = text.replace(/\033\[(\d+)*m/g, function (match, seq) {
var ot = _openTags[seq]
if (ot)... | [
"function",
"ansiHTML",
"(",
"text",
")",
"{",
"// Returns the text if the string has no ANSI escape code.",
"if",
"(",
"!",
"_regANSI",
".",
"test",
"(",
"text",
")",
")",
"{",
"return",
"text",
"}",
"// Cache opened sequence.",
"var",
"ansiCodes",
"=",
"[",
"]",... | Converts text with ANSI color codes to HTML markup.
@param {String} text
@returns {*} | [
"Converts",
"text",
"with",
"ANSI",
"color",
"codes",
"to",
"HTML",
"markup",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/app.e653d17f57bebeb097ee.js#L2808-L2844 |
12,506 | zhanziyang/vue-croppa | docs/static/kute-page_files/app.e653d17f57bebeb097ee.js | race$1 | function race$1(entries) {
/*jshint validthis:true */
var Constructor = this;
if (!isArray(entries)) {
return new Constructor(function (_, reject) {
return reject(new TypeError('You must pass an array to race.'));
});
} else {
return new Constructor(function (resolve, reject) {
var leng... | javascript | function race$1(entries) {
/*jshint validthis:true */
var Constructor = this;
if (!isArray(entries)) {
return new Constructor(function (_, reject) {
return reject(new TypeError('You must pass an array to race.'));
});
} else {
return new Constructor(function (resolve, reject) {
var leng... | [
"function",
"race$1",
"(",
"entries",
")",
"{",
"/*jshint validthis:true */",
"var",
"Constructor",
"=",
"this",
";",
"if",
"(",
"!",
"isArray",
"(",
"entries",
")",
")",
"{",
"return",
"new",
"Constructor",
"(",
"function",
"(",
"_",
",",
"reject",
")",
... | `Promise.race` returns a new promise which is settled in the same way as the
first passed promise to settle.
Example:
```javascript
let promise1 = new Promise(function(resolve, reject){
setTimeout(function(){
resolve('promise 1');
}, 200);
});
let promise2 = new Promise(function(resolve, reject){
setTimeout(function... | [
"Promise",
".",
"race",
"returns",
"a",
"new",
"promise",
"which",
"is",
"settled",
"in",
"the",
"same",
"way",
"as",
"the",
"first",
"passed",
"promise",
"to",
"settle",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/app.e653d17f57bebeb097ee.js#L7301-L7317 |
12,507 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | arrayEachRight | function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
} | javascript | function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
} | [
"function",
"arrayEachRight",
"(",
"array",
",",
"iteratee",
")",
"{",
"var",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"while",
"(",
"length",
"--",
")",
"{",
"if",
"(",
"iteratee",
"(",
"array",
"[",
"length"... | A specialized version of `_.forEachRight` for arrays without support for
iteratee shorthands.
@private
@param {Array} [array] The array to iterate over.
@param {Function} iteratee The function invoked per iteration.
@returns {Array} Returns `array`. | [
"A",
"specialized",
"version",
"of",
"_",
".",
"forEachRight",
"for",
"arrays",
"without",
"support",
"for",
"iteratee",
"shorthands",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L660-L669 |
12,508 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | arrayEvery | function arrayEvery(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
} | javascript | function arrayEvery(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
} | [
"function",
"arrayEvery",
"(",
"array",
",",
"predicate",
")",
"{",
"var",
"index",
"=",
"-",
"1",
",",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"while",
"(",
"++",
"index",
"<",
"length",
")",
"{",
"if",
... | A specialized version of `_.every` for arrays without support for
iteratee shorthands.
@private
@param {Array} [array] The array to iterate over.
@param {Function} predicate The function invoked per iteration.
@returns {boolean} Returns `true` if all elements pass the predicate check,
else `false`. | [
"A",
"specialized",
"version",
"of",
"_",
".",
"every",
"for",
"arrays",
"without",
"support",
"for",
"iteratee",
"shorthands",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L681-L691 |
12,509 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseFindKey | function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) {
result = key;
return false;
}
});
return result;
} | javascript | function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) {
result = key;
return false;
}
});
return result;
} | [
"function",
"baseFindKey",
"(",
"collection",
",",
"predicate",
",",
"eachFunc",
")",
"{",
"var",
"result",
";",
"eachFunc",
"(",
"collection",
",",
"function",
"(",
"value",
",",
"key",
",",
"collection",
")",
"{",
"if",
"(",
"predicate",
"(",
"value",
... | The base implementation of methods like `_.findKey` and `_.findLastKey`,
without support for iteratee shorthands, which iterates over `collection`
using `eachFunc`.
@private
@param {Array|Object} collection The collection to inspect.
@param {Function} predicate The function invoked per iteration.
@param {Function} eac... | [
"The",
"base",
"implementation",
"of",
"methods",
"like",
"_",
".",
"findKey",
"and",
"_",
".",
"findLastKey",
"without",
"support",
"for",
"iteratee",
"shorthands",
"which",
"iterates",
"over",
"collection",
"using",
"eachFunc",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L903-L912 |
12,510 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseIndexOfWith | function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
return index;
}
}
return -1;
} | javascript | function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
return index;
}
}
return -1;
} | [
"function",
"baseIndexOfWith",
"(",
"array",
",",
"value",
",",
"fromIndex",
",",
"comparator",
")",
"{",
"var",
"index",
"=",
"fromIndex",
"-",
"1",
",",
"length",
"=",
"array",
".",
"length",
";",
"while",
"(",
"++",
"index",
"<",
"length",
")",
"{",... | This function is like `baseIndexOf` except that it accepts a comparator.
@private
@param {Array} array The array to inspect.
@param {*} value The value to search for.
@param {number} fromIndex The index to search from.
@param {Function} comparator The comparator invoked per element.
@returns {number} Returns the index... | [
"This",
"function",
"is",
"like",
"baseIndexOf",
"except",
"that",
"it",
"accepts",
"a",
"comparator",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L962-L972 |
12,511 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | charsStartIndex | function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
} | javascript | function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
} | [
"function",
"charsStartIndex",
"(",
"strSymbols",
",",
"chrSymbols",
")",
"{",
"var",
"index",
"=",
"-",
"1",
",",
"length",
"=",
"strSymbols",
".",
"length",
";",
"while",
"(",
"++",
"index",
"<",
"length",
"&&",
"baseIndexOf",
"(",
"chrSymbols",
",",
"... | Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
that is not found in the character symbols.
@private
@param {Array} strSymbols The string symbols to inspect.
@param {Array} chrSymbols The character symbols to find.
@returns {number} Returns the index of the first unmatched string symbol. | [
"Used",
"by",
"_",
".",
"trim",
"and",
"_",
".",
"trimStart",
"to",
"get",
"the",
"index",
"of",
"the",
"first",
"string",
"symbol",
"that",
"is",
"not",
"found",
"in",
"the",
"character",
"symbols",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L1174-L1180 |
12,512 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | charsEndIndex | function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
} | javascript | function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
} | [
"function",
"charsEndIndex",
"(",
"strSymbols",
",",
"chrSymbols",
")",
"{",
"var",
"index",
"=",
"strSymbols",
".",
"length",
";",
"while",
"(",
"index",
"--",
"&&",
"baseIndexOf",
"(",
"chrSymbols",
",",
"strSymbols",
"[",
"index",
"]",
",",
"0",
")",
... | Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
that is not found in the character symbols.
@private
@param {Array} strSymbols The string symbols to inspect.
@param {Array} chrSymbols The character symbols to find.
@returns {number} Returns the index of the last unmatched string symbol. | [
"Used",
"by",
"_",
".",
"trim",
"and",
"_",
".",
"trimEnd",
"to",
"get",
"the",
"index",
"of",
"the",
"last",
"string",
"symbol",
"that",
"is",
"not",
"found",
"in",
"the",
"character",
"symbols",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L1191-L1196 |
12,513 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | setToPairs | function setToPairs(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = [value, value];
});
return result;
} | javascript | function setToPairs(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = [value, value];
});
return result;
} | [
"function",
"setToPairs",
"(",
"set",
")",
"{",
"var",
"index",
"=",
"-",
"1",
",",
"result",
"=",
"Array",
"(",
"set",
".",
"size",
")",
";",
"set",
".",
"forEach",
"(",
"function",
"(",
"value",
")",
"{",
"result",
"[",
"++",
"index",
"]",
"=",... | Converts `set` to its value-value pairs.
@private
@param {Object} set The set to convert.
@returns {Array} Returns the value-value pairs. | [
"Converts",
"set",
"to",
"its",
"value",
"-",
"value",
"pairs",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L1379-L1387 |
12,514 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | lazyClone | function lazyClone() {
var result = new LazyWrapper(this.__wrapped__);
result.__actions__ = copyArray(this.__actions__);
result.__dir__ = this.__dir__;
result.__filtered__ = this.__filtered__;
result.__iteratees__ = copyArray(this.__iteratees__);
result.__takeCount__ = this.__takeCou... | javascript | function lazyClone() {
var result = new LazyWrapper(this.__wrapped__);
result.__actions__ = copyArray(this.__actions__);
result.__dir__ = this.__dir__;
result.__filtered__ = this.__filtered__;
result.__iteratees__ = copyArray(this.__iteratees__);
result.__takeCount__ = this.__takeCou... | [
"function",
"lazyClone",
"(",
")",
"{",
"var",
"result",
"=",
"new",
"LazyWrapper",
"(",
"this",
".",
"__wrapped__",
")",
";",
"result",
".",
"__actions__",
"=",
"copyArray",
"(",
"this",
".",
"__actions__",
")",
";",
"result",
".",
"__dir__",
"=",
"this... | Creates a clone of the lazy wrapper object.
@private
@name clone
@memberOf LazyWrapper
@returns {Object} Returns the cloned `LazyWrapper` object. | [
"Creates",
"a",
"clone",
"of",
"the",
"lazy",
"wrapper",
"object",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L1931-L1940 |
12,515 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | arraySampleSize | function arraySampleSize(array, n) {
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
} | javascript | function arraySampleSize(array, n) {
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
} | [
"function",
"arraySampleSize",
"(",
"array",
",",
"n",
")",
"{",
"return",
"shuffleSelf",
"(",
"copyArray",
"(",
"array",
")",
",",
"baseClamp",
"(",
"n",
",",
"0",
",",
"array",
".",
"length",
")",
")",
";",
"}"
] | A specialized version of `_.sampleSize` for arrays.
@private
@param {Array} array The array to sample.
@param {number} n The number of elements to sample.
@returns {Array} Returns the random elements. | [
"A",
"specialized",
"version",
"of",
"_",
".",
"sampleSize",
"for",
"arrays",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L2558-L2560 |
12,516 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseConforms | function baseConforms(source) {
var props = keys(source);
return function(object) {
return baseConformsTo(object, source, props);
};
} | javascript | function baseConforms(source) {
var props = keys(source);
return function(object) {
return baseConformsTo(object, source, props);
};
} | [
"function",
"baseConforms",
"(",
"source",
")",
"{",
"var",
"props",
"=",
"keys",
"(",
"source",
")",
";",
"return",
"function",
"(",
"object",
")",
"{",
"return",
"baseConformsTo",
"(",
"object",
",",
"source",
",",
"props",
")",
";",
"}",
";",
"}"
] | The base implementation of `_.conforms` which doesn't clone `source`.
@private
@param {Object} source The object of property predicates to conform to.
@returns {Function} Returns the new spec function. | [
"The",
"base",
"implementation",
"of",
"_",
".",
"conforms",
"which",
"doesn",
"t",
"clone",
"source",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L2821-L2826 |
12,517 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseConformsTo | function baseConformsTo(object, source, props) {
var length = props.length;
if (object == null) {
return !length;
}
object = Object(object);
while (length--) {
var key = props[length],
predicate = source[key],
value = object[key];
if ((value... | javascript | function baseConformsTo(object, source, props) {
var length = props.length;
if (object == null) {
return !length;
}
object = Object(object);
while (length--) {
var key = props[length],
predicate = source[key],
value = object[key];
if ((value... | [
"function",
"baseConformsTo",
"(",
"object",
",",
"source",
",",
"props",
")",
"{",
"var",
"length",
"=",
"props",
".",
"length",
";",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"return",
"!",
"length",
";",
"}",
"object",
"=",
"Object",
"(",
"obje... | The base implementation of `_.conformsTo` which accepts `props` to check.
@private
@param {Object} object The object to inspect.
@param {Object} source The object of property predicates to conform to.
@returns {boolean} Returns `true` if `object` conforms, else `false`. | [
"The",
"base",
"implementation",
"of",
"_",
".",
"conformsTo",
"which",
"accepts",
"props",
"to",
"check",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L2836-L2852 |
12,518 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseFill | function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = (end === undefined || end > length) ? length : toInteger(end);
if (end < 0) {
end += length;
... | javascript | function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = (end === undefined || end > length) ? length : toInteger(end);
if (end < 0) {
end += length;
... | [
"function",
"baseFill",
"(",
"array",
",",
"value",
",",
"start",
",",
"end",
")",
"{",
"var",
"length",
"=",
"array",
".",
"length",
";",
"start",
"=",
"toInteger",
"(",
"start",
")",
";",
"if",
"(",
"start",
"<",
"0",
")",
"{",
"start",
"=",
"-... | The base implementation of `_.fill` without an iteratee call guard.
@private
@param {Array} array The array to fill.
@param {*} value The value to fill `array` with.
@param {number} [start=0] The start position.
@param {number} [end=array.length] The end position.
@returns {Array} Returns `array`. | [
"The",
"base",
"implementation",
"of",
"_",
".",
"fill",
"without",
"an",
"iteratee",
"call",
"guard",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L3004-L3020 |
12,519 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseInverter | function baseInverter(object, setter, iteratee, accumulator) {
baseForOwn(object, function(value, key, object) {
setter(accumulator, iteratee(value), key, object);
});
return accumulator;
} | javascript | function baseInverter(object, setter, iteratee, accumulator) {
baseForOwn(object, function(value, key, object) {
setter(accumulator, iteratee(value), key, object);
});
return accumulator;
} | [
"function",
"baseInverter",
"(",
"object",
",",
"setter",
",",
"iteratee",
",",
"accumulator",
")",
"{",
"baseForOwn",
"(",
"object",
",",
"function",
"(",
"value",
",",
"key",
",",
"object",
")",
"{",
"setter",
"(",
"accumulator",
",",
"iteratee",
"(",
... | The base implementation of `_.invert` and `_.invertBy` which inverts
`object` with values transformed by `iteratee` and set by `setter`.
@private
@param {Object} object The object to iterate over.
@param {Function} setter The function to set `accumulator` values.
@param {Function} iteratee The iteratee to transform va... | [
"The",
"base",
"implementation",
"of",
"_",
".",
"invert",
"and",
"_",
".",
"invertBy",
"which",
"inverts",
"object",
"with",
"values",
"transformed",
"by",
"iteratee",
"and",
"set",
"by",
"setter",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L3314-L3319 |
12,520 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | basePullAt | function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splic... | javascript | function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splic... | [
"function",
"basePullAt",
"(",
"array",
",",
"indexes",
")",
"{",
"var",
"length",
"=",
"array",
"?",
"indexes",
".",
"length",
":",
"0",
",",
"lastIndex",
"=",
"length",
"-",
"1",
";",
"while",
"(",
"length",
"--",
")",
"{",
"var",
"index",
"=",
"... | The base implementation of `_.pullAt` without support for individual
indexes or capturing the removed elements.
@private
@param {Array} array The array to modify.
@param {number[]} indexes The indexes of elements to remove.
@returns {Array} Returns `array`. | [
"The",
"base",
"implementation",
"of",
"_",
".",
"pullAt",
"without",
"support",
"for",
"individual",
"indexes",
"or",
"capturing",
"the",
"removed",
"elements",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L3955-L3971 |
12,521 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseRepeat | function baseRepeat(string, n) {
var result = '';
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
return result;
}
// Leverage the exponentiation by squaring algorithm for a faster repeat.
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
do {
... | javascript | function baseRepeat(string, n) {
var result = '';
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
return result;
}
// Leverage the exponentiation by squaring algorithm for a faster repeat.
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
do {
... | [
"function",
"baseRepeat",
"(",
"string",
",",
"n",
")",
"{",
"var",
"result",
"=",
"''",
";",
"if",
"(",
"!",
"string",
"||",
"n",
"<",
"1",
"||",
"n",
">",
"MAX_SAFE_INTEGER",
")",
"{",
"return",
"result",
";",
"}",
"// Leverage the exponentiation by sq... | The base implementation of `_.repeat` which doesn't coerce arguments.
@private
@param {string} string The string to repeat.
@param {number} n The number of times to repeat the string.
@returns {string} Returns the repeated string. | [
"The",
"base",
"implementation",
"of",
"_",
".",
"repeat",
"which",
"doesn",
"t",
"coerce",
"arguments",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L4017-L4035 |
12,522 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseSampleSize | function baseSampleSize(collection, n) {
var array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
} | javascript | function baseSampleSize(collection, n) {
var array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
} | [
"function",
"baseSampleSize",
"(",
"collection",
",",
"n",
")",
"{",
"var",
"array",
"=",
"values",
"(",
"collection",
")",
";",
"return",
"shuffleSelf",
"(",
"array",
",",
"baseClamp",
"(",
"n",
",",
"0",
",",
"array",
".",
"length",
")",
")",
";",
... | The base implementation of `_.sampleSize` without param guards.
@private
@param {Array|Object} collection The collection to sample.
@param {number} n The number of elements to sample.
@returns {Array} Returns the random elements. | [
"The",
"base",
"implementation",
"of",
"_",
".",
"sampleSize",
"without",
"param",
"guards",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L4068-L4071 |
12,523 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseSortedIndex | function baseSortedIndex(array, value, retHighest) {
var low = 0,
high = array == null ? low : array.length;
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = (low + high) >>> 1,
computed = array[mid]... | javascript | function baseSortedIndex(array, value, retHighest) {
var low = 0,
high = array == null ? low : array.length;
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = (low + high) >>> 1,
computed = array[mid]... | [
"function",
"baseSortedIndex",
"(",
"array",
",",
"value",
",",
"retHighest",
")",
"{",
"var",
"low",
"=",
"0",
",",
"high",
"=",
"array",
"==",
"null",
"?",
"low",
":",
"array",
".",
"length",
";",
"if",
"(",
"typeof",
"value",
"==",
"'number'",
"&&... | The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
performs a binary search of `array` to determine the index at which `value`
should be inserted into `array` in order to maintain its sort order.
@private
@param {Array} array The sorted array to inspect.
@param {*} value The value to evaluate.
@p... | [
"The",
"base",
"implementation",
"of",
"_",
".",
"sortedIndex",
"and",
"_",
".",
"sortedLastIndex",
"which",
"performs",
"a",
"binary",
"search",
"of",
"array",
"to",
"determine",
"the",
"index",
"at",
"which",
"value",
"should",
"be",
"inserted",
"into",
"a... | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L4215-L4234 |
12,524 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | baseUpdate | function baseUpdate(object, path, updater, customizer) {
return baseSet(object, path, updater(baseGet(object, path)), customizer);
} | javascript | function baseUpdate(object, path, updater, customizer) {
return baseSet(object, path, updater(baseGet(object, path)), customizer);
} | [
"function",
"baseUpdate",
"(",
"object",
",",
"path",
",",
"updater",
",",
"customizer",
")",
"{",
"return",
"baseSet",
"(",
"object",
",",
"path",
",",
"updater",
"(",
"baseGet",
"(",
"object",
",",
"path",
")",
")",
",",
"customizer",
")",
";",
"}"
] | The base implementation of `_.update`.
@private
@param {Object} object The object to modify.
@param {Array|string} path The path of the property to update.
@param {Function} updater The function to produce the updated value.
@param {Function} [customizer] The function to customize path creation.
@returns {Object} Retu... | [
"The",
"base",
"implementation",
"of",
"_",
".",
"update",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L4443-L4445 |
12,525 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | createBind | function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return w... | javascript | function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return w... | [
"function",
"createBind",
"(",
"func",
",",
"bitmask",
",",
"thisArg",
")",
"{",
"var",
"isBind",
"=",
"bitmask",
"&",
"WRAP_BIND_FLAG",
",",
"Ctor",
"=",
"createCtor",
"(",
"func",
")",
";",
"function",
"wrapper",
"(",
")",
"{",
"var",
"fn",
"=",
"(",... | Creates a function that wraps `func` to invoke it with the optional `this`
binding of `thisArg`.
@private
@param {Function} func The function to wrap.
@param {number} bitmask The bitmask flags. See `createWrap` for more details.
@param {*} [thisArg] The `this` binding of `func`.
@returns {Function} Returns the new wra... | [
"Creates",
"a",
"function",
"that",
"wraps",
"func",
"to",
"invoke",
"it",
"with",
"the",
"optional",
"this",
"binding",
"of",
"thisArg",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L5069-L5078 |
12,526 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | createRelationalOperation | function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
} | javascript | function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
} | [
"function",
"createRelationalOperation",
"(",
"operator",
")",
"{",
"return",
"function",
"(",
"value",
",",
"other",
")",
"{",
"if",
"(",
"!",
"(",
"typeof",
"value",
"==",
"'string'",
"&&",
"typeof",
"other",
"==",
"'string'",
")",
")",
"{",
"value",
"... | Creates a function that performs a relational operation on two values.
@private
@param {Function} operator The function to perform the operation.
@returns {Function} Returns the new relational operation function. | [
"Creates",
"a",
"function",
"that",
"performs",
"a",
"relational",
"operation",
"on",
"two",
"values",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L5500-L5508 |
12,527 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | customDefaultsAssignIn | function customDefaultsAssignIn(objValue, srcValue, key, object) {
if (objValue === undefined ||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
return srcValue;
}
return objValue;
} | javascript | function customDefaultsAssignIn(objValue, srcValue, key, object) {
if (objValue === undefined ||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
return srcValue;
}
return objValue;
} | [
"function",
"customDefaultsAssignIn",
"(",
"objValue",
",",
"srcValue",
",",
"key",
",",
"object",
")",
"{",
"if",
"(",
"objValue",
"===",
"undefined",
"||",
"(",
"eq",
"(",
"objValue",
",",
"objectProto",
"[",
"key",
"]",
")",
"&&",
"!",
"hasOwnProperty",... | Used by `_.defaults` to customize its `_.assignIn` use to assign properties
of source objects to the destination object for all destination properties
that resolve to `undefined`.
@private
@param {*} objValue The destination value.
@param {*} srcValue The source value.
@param {string} key The key of the property to as... | [
"Used",
"by",
"_",
".",
"defaults",
"to",
"customize",
"its",
"_",
".",
"assignIn",
"use",
"to",
"assign",
"properties",
"of",
"source",
"objects",
"to",
"the",
"destination",
"object",
"for",
"all",
"destination",
"properties",
"that",
"resolve",
"to",
"und... | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L5701-L5707 |
12,528 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | getFuncName | function getFuncName(func) {
var result = (func.name + ''),
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc =... | javascript | function getFuncName(func) {
var result = (func.name + ''),
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc =... | [
"function",
"getFuncName",
"(",
"func",
")",
"{",
"var",
"result",
"=",
"(",
"func",
".",
"name",
"+",
"''",
")",
",",
"array",
"=",
"realNames",
"[",
"result",
"]",
",",
"length",
"=",
"hasOwnProperty",
".",
"call",
"(",
"realNames",
",",
"result",
... | Gets the name of `func`.
@private
@param {Function} func The function to query.
@returns {string} Returns the function name. | [
"Gets",
"the",
"name",
"of",
"func",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L6031-L6044 |
12,529 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | getWrapDetails | function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
} | javascript | function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
} | [
"function",
"getWrapDetails",
"(",
"source",
")",
"{",
"var",
"match",
"=",
"source",
".",
"match",
"(",
"reWrapDetails",
")",
";",
"return",
"match",
"?",
"match",
"[",
"1",
"]",
".",
"split",
"(",
"reSplitDetails",
")",
":",
"[",
"]",
";",
"}"
] | Extracts wrapper details from the `source` body comment.
@private
@param {string} source The source to inspect.
@returns {Array} Returns the wrapper details. | [
"Extracts",
"wrapper",
"details",
"from",
"the",
"source",
"body",
"comment",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L6251-L6254 |
12,530 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | setWrapToString | function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
} | javascript | function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
} | [
"function",
"setWrapToString",
"(",
"wrapper",
",",
"reference",
",",
"bitmask",
")",
"{",
"var",
"source",
"=",
"(",
"reference",
"+",
"''",
")",
";",
"return",
"setToString",
"(",
"wrapper",
",",
"insertWrapDetails",
"(",
"source",
",",
"updateWrapDetails",
... | Sets the `toString` method of `wrapper` to mimic the source of `reference`
with wrapper details in a comment at the top of the source body.
@private
@param {Function} wrapper The function to modify.
@param {Function} reference The reference function.
@param {number} bitmask The bitmask flags. See `createWrap` for more... | [
"Sets",
"the",
"toString",
"method",
"of",
"wrapper",
"to",
"mimic",
"the",
"source",
"of",
"reference",
"with",
"wrapper",
"details",
"in",
"a",
"comment",
"at",
"the",
"top",
"of",
"the",
"source",
"body",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L6793-L6796 |
12,531 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | wrapperClone | function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values... | javascript | function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values... | [
"function",
"wrapperClone",
"(",
"wrapper",
")",
"{",
"if",
"(",
"wrapper",
"instanceof",
"LazyWrapper",
")",
"{",
"return",
"wrapper",
".",
"clone",
"(",
")",
";",
"}",
"var",
"result",
"=",
"new",
"LodashWrapper",
"(",
"wrapper",
".",
"__wrapped__",
",",... | Creates a clone of `wrapper`.
@private
@param {Object} wrapper The wrapper to clone.
@returns {Object} Returns the cloned wrapper. | [
"Creates",
"a",
"clone",
"of",
"wrapper",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L6929-L6938 |
12,532 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | dropRight | function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
} | javascript | function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
} | [
"function",
"dropRight",
"(",
"array",
",",
"n",
",",
"guard",
")",
"{",
"var",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"!",
"length",
")",
"{",
"return",
"[",
"]",
";",
"}",
"n",
"=",
"(",
... | Creates a slice of `array` with `n` elements dropped from the end.
@static
@memberOf _
@since 3.0.0
@category Array
@param {Array} array The array to query.
@param {number} [n=1] The number of elements to drop.
@param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
@returns {Array} Returns the s... | [
"Creates",
"a",
"slice",
"of",
"array",
"with",
"n",
"elements",
"dropped",
"from",
"the",
"end",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L7205-L7213 |
12,533 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | findIndex | function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(a... | javascript | function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(a... | [
"function",
"findIndex",
"(",
"array",
",",
"predicate",
",",
"fromIndex",
")",
"{",
"var",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"!",
"length",
")",
"{",
"return",
"-",
"1",
";",
"}",
"var",
... | This method is like `_.find` except that it returns the index of the first
element `predicate` returns truthy for instead of the element itself.
@static
@memberOf _
@since 1.1.0
@category Array
@param {Array} array The array to inspect.
@param {Function} [predicate=_.identity] The function invoked per iteration.
@para... | [
"This",
"method",
"is",
"like",
"_",
".",
"find",
"except",
"that",
"it",
"returns",
"the",
"index",
"of",
"the",
"first",
"element",
"predicate",
"returns",
"truthy",
"for",
"instead",
"of",
"the",
"element",
"itself",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L7373-L7383 |
12,534 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | flattenDeep | function flattenDeep(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, INFINITY) : [];
} | javascript | function flattenDeep(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, INFINITY) : [];
} | [
"function",
"flattenDeep",
"(",
"array",
")",
"{",
"var",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"return",
"length",
"?",
"baseFlatten",
"(",
"array",
",",
"INFINITY",
")",
":",
"[",
"]",
";",
"}"
] | Recursively flattens `array`.
@static
@memberOf _
@since 3.0.0
@category Array
@param {Array} array The array to flatten.
@returns {Array} Returns the new flattened array.
@example
_.flattenDeep([1, [2, [3, [4]], 5]]);
// => [1, 2, 3, 4, 5] | [
"Recursively",
"flattens",
"array",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L7468-L7471 |
12,535 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | fromPairs | function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
} | javascript | function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
} | [
"function",
"fromPairs",
"(",
"pairs",
")",
"{",
"var",
"index",
"=",
"-",
"1",
",",
"length",
"=",
"pairs",
"==",
"null",
"?",
"0",
":",
"pairs",
".",
"length",
",",
"result",
"=",
"{",
"}",
";",
"while",
"(",
"++",
"index",
"<",
"length",
")",
... | The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } | [
"The",
"inverse",
"of",
"_",
".",
"toPairs",
";",
"this",
"method",
"returns",
"an",
"object",
"composed",
"from",
"key",
"-",
"value",
"pairs",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L7517-L7527 |
12,536 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | initial | function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
} | javascript | function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
} | [
"function",
"initial",
"(",
"array",
")",
"{",
"var",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"return",
"length",
"?",
"baseSlice",
"(",
"array",
",",
"0",
",",
"-",
"1",
")",
":",
"[",
"]",
";",
"}"
] | Gets all but the last element of `array`.
@static
@memberOf _
@since 0.1.0
@category Array
@param {Array} array The array to query.
@returns {Array} Returns the slice of `array`.
@example
_.initial([1, 2, 3]);
// => [1, 2] | [
"Gets",
"all",
"but",
"the",
"last",
"element",
"of",
"array",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L7600-L7603 |
12,537 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | sortedIndexOf | function sortedIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
return index;
}
}
return -1;
} | javascript | function sortedIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
return index;
}
}
return -1;
} | [
"function",
"sortedIndexOf",
"(",
"array",
",",
"value",
")",
"{",
"var",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
")",
"{",
"var",
"index",
"=",
"baseSortedIndex",
"(",
"array",
",",
"val... | This method is like `_.indexOf` except that it performs a binary
search on a sorted `array`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} array The array to inspect.
@param {*} value The value to search for.
@returns {number} Returns the index of the matched value, else `-1`.
@example
_.sortedIndex... | [
"This",
"method",
"is",
"like",
"_",
".",
"indexOf",
"except",
"that",
"it",
"performs",
"a",
"binary",
"search",
"on",
"a",
"sorted",
"array",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L8117-L8126 |
12,538 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | sortedUniqBy | function sortedUniqBy(array, iteratee) {
return (array && array.length)
? baseSortedUniq(array, getIteratee(iteratee, 2))
: [];
} | javascript | function sortedUniqBy(array, iteratee) {
return (array && array.length)
? baseSortedUniq(array, getIteratee(iteratee, 2))
: [];
} | [
"function",
"sortedUniqBy",
"(",
"array",
",",
"iteratee",
")",
"{",
"return",
"(",
"array",
"&&",
"array",
".",
"length",
")",
"?",
"baseSortedUniq",
"(",
"array",
",",
"getIteratee",
"(",
"iteratee",
",",
"2",
")",
")",
":",
"[",
"]",
";",
"}"
] | This method is like `_.uniqBy` except that it's designed and optimized
for sorted arrays.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} array The array to inspect.
@param {Function} [iteratee] The iteratee invoked per element.
@returns {Array} Returns the new duplicate free array.
@example
_.sortedU... | [
"This",
"method",
"is",
"like",
"_",
".",
"uniqBy",
"except",
"that",
"it",
"s",
"designed",
"and",
"optimized",
"for",
"sorted",
"arrays",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L8243-L8247 |
12,539 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | unzip | function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(... | javascript | function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(... | [
"function",
"unzip",
"(",
"array",
")",
"{",
"if",
"(",
"!",
"(",
"array",
"&&",
"array",
".",
"length",
")",
")",
"{",
"return",
"[",
"]",
";",
"}",
"var",
"length",
"=",
"0",
";",
"array",
"=",
"arrayFilter",
"(",
"array",
",",
"function",
"(",... | This method is like `_.zip` except that it accepts an array of grouped
elements and creates an array regrouping the elements to their pre-zip
configuration.
@static
@memberOf _
@since 1.2.0
@category Array
@param {Array} array The array of grouped elements to process.
@returns {Array} Returns the new array of regroupe... | [
"This",
"method",
"is",
"like",
"_",
".",
"zip",
"except",
"that",
"it",
"accepts",
"an",
"array",
"of",
"grouped",
"elements",
"and",
"creates",
"an",
"array",
"regrouping",
"the",
"elements",
"to",
"their",
"pre",
"-",
"zip",
"configuration",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L8589-L8603 |
12,540 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | forEachRight | function forEachRight(collection, iteratee) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, getIteratee(iteratee, 3));
} | javascript | function forEachRight(collection, iteratee) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, getIteratee(iteratee, 3));
} | [
"function",
"forEachRight",
"(",
"collection",
",",
"iteratee",
")",
"{",
"var",
"func",
"=",
"isArray",
"(",
"collection",
")",
"?",
"arrayEachRight",
":",
"baseEachRight",
";",
"return",
"func",
"(",
"collection",
",",
"getIteratee",
"(",
"iteratee",
",",
... | This method is like `_.forEach` except that it iterates over elements of
`collection` from right to left.
@static
@memberOf _
@since 2.0.0
@alias eachRight
@category Collection
@param {Array|Object} collection The collection to iterate over.
@param {Function} [iteratee=_.identity] The function invoked per iteration.
@... | [
"This",
"method",
"is",
"like",
"_",
".",
"forEach",
"except",
"that",
"it",
"iterates",
"over",
"elements",
"of",
"collection",
"from",
"right",
"to",
"left",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L9489-L9492 |
12,541 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | negate | function negate(predicate) {
if (typeof predicate != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return function() {
var args = arguments;
switch (args.length) {
case 0: return !predicate.call(this);
case 1: return !predicate.call(this, args[0]);
... | javascript | function negate(predicate) {
if (typeof predicate != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return function() {
var args = arguments;
switch (args.length) {
case 0: return !predicate.call(this);
case 1: return !predicate.call(this, args[0]);
... | [
"function",
"negate",
"(",
"predicate",
")",
"{",
"if",
"(",
"typeof",
"predicate",
"!=",
"'function'",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"FUNC_ERROR_TEXT",
")",
";",
"}",
"return",
"function",
"(",
")",
"{",
"var",
"args",
"=",
"arguments",
";... | Creates a function that negates the result of the predicate `func`. The
`func` predicate is invoked with the `this` binding and arguments of the
created function.
@static
@memberOf _
@since 3.0.0
@category Function
@param {Function} predicate The predicate to negate.
@returns {Function} Returns the new negated functio... | [
"Creates",
"a",
"function",
"that",
"negates",
"the",
"result",
"of",
"the",
"predicate",
"func",
".",
"The",
"func",
"predicate",
"is",
"invoked",
"with",
"the",
"this",
"binding",
"and",
"arguments",
"of",
"the",
"created",
"function",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L10704-L10718 |
12,542 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | conformsTo | function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
} | javascript | function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
} | [
"function",
"conformsTo",
"(",
"object",
",",
"source",
")",
"{",
"return",
"source",
"==",
"null",
"||",
"baseConformsTo",
"(",
"object",
",",
"source",
",",
"keys",
"(",
"source",
")",
")",
";",
"}"
] | Checks if `object` conforms to `source` by invoking the predicate
properties of `source` with the corresponding property values of `object`.
**Note:** This method is equivalent to `_.conforms` when `source` is
partially applied.
@static
@memberOf _
@since 4.14.0
@category Lang
@param {Object} object The object to ins... | [
"Checks",
"if",
"object",
"conforms",
"to",
"source",
"by",
"invoking",
"the",
"predicate",
"properties",
"of",
"source",
"with",
"the",
"corresponding",
"property",
"values",
"of",
"object",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L11269-L11271 |
12,543 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | create | function create(prototype, properties) {
var result = baseCreate(prototype);
return properties == null ? result : baseAssign(result, properties);
} | javascript | function create(prototype, properties) {
var result = baseCreate(prototype);
return properties == null ? result : baseAssign(result, properties);
} | [
"function",
"create",
"(",
"prototype",
",",
"properties",
")",
"{",
"var",
"result",
"=",
"baseCreate",
"(",
"prototype",
")",
";",
"return",
"properties",
"==",
"null",
"?",
"result",
":",
"baseAssign",
"(",
"result",
",",
"properties",
")",
";",
"}"
] | Creates an object that inherits from the `prototype` object. If a
`properties` object is given, its own enumerable string keyed properties
are assigned to the created object.
@static
@memberOf _
@since 2.3.0
@category Object
@param {Object} prototype The object to inherit from.
@param {Object} [properties] The propert... | [
"Creates",
"an",
"object",
"that",
"inherits",
"from",
"the",
"prototype",
"object",
".",
"If",
"a",
"properties",
"object",
"is",
"given",
"its",
"own",
"enumerable",
"string",
"keyed",
"properties",
"are",
"assigned",
"to",
"the",
"created",
"object",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L12881-L12884 |
12,544 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | replace | function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
} | javascript | function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
} | [
"function",
"replace",
"(",
")",
"{",
"var",
"args",
"=",
"arguments",
",",
"string",
"=",
"toString",
"(",
"args",
"[",
"0",
"]",
")",
";",
"return",
"args",
".",
"length",
"<",
"3",
"?",
"string",
":",
"string",
".",
"replace",
"(",
"args",
"[",
... | Replaces matches for `pattern` in `string` with `replacement`.
**Note:** This method is based on
[`String#replace`](https://mdn.io/String/replace).
@static
@memberOf _
@since 4.0.0
@category String
@param {string} [string=''] The string to modify.
@param {RegExp|string} pattern The pattern to replace.
@param {Functio... | [
"Replaces",
"matches",
"for",
"pattern",
"in",
"string",
"with",
"replacement",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L14621-L14626 |
12,545 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | startsWith | function startsWith(string, target, position) {
string = toString(string);
position = position == null
? 0
: baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
} | javascript | function startsWith(string, target, position) {
string = toString(string);
position = position == null
? 0
: baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
} | [
"function",
"startsWith",
"(",
"string",
",",
"target",
",",
"position",
")",
"{",
"string",
"=",
"toString",
"(",
"string",
")",
";",
"position",
"=",
"position",
"==",
"null",
"?",
"0",
":",
"baseClamp",
"(",
"toInteger",
"(",
"position",
")",
",",
"... | Checks if `string` starts with the given target string.
@static
@memberOf _
@since 3.0.0
@category String
@param {string} [string=''] The string to inspect.
@param {string} [target] The string to search for.
@param {number} [position=0] The position to search from.
@returns {boolean} Returns `true` if `string` starts ... | [
"Checks",
"if",
"string",
"starts",
"with",
"the",
"given",
"target",
"string",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L14741-L14749 |
12,546 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | truncate | function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH,
omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? toInteger(options.length) : length;
om... | javascript | function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH,
omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? toInteger(options.length) : length;
om... | [
"function",
"truncate",
"(",
"string",
",",
"options",
")",
"{",
"var",
"length",
"=",
"DEFAULT_TRUNC_LENGTH",
",",
"omission",
"=",
"DEFAULT_TRUNC_OMISSION",
";",
"if",
"(",
"isObject",
"(",
"options",
")",
")",
"{",
"var",
"separator",
"=",
"'separator'",
... | Truncates `string` if it's longer than the given maximum string length.
The last characters of the truncated string are replaced with the omission
string which defaults to "...".
@static
@memberOf _
@since 4.0.0
@category String
@param {string} [string=''] The string to truncate.
@param {Object} [options={}] The optio... | [
"Truncates",
"string",
"if",
"it",
"s",
"longer",
"than",
"the",
"given",
"maximum",
"string",
"length",
".",
"The",
"last",
"characters",
"of",
"the",
"truncated",
"string",
"are",
"replaced",
"with",
"the",
"omission",
"string",
"which",
"defaults",
"to",
... | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L15154-L15208 |
12,547 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | cond | function cond(pairs) {
var length = pairs == null ? 0 : pairs.length,
toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function(pair) {
if (typeof pair[1] != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return [toIteratee(pair[0]), pair... | javascript | function cond(pairs) {
var length = pairs == null ? 0 : pairs.length,
toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function(pair) {
if (typeof pair[1] != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return [toIteratee(pair[0]), pair... | [
"function",
"cond",
"(",
"pairs",
")",
"{",
"var",
"length",
"=",
"pairs",
"==",
"null",
"?",
"0",
":",
"pairs",
".",
"length",
",",
"toIteratee",
"=",
"getIteratee",
"(",
")",
";",
"pairs",
"=",
"!",
"length",
"?",
"[",
"]",
":",
"arrayMap",
"(",
... | Creates a function that iterates over `pairs` and invokes the corresponding
function of the first predicate to return truthy. The predicate-function
pairs are invoked with the `this` binding and arguments of the created
function.
@static
@memberOf _
@since 4.0.0
@category Util
@param {Array} pairs The predicate-functi... | [
"Creates",
"a",
"function",
"that",
"iterates",
"over",
"pairs",
"and",
"invokes",
"the",
"corresponding",
"function",
"of",
"the",
"first",
"predicate",
"to",
"return",
"truthy",
".",
"The",
"predicate",
"-",
"function",
"pairs",
"are",
"invoked",
"with",
"th... | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L15403-L15423 |
12,548 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | nthArg | function nthArg(n) {
n = toInteger(n);
return baseRest(function(args) {
return baseNth(args, n);
});
} | javascript | function nthArg(n) {
n = toInteger(n);
return baseRest(function(args) {
return baseNth(args, n);
});
} | [
"function",
"nthArg",
"(",
"n",
")",
"{",
"n",
"=",
"toInteger",
"(",
"n",
")",
";",
"return",
"baseRest",
"(",
"function",
"(",
"args",
")",
"{",
"return",
"baseNth",
"(",
"args",
",",
"n",
")",
";",
"}",
")",
";",
"}"
] | Creates a function that gets the argument at index `n`. If `n` is negative,
the nth argument from the end is returned.
@static
@memberOf _
@since 4.0.0
@category Util
@param {number} [n=0] The index of the argument to return.
@returns {Function} Returns the new pass-thru function.
@example
var func = _.nthArg(1);
fun... | [
"Creates",
"a",
"function",
"that",
"gets",
"the",
"argument",
"at",
"index",
"n",
".",
"If",
"n",
"is",
"negative",
"the",
"nth",
"argument",
"from",
"the",
"end",
"is",
"returned",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L15864-L15869 |
12,549 | zhanziyang/vue-croppa | docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js | toPath | function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
} | javascript | function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
} | [
"function",
"toPath",
"(",
"value",
")",
"{",
"if",
"(",
"isArray",
"(",
"value",
")",
")",
"{",
"return",
"arrayMap",
"(",
"value",
",",
"toKey",
")",
";",
"}",
"return",
"isSymbol",
"(",
"value",
")",
"?",
"[",
"value",
"]",
":",
"copyArray",
"("... | Converts `value` to a property path array.
@static
@memberOf _
@since 4.0.0
@category Util
@param {*} value The value to convert.
@returns {Array} Returns the new property path array.
@example
_.toPath('a.b.c');
// => ['a', 'b', 'c']
_.toPath('a[0].b.c');
// => ['a', '0', 'b', 'c'] | [
"Converts",
"value",
"to",
"a",
"property",
"path",
"array",
"."
] | 46632d9ce254b834150d7fab2febb666e1c7d2a4 | https://github.com/zhanziyang/vue-croppa/blob/46632d9ce254b834150d7fab2febb666e1c7d2a4/docs/static/kute-page_files/undefined.cd4343636fa2ca97594c.js#L16226-L16231 |
12,550 | tracespace/tracespace | packages/gerber-plotter/lib/_pad-shape.js | function(cx, cy, r, width) {
return {type: 'ring', cx: cx, cy: cy, r: r, width: width}
} | javascript | function(cx, cy, r, width) {
return {type: 'ring', cx: cx, cy: cy, r: r, width: width}
} | [
"function",
"(",
"cx",
",",
"cy",
",",
"r",
",",
"width",
")",
"{",
"return",
"{",
"type",
":",
"'ring'",
",",
"cx",
":",
"cx",
",",
"cy",
":",
"cy",
",",
"r",
":",
"r",
",",
"width",
":",
"width",
"}",
"}"
] | just returns a ring object, does not return a box | [
"just",
"returns",
"a",
"ring",
"object",
"does",
"not",
"return",
"a",
"box"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/gerber-plotter/lib/_pad-shape.js#L165-L167 | |
12,551 | tracespace/tracespace | packages/pcb-stackup/index.js | renderStackup | function renderStackup(stackupLayers, next) {
var stackup = createStackup(stackupLayers, options)
stackup.layers = stackupLayers
next(null, stackup)
} | javascript | function renderStackup(stackupLayers, next) {
var stackup = createStackup(stackupLayers, options)
stackup.layers = stackupLayers
next(null, stackup)
} | [
"function",
"renderStackup",
"(",
"stackupLayers",
",",
"next",
")",
"{",
"var",
"stackup",
"=",
"createStackup",
"(",
"stackupLayers",
",",
"options",
")",
"stackup",
".",
"layers",
"=",
"stackupLayers",
"next",
"(",
"null",
",",
"stackup",
")",
"}"
] | using the result of renderAllLayers, build the stackup | [
"using",
"the",
"result",
"of",
"renderAllLayers",
"build",
"the",
"stackup"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/pcb-stackup/index.js#L52-L56 |
12,552 | tracespace/tracespace | packages/pcb-stackup/index.js | makeRenderLayerTask | function makeRenderLayerTask(layer) {
return function renderLayer(next) {
var stackupLayer = makeBaseStackupLayer(layer)
if (stackupLayer.converter) return next(null, stackupLayer)
var converter = gerberToSvg(
stackupLayer.gerber,
stackupLayer.options,
function handleLaye... | javascript | function makeRenderLayerTask(layer) {
return function renderLayer(next) {
var stackupLayer = makeBaseStackupLayer(layer)
if (stackupLayer.converter) return next(null, stackupLayer)
var converter = gerberToSvg(
stackupLayer.gerber,
stackupLayer.options,
function handleLaye... | [
"function",
"makeRenderLayerTask",
"(",
"layer",
")",
"{",
"return",
"function",
"renderLayer",
"(",
"next",
")",
"{",
"var",
"stackupLayer",
"=",
"makeBaseStackupLayer",
"(",
"layer",
")",
"if",
"(",
"stackupLayer",
".",
"converter",
")",
"return",
"next",
"(... | map an pcb-stackup input layer into a function that will call a callback once a pcb-stackup-core input layer is ready | [
"map",
"an",
"pcb",
"-",
"stackup",
"input",
"layer",
"into",
"a",
"function",
"that",
"will",
"call",
"a",
"callback",
"once",
"a",
"pcb",
"-",
"stackup",
"-",
"core",
"input",
"layer",
"is",
"ready"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/pcb-stackup/index.js#L70-L86 |
12,553 | tracespace/tracespace | packages/pcb-stackup/index.js | makeBaseStackupLayer | function makeBaseStackupLayer(layer) {
var layerSide = layer.side
var layerType = layer.type
if (
layer.filename &&
typeof layerSide === 'undefined' &&
typeof layerType === 'undefined'
) {
var gerberId = layerTypes[layer.filename]
layerSide = gerberId.side
layerType ... | javascript | function makeBaseStackupLayer(layer) {
var layerSide = layer.side
var layerType = layer.type
if (
layer.filename &&
typeof layerSide === 'undefined' &&
typeof layerType === 'undefined'
) {
var gerberId = layerTypes[layer.filename]
layerSide = gerberId.side
layerType ... | [
"function",
"makeBaseStackupLayer",
"(",
"layer",
")",
"{",
"var",
"layerSide",
"=",
"layer",
".",
"side",
"var",
"layerType",
"=",
"layer",
".",
"type",
"if",
"(",
"layer",
".",
"filename",
"&&",
"typeof",
"layerSide",
"===",
"'undefined'",
"&&",
"typeof",
... | extend pcb-stackup input layer with necessary details for pcb-stackup-core | [
"extend",
"pcb",
"-",
"stackup",
"input",
"layer",
"with",
"necessary",
"details",
"for",
"pcb",
"-",
"stackup",
"-",
"core"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/pcb-stackup/index.js#L89-L122 |
12,554 | tracespace/tracespace | packages/gerber-parser/lib/_parse-macro-expression.js | function() {
var t = tokens.shift()
var exp
if (RE_NUMBER.test(t)) {
exp = {type: 'n', val: t}
} else {
exp = parseExpression()
tokens.shift()
}
return exp
} | javascript | function() {
var t = tokens.shift()
var exp
if (RE_NUMBER.test(t)) {
exp = {type: 'n', val: t}
} else {
exp = parseExpression()
tokens.shift()
}
return exp
} | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"tokens",
".",
"shift",
"(",
")",
"var",
"exp",
"if",
"(",
"RE_NUMBER",
".",
"test",
"(",
"t",
")",
")",
"{",
"exp",
"=",
"{",
"type",
":",
"'n'",
",",
"val",
":",
"t",
"}",
"}",
"else",
"{",
"exp... | primary tokens are numbers and parentheses | [
"primary",
"tokens",
"are",
"numbers",
"and",
"parentheses"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/gerber-parser/lib/_parse-macro-expression.js#L16-L27 | |
12,555 | tracespace/tracespace | packages/gerber-parser/lib/_parse-macro-expression.js | function() {
var exp = parsePrimary()
var t = tokens[0]
if (t === 'X') {
parser._warn("multiplication in macros should use 'x', not 'X'")
t = 'x'
}
while (t === 'x' || t === '/') {
tokens.shift()
var right = parsePrimary()
exp = {type: t, left: exp, right: right}
... | javascript | function() {
var exp = parsePrimary()
var t = tokens[0]
if (t === 'X') {
parser._warn("multiplication in macros should use 'x', not 'X'")
t = 'x'
}
while (t === 'x' || t === '/') {
tokens.shift()
var right = parsePrimary()
exp = {type: t, left: exp, right: right}
... | [
"function",
"(",
")",
"{",
"var",
"exp",
"=",
"parsePrimary",
"(",
")",
"var",
"t",
"=",
"tokens",
"[",
"0",
"]",
"if",
"(",
"t",
"===",
"'X'",
")",
"{",
"parser",
".",
"_warn",
"(",
"\"multiplication in macros should use 'x', not 'X'\"",
")",
"t",
"=",
... | parse multiplication and division tokens | [
"parse",
"multiplication",
"and",
"division",
"tokens"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/gerber-parser/lib/_parse-macro-expression.js#L30-L45 | |
12,556 | tracespace/tracespace | packages/gerber-parser/lib/_parse-macro-expression.js | function(op, mods) {
var getValue = function(t) {
if (t[0] === '$') {
return Number(mods[t])
}
return Number(t)
}
var type = op.type
if (type === 'n') {
return getValue(op.val)
}
if (type === '+') {
return evaluate(op.left, mods) + evaluate(op.right, mods)
... | javascript | function(op, mods) {
var getValue = function(t) {
if (t[0] === '$') {
return Number(mods[t])
}
return Number(t)
}
var type = op.type
if (type === 'n') {
return getValue(op.val)
}
if (type === '+') {
return evaluate(op.left, mods) + evaluate(op.right, mods)
... | [
"function",
"(",
"op",
",",
"mods",
")",
"{",
"var",
"getValue",
"=",
"function",
"(",
"t",
")",
"{",
"if",
"(",
"t",
"[",
"0",
"]",
"===",
"'$'",
")",
"{",
"return",
"Number",
"(",
"mods",
"[",
"t",
"]",
")",
"}",
"return",
"Number",
"(",
"t... | evalute by recursively traversing the tree | [
"evalute",
"by",
"recursively",
"traversing",
"the",
"tree"
] | e1cd3af69766ae2f08491cb2309a62013ff1f815 | https://github.com/tracespace/tracespace/blob/e1cd3af69766ae2f08491cb2309a62013ff1f815/packages/gerber-parser/lib/_parse-macro-expression.js#L64-L87 | |
12,557 | zerobias/telegram-mtproto | src/vendor/leemon.js | findPrimes | function findPrimes(n) {
var i, s, p, ans;
s=new Array(n);
for (i=0; i<n; i++)
s[i]=0;
s[0]=2;
p=0; //first p elements of s are primes, the rest are a sieve
for (;s[p]<n;) { //s[p] is the pth prime
for (i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]
s[i]=1;
p++;
... | javascript | function findPrimes(n) {
var i, s, p, ans;
s=new Array(n);
for (i=0; i<n; i++)
s[i]=0;
s[0]=2;
p=0; //first p elements of s are primes, the rest are a sieve
for (;s[p]<n;) { //s[p] is the pth prime
for (i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]
s[i]=1;
p++;
... | [
"function",
"findPrimes",
"(",
"n",
")",
"{",
"var",
"i",
",",
"s",
",",
"p",
",",
"ans",
";",
"s",
"=",
"new",
"Array",
"(",
"n",
")",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"s",
"[",
"i",
"]",
"=",
... | return array of all primes less than integer n | [
"return",
"array",
"of",
"all",
"primes",
"less",
"than",
"integer",
"n"
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L224-L242 |
12,558 | zerobias/telegram-mtproto | src/vendor/leemon.js | millerRabinInt | function millerRabinInt(x, b) {
if (mr_x1.length!=x.length) {
mr_x1=dup(x);
mr_r=dup(x);
mr_a=dup(x);
}
copyInt_(mr_a, b);
return millerRabin(x, mr_a);
} | javascript | function millerRabinInt(x, b) {
if (mr_x1.length!=x.length) {
mr_x1=dup(x);
mr_r=dup(x);
mr_a=dup(x);
}
copyInt_(mr_a, b);
return millerRabin(x, mr_a);
} | [
"function",
"millerRabinInt",
"(",
"x",
",",
"b",
")",
"{",
"if",
"(",
"mr_x1",
".",
"length",
"!=",
"x",
".",
"length",
")",
"{",
"mr_x1",
"=",
"dup",
"(",
"x",
")",
";",
"mr_r",
"=",
"dup",
"(",
"x",
")",
";",
"mr_a",
"=",
"dup",
"(",
"x",
... | does a single round of Miller-Rabin base b consider x to be a possible prime? x is a bigInt, and b is an integer, with b<x | [
"does",
"a",
"single",
"round",
"of",
"Miller",
"-",
"Rabin",
"base",
"b",
"consider",
"x",
"to",
"be",
"a",
"possible",
"prime?",
"x",
"is",
"a",
"bigInt",
"and",
"b",
"is",
"an",
"integer",
"with",
"b<x"
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L247-L256 |
12,559 | zerobias/telegram-mtproto | src/vendor/leemon.js | bitSize | function bitSize(x) {
var j, z, w;
for (j=x.length-1; (x[j]==0) && (j>0); j--);
for (z=0, w=x[j]; w; (w>>=1), z++);
z+=bpe*j;
return z;
} | javascript | function bitSize(x) {
var j, z, w;
for (j=x.length-1; (x[j]==0) && (j>0); j--);
for (z=0, w=x[j]; w; (w>>=1), z++);
z+=bpe*j;
return z;
} | [
"function",
"bitSize",
"(",
"x",
")",
"{",
"var",
"j",
",",
"z",
",",
"w",
";",
"for",
"(",
"j",
"=",
"x",
".",
"length",
"-",
"1",
";",
"(",
"x",
"[",
"j",
"]",
"==",
"0",
")",
"&&",
"(",
"j",
">",
"0",
")",
";",
"j",
"--",
")",
";",... | returns how many bits long the bigInt is, not counting leading zeros. | [
"returns",
"how",
"many",
"bits",
"long",
"the",
"bigInt",
"is",
"not",
"counting",
"leading",
"zeros",
"."
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L309-L315 |
12,560 | zerobias/telegram-mtproto | src/vendor/leemon.js | expand | function expand(x, n) {
var ans=int2bigInt(0, (x.length>n ? x.length : n)*bpe, 0);
copy_(ans, x);
return ans;
} | javascript | function expand(x, n) {
var ans=int2bigInt(0, (x.length>n ? x.length : n)*bpe, 0);
copy_(ans, x);
return ans;
} | [
"function",
"expand",
"(",
"x",
",",
"n",
")",
"{",
"var",
"ans",
"=",
"int2bigInt",
"(",
"0",
",",
"(",
"x",
".",
"length",
">",
"n",
"?",
"x",
".",
"length",
":",
"n",
")",
"*",
"bpe",
",",
"0",
")",
";",
"copy_",
"(",
"ans",
",",
"x",
... | return a copy of x with at least n elements, adding leading zeros if needed | [
"return",
"a",
"copy",
"of",
"x",
"with",
"at",
"least",
"n",
"elements",
"adding",
"leading",
"zeros",
"if",
"needed"
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L318-L322 |
12,561 | zerobias/telegram-mtproto | src/vendor/leemon.js | randTruePrime | function randTruePrime(k) {
var ans=int2bigInt(0, k, 0);
randTruePrime_(ans, k);
return trim(ans, 1);
} | javascript | function randTruePrime(k) {
var ans=int2bigInt(0, k, 0);
randTruePrime_(ans, k);
return trim(ans, 1);
} | [
"function",
"randTruePrime",
"(",
"k",
")",
"{",
"var",
"ans",
"=",
"int2bigInt",
"(",
"0",
",",
"k",
",",
"0",
")",
";",
"randTruePrime_",
"(",
"ans",
",",
"k",
")",
";",
"return",
"trim",
"(",
"ans",
",",
"1",
")",
";",
"}"
] | return a k-bit true random prime using Maurer's algorithm. | [
"return",
"a",
"k",
"-",
"bit",
"true",
"random",
"prime",
"using",
"Maurer",
"s",
"algorithm",
"."
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L325-L329 |
12,562 | zerobias/telegram-mtproto | src/vendor/leemon.js | randProbPrime | function randProbPrime(k) {
if (k>=600) return randProbPrimeRounds(k, 2); //numbers from HAC table 4.3
if (k>=550) return randProbPrimeRounds(k, 4);
if (k>=500) return randProbPrimeRounds(k, 5);
if (k>=400) return randProbPrimeRounds(k, 6);
if (k>=350) return randProbPrimeRounds(k, 7);
if (k>=300) return ra... | javascript | function randProbPrime(k) {
if (k>=600) return randProbPrimeRounds(k, 2); //numbers from HAC table 4.3
if (k>=550) return randProbPrimeRounds(k, 4);
if (k>=500) return randProbPrimeRounds(k, 5);
if (k>=400) return randProbPrimeRounds(k, 6);
if (k>=350) return randProbPrimeRounds(k, 7);
if (k>=300) return ra... | [
"function",
"randProbPrime",
"(",
"k",
")",
"{",
"if",
"(",
"k",
">=",
"600",
")",
"return",
"randProbPrimeRounds",
"(",
"k",
",",
"2",
")",
";",
"//numbers from HAC table 4.3",
"if",
"(",
"k",
">=",
"550",
")",
"return",
"randProbPrimeRounds",
"(",
"k",
... | return a k-bit random probable prime with probability of error < 2^-80 | [
"return",
"a",
"k",
"-",
"bit",
"random",
"probable",
"prime",
"with",
"probability",
"of",
"error",
"<",
"2^",
"-",
"80"
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L332-L344 |
12,563 | zerobias/telegram-mtproto | src/vendor/leemon.js | randBigInt_ | function randBigInt_(b, n, s) {
var i, a;
for (i=0; i<b.length; i++)
b[i]=0;
a=Math.floor((n-1)/bpe)+1; //# array elements to hold the BigInt
for (i=0; i<a; i++) {
b[i]=Math.floor(Math.random()*(1<<(bpe-1)));
}
b[a-1] &= (2<<((n-1)%bpe))-1;
if (s==1)
b[a-1] |= (1<<((n-1)%bpe));
} | javascript | function randBigInt_(b, n, s) {
var i, a;
for (i=0; i<b.length; i++)
b[i]=0;
a=Math.floor((n-1)/bpe)+1; //# array elements to hold the BigInt
for (i=0; i<a; i++) {
b[i]=Math.floor(Math.random()*(1<<(bpe-1)));
}
b[a-1] &= (2<<((n-1)%bpe))-1;
if (s==1)
b[a-1] |= (1<<((n-1)%bpe));
} | [
"function",
"randBigInt_",
"(",
"b",
",",
"n",
",",
"s",
")",
"{",
"var",
"i",
",",
"a",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"b",
".",
"length",
";",
"i",
"++",
")",
"b",
"[",
"i",
"]",
"=",
"0",
";",
"a",
"=",
"Math",
".",
... | Set b to an n-bit random BigInt. If s=1, then the most significant of those n bits is set to 1. Array b must be big enough to hold the result. Must have n>=1 | [
"Set",
"b",
"to",
"an",
"n",
"-",
"bit",
"random",
"BigInt",
".",
"If",
"s",
"=",
"1",
"then",
"the",
"most",
"significant",
"of",
"those",
"n",
"bits",
"is",
"set",
"to",
"1",
".",
"Array",
"b",
"must",
"be",
"big",
"enough",
"to",
"hold",
"the"... | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L593-L604 |
12,564 | zerobias/telegram-mtproto | src/vendor/leemon.js | carry_ | function carry_(x) {
var i, k, c, b;
k=x.length;
c=0;
for (i=0; i<k; i++) {
c+=x[i];
b=0;
if (c<0) {
b=-(c>>bpe);
c+=b*radix;
}
x[i]=c & mask;
c=(c>>bpe)-b;
}
} | javascript | function carry_(x) {
var i, k, c, b;
k=x.length;
c=0;
for (i=0; i<k; i++) {
c+=x[i];
b=0;
if (c<0) {
b=-(c>>bpe);
c+=b*radix;
}
x[i]=c & mask;
c=(c>>bpe)-b;
}
} | [
"function",
"carry_",
"(",
"x",
")",
"{",
"var",
"i",
",",
"k",
",",
"c",
",",
"b",
";",
"k",
"=",
"x",
".",
"length",
";",
"c",
"=",
"0",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"k",
";",
"i",
"++",
")",
"{",
"c",
"+=",
"x",
... | do carries and borrows so each element of the bigInt x fits in bpe bits. | [
"do",
"carries",
"and",
"borrows",
"so",
"each",
"element",
"of",
"the",
"bigInt",
"x",
"fits",
"in",
"bpe",
"bits",
"."
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L944-L958 |
12,565 | zerobias/telegram-mtproto | src/vendor/leemon.js | modInt | function modInt(x, n) {
var i, c=0;
for (i=x.length-1; i>=0; i--)
c=(c*radix+x[i])%n;
return c;
} | javascript | function modInt(x, n) {
var i, c=0;
for (i=x.length-1; i>=0; i--)
c=(c*radix+x[i])%n;
return c;
} | [
"function",
"modInt",
"(",
"x",
",",
"n",
")",
"{",
"var",
"i",
",",
"c",
"=",
"0",
";",
"for",
"(",
"i",
"=",
"x",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"c",
"=",
"(",
"c",
"*",
"radix",
"+",
"x",
"[",
"i... | return x mod n for bigInt x and integer n. | [
"return",
"x",
"mod",
"n",
"for",
"bigInt",
"x",
"and",
"integer",
"n",
"."
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L961-L966 |
12,566 | zerobias/telegram-mtproto | src/vendor/leemon.js | equals | function equals(x, y) {
var i;
var k=x.length<y.length ? x.length : y.length;
for (i=0; i<k; i++)
if (x[i]!=y[i])
return 0;
if (x.length>y.length) {
for (;i<x.length; i++)
if (x[i])
return 0;
} else {
for (;i<y.length; i++)
if (y[i])
return 0;
}
return 1;
} | javascript | function equals(x, y) {
var i;
var k=x.length<y.length ? x.length : y.length;
for (i=0; i<k; i++)
if (x[i]!=y[i])
return 0;
if (x.length>y.length) {
for (;i<x.length; i++)
if (x[i])
return 0;
} else {
for (;i<y.length; i++)
if (y[i])
return 0;
}
return 1;
} | [
"function",
"equals",
"(",
"x",
",",
"y",
")",
"{",
"var",
"i",
";",
"var",
"k",
"=",
"x",
".",
"length",
"<",
"y",
".",
"length",
"?",
"x",
".",
"length",
":",
"y",
".",
"length",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"k",
";",
... | are bigints x and y equal? this works even if x and y are different lengths and have arbitrarily many leading zeros | [
"are",
"bigints",
"x",
"and",
"y",
"equal?",
"this",
"works",
"even",
"if",
"x",
"and",
"y",
"are",
"different",
"lengths",
"and",
"have",
"arbitrarily",
"many",
"leading",
"zeros"
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L1048-L1064 |
12,567 | zerobias/telegram-mtproto | src/vendor/leemon.js | mod_ | function mod_(x, n) {
if (s4.length!=x.length)
s4=dup(x);
else
copy_(s4, x);
if (s5.length!=x.length)
s5=dup(x);
divide_(s4, n, s5, x); //x = remainder of s4 / n
} | javascript | function mod_(x, n) {
if (s4.length!=x.length)
s4=dup(x);
else
copy_(s4, x);
if (s5.length!=x.length)
s5=dup(x);
divide_(s4, n, s5, x); //x = remainder of s4 / n
} | [
"function",
"mod_",
"(",
"x",
",",
"n",
")",
"{",
"if",
"(",
"s4",
".",
"length",
"!=",
"x",
".",
"length",
")",
"s4",
"=",
"dup",
"(",
"x",
")",
";",
"else",
"copy_",
"(",
"s4",
",",
"x",
")",
";",
"if",
"(",
"s5",
".",
"length",
"!=",
"... | do x=x mod n for bigInts x and n. | [
"do",
"x",
"=",
"x",
"mod",
"n",
"for",
"bigInts",
"x",
"and",
"n",
"."
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L1345-L1353 |
12,568 | zerobias/telegram-mtproto | src/vendor/leemon.js | trim | function trim(x, k) {
var i, y;
for (i=x.length; i>0 && !x[i-1]; i--);
y=new Array(i+k);
copy_(y, x);
return y;
} | javascript | function trim(x, k) {
var i, y;
for (i=x.length; i>0 && !x[i-1]; i--);
y=new Array(i+k);
copy_(y, x);
return y;
} | [
"function",
"trim",
"(",
"x",
",",
"k",
")",
"{",
"var",
"i",
",",
"y",
";",
"for",
"(",
"i",
"=",
"x",
".",
"length",
";",
"i",
">",
"0",
"&&",
"!",
"x",
"[",
"i",
"-",
"1",
"]",
";",
"i",
"--",
")",
";",
"y",
"=",
"new",
"Array",
"(... | return x with exactly k leading zero elements | [
"return",
"x",
"with",
"exactly",
"k",
"leading",
"zero",
"elements"
] | 3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522 | https://github.com/zerobias/telegram-mtproto/blob/3f8ba3c69974f4d4d6cc183ed2893b8ef30f3522/src/vendor/leemon.js#L1393-L1399 |
12,569 | lucasferreira/react-native-flash-message | src/FlashMessage.js | parseIcon | function parseIcon(icon = "none") {
if (!!icon && icon !== "none") {
if (typeof icon === "string") {
return { icon, position: "left", style: {} };
}
return { position: "left", style: {}, ...icon };
}
return null;
} | javascript | function parseIcon(icon = "none") {
if (!!icon && icon !== "none") {
if (typeof icon === "string") {
return { icon, position: "left", style: {} };
}
return { position: "left", style: {}, ...icon };
}
return null;
} | [
"function",
"parseIcon",
"(",
"icon",
"=",
"\"none\"",
")",
"{",
"if",
"(",
"!",
"!",
"icon",
"&&",
"icon",
"!==",
"\"none\"",
")",
"{",
"if",
"(",
"typeof",
"icon",
"===",
"\"string\"",
")",
"{",
"return",
"{",
"icon",
",",
"position",
":",
"\"left\... | Translates icon prop value into complex internal object | [
"Translates",
"icon",
"prop",
"value",
"into",
"complex",
"internal",
"object"
] | 88caa5ac87f61988f5e43f39ccb137f855e1d2b8 | https://github.com/lucasferreira/react-native-flash-message/blob/88caa5ac87f61988f5e43f39ccb137f855e1d2b8/src/FlashMessage.js#L50-L60 |
12,570 | vuikit/vuikit | packages/vuikit/src/core/v-position/directive.js | getOptions | function getOptions (ctx) {
const { vnode } = ctx
const { value } = ctx.binding
if (process.env.NODE_ENV !== 'production' && (isUndefined(value) || !isObject(value))) {
warn('v-position -> configuration is missing or is not an Object', vnode.context)
}
const options = assign({
target: null,
posi... | javascript | function getOptions (ctx) {
const { vnode } = ctx
const { value } = ctx.binding
if (process.env.NODE_ENV !== 'production' && (isUndefined(value) || !isObject(value))) {
warn('v-position -> configuration is missing or is not an Object', vnode.context)
}
const options = assign({
target: null,
posi... | [
"function",
"getOptions",
"(",
"ctx",
")",
"{",
"const",
"{",
"vnode",
"}",
"=",
"ctx",
"const",
"{",
"value",
"}",
"=",
"ctx",
".",
"binding",
"if",
"(",
"process",
".",
"env",
".",
"NODE_ENV",
"!==",
"'production'",
"&&",
"(",
"isUndefined",
"(",
"... | Get the directive props | [
"Get",
"the",
"directive",
"props"
] | 98be3d9414edbb43cfc227d8120f090b6edab97e | https://github.com/vuikit/vuikit/blob/98be3d9414edbb43cfc227d8120f090b6edab97e/packages/vuikit/src/core/v-position/directive.js#L87-L105 |
12,571 | vuikit/vuikit | packages/vuikit/src/core/v-position/directive.js | getContext | function getContext (el, binding, vnode) {
const ctx = { el, binding, vnode }
ctx.props = getOptions(ctx)
if (!ctx.props) {
binding.def.unbind(el, binding)
return
}
return ctx
} | javascript | function getContext (el, binding, vnode) {
const ctx = { el, binding, vnode }
ctx.props = getOptions(ctx)
if (!ctx.props) {
binding.def.unbind(el, binding)
return
}
return ctx
} | [
"function",
"getContext",
"(",
"el",
",",
"binding",
",",
"vnode",
")",
"{",
"const",
"ctx",
"=",
"{",
"el",
",",
"binding",
",",
"vnode",
"}",
"ctx",
".",
"props",
"=",
"getOptions",
"(",
"ctx",
")",
"if",
"(",
"!",
"ctx",
".",
"props",
")",
"{"... | Get the context used across | [
"Get",
"the",
"context",
"used",
"across"
] | 98be3d9414edbb43cfc227d8120f090b6edab97e | https://github.com/vuikit/vuikit/blob/98be3d9414edbb43cfc227d8120f090b6edab97e/packages/vuikit/src/core/v-position/directive.js#L110-L120 |
12,572 | WP-API/node-wpapi | lib/resource-handler-spec.js | extractSetterFromNode | function extractSetterFromNode( handler, node ) {
assignSetterFnForNode( handler, node );
if ( node.children ) {
// Recurse down to this node's children
Object.keys( node.children ).forEach( ( key ) => {
extractSetterFromNode( handler, node.children[ key ] );
} );
}
} | javascript | function extractSetterFromNode( handler, node ) {
assignSetterFnForNode( handler, node );
if ( node.children ) {
// Recurse down to this node's children
Object.keys( node.children ).forEach( ( key ) => {
extractSetterFromNode( handler, node.children[ key ] );
} );
}
} | [
"function",
"extractSetterFromNode",
"(",
"handler",
",",
"node",
")",
"{",
"assignSetterFnForNode",
"(",
"handler",
",",
"node",
")",
";",
"if",
"(",
"node",
".",
"children",
")",
"{",
"// Recurse down to this node's children",
"Object",
".",
"keys",
"(",
"node... | Walk the tree of a specific resource node to create the setter methods
The API we want to produce from the node tree looks like this:
wp.posts(); /wp/v2/posts
wp.posts().id( 7 ); /wp/v2/posts/7
wp.posts().id( 7 ).revisions(); /wp/v2/posts/7/revisions
wp.posts().id( 7 ).revisio... | [
"Walk",
"the",
"tree",
"of",
"a",
"specific",
"resource",
"node",
"to",
"create",
"the",
"setter",
"methods"
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/resource-handler-spec.js#L72-L82 |
12,573 | WP-API/node-wpapi | lib/resource-handler-spec.js | createNodeHandlerSpec | function createNodeHandlerSpec( routeDefinition, resource ) {
const handler = {
// A "path" is an ordered (by key) set of values composed into the final URL
_path: {
'0': resource,
},
// A "level" is a level-keyed object representing the valid options for
// one level of the resource URL
_levels: {},
... | javascript | function createNodeHandlerSpec( routeDefinition, resource ) {
const handler = {
// A "path" is an ordered (by key) set of values composed into the final URL
_path: {
'0': resource,
},
// A "level" is a level-keyed object representing the valid options for
// one level of the resource URL
_levels: {},
... | [
"function",
"createNodeHandlerSpec",
"(",
"routeDefinition",
",",
"resource",
")",
"{",
"const",
"handler",
"=",
"{",
"// A \"path\" is an ordered (by key) set of values composed into the final URL",
"_path",
":",
"{",
"'0'",
":",
"resource",
",",
"}",
",",
"// A \"level\... | Create a node handler specification object from a route definition object
@name create
@param {object} routeDefinition A route definition object
@param {string} resource The string key of the resource for which to create a handler
@returns {object} A handler spec object with _path, _levels and _setters properties | [
"Create",
"a",
"node",
"handler",
"specification",
"object",
"from",
"a",
"route",
"definition",
"object"
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/resource-handler-spec.js#L92-L122 |
12,574 | WP-API/node-wpapi | lib/path-part-setter.js | createPathPartSetter | function createPathPartSetter( node ) {
// Local references to `node` properties used by returned functions
const nodeLevel = node.level;
const nodeName = node.names[ 0 ];
const supportedMethods = node.methods || [];
const dynamicChildren = node.children ?
Object.keys( node.children )
.map( key => node.childr... | javascript | function createPathPartSetter( node ) {
// Local references to `node` properties used by returned functions
const nodeLevel = node.level;
const nodeName = node.names[ 0 ];
const supportedMethods = node.methods || [];
const dynamicChildren = node.children ?
Object.keys( node.children )
.map( key => node.childr... | [
"function",
"createPathPartSetter",
"(",
"node",
")",
"{",
"// Local references to `node` properties used by returned functions",
"const",
"nodeLevel",
"=",
"node",
".",
"level",
";",
"const",
"nodeName",
"=",
"node",
".",
"names",
"[",
"0",
"]",
";",
"const",
"supp... | Return a function to set part of the request URL path.
Path part setter methods may be either dynamic (*i.e.* may represent a
"named group") or non-dynamic (representing a static part of the URL, which
is usually a collection endpoint of some sort). Which type of function is
returned depends on whether a given route h... | [
"Return",
"a",
"function",
"to",
"set",
"part",
"of",
"the",
"request",
"URL",
"path",
"."
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/path-part-setter.js#L18-L83 |
12,575 | WP-API/node-wpapi | lib/wp-register-route.js | registerRoute | function registerRoute( namespace, restBase, options = {} ) {
// Support all methods until requested to do otherwise
let supportedMethods = [ 'head', 'get', 'patch', 'put', 'post', 'delete' ];
if ( Array.isArray( options.methods ) ) {
// Permit supported methods to be specified as an array
supportedMethods = op... | javascript | function registerRoute( namespace, restBase, options = {} ) {
// Support all methods until requested to do otherwise
let supportedMethods = [ 'head', 'get', 'patch', 'put', 'post', 'delete' ];
if ( Array.isArray( options.methods ) ) {
// Permit supported methods to be specified as an array
supportedMethods = op... | [
"function",
"registerRoute",
"(",
"namespace",
",",
"restBase",
",",
"options",
"=",
"{",
"}",
")",
"{",
"// Support all methods until requested to do otherwise",
"let",
"supportedMethods",
"=",
"[",
"'head'",
",",
"'get'",
",",
"'patch'",
",",
"'put'",
",",
"'pos... | Create and return a handler for an arbitrary WP REST API endpoint.
The first two parameters mirror `register_rest_route` in the REST API
codebase:
@memberof! WPAPI#
@param {string} namespace A namespace string, e.g. 'myplugin/v1'
@param {string} restBase A REST route string, e.g. '/author/(?P<id>... | [
"Create",
"and",
"return",
"a",
"handler",
"for",
"an",
"arbitrary",
"WP",
"REST",
"API",
"endpoint",
"."
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/wp-register-route.js#L23-L100 |
12,576 | WP-API/node-wpapi | lib/route-tree.js | reduceRouteComponents | function reduceRouteComponents( routeObj, topLevel, parentLevel, component, idx, components ) {
// Check to see if this component is a dynamic URL segment (i.e. defined by
// a named capture group regular expression). namedGroup will be `null` if
// the regexp does not match, or else an array defining the RegExp mat... | javascript | function reduceRouteComponents( routeObj, topLevel, parentLevel, component, idx, components ) {
// Check to see if this component is a dynamic URL segment (i.e. defined by
// a named capture group regular expression). namedGroup will be `null` if
// the regexp does not match, or else an array defining the RegExp mat... | [
"function",
"reduceRouteComponents",
"(",
"routeObj",
",",
"topLevel",
",",
"parentLevel",
",",
"component",
",",
"idx",
",",
"components",
")",
"{",
"// Check to see if this component is a dynamic URL segment (i.e. defined by",
"// a named capture group regular expression). namedG... | Method to use when reducing route components array.
@private
@param {object} routeObj A route definition object (set via .bind partial application)
@param {object} topLevel The top-level route tree object for this set of routes (set
via .bind partial application)
@param {object} parentLevel The memo object, w... | [
"Method",
"to",
"use",
"when",
"reducing",
"route",
"components",
"array",
"."
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/route-tree.js#L25-L127 |
12,577 | WP-API/node-wpapi | wpapi.js | WPAPI | function WPAPI( options ) {
// Enforce `new`
if ( this instanceof WPAPI === false ) {
return new WPAPI( options );
}
if ( typeof options.endpoint !== 'string' ) {
throw new Error( 'options hash must contain an API endpoint URL string' );
}
// Dictionary to be filled by handlers for default namespaces
this... | javascript | function WPAPI( options ) {
// Enforce `new`
if ( this instanceof WPAPI === false ) {
return new WPAPI( options );
}
if ( typeof options.endpoint !== 'string' ) {
throw new Error( 'options hash must contain an API endpoint URL string' );
}
// Dictionary to be filled by handlers for default namespaces
this... | [
"function",
"WPAPI",
"(",
"options",
")",
"{",
"// Enforce `new`",
"if",
"(",
"this",
"instanceof",
"WPAPI",
"===",
"false",
")",
"{",
"return",
"new",
"WPAPI",
"(",
"options",
")",
";",
"}",
"if",
"(",
"typeof",
"options",
".",
"endpoint",
"!==",
"'stri... | Construct a REST API client instance object to create
@constructor WPAPI
@param {Object} options An options hash to configure the instance
@param {String} options.endpoint The URI for a WP-API endpoint
@param {String} [options.username] A WP-API Basic Auth username
@param {String} [options.password] A... | [
"Construct",
"a",
"REST",
"API",
"client",
"instance",
"object",
"to",
"create"
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/wpapi.js#L54-L83 |
12,578 | WP-API/node-wpapi | lib/constructors/wp-request.js | WPRequest | function WPRequest( options ) {
/**
* Configuration options for the request
*
* @property _options
* @type Object
* @private
* @default {}
*/
this._options = [
// Whitelisted options keys
'auth',
'endpoint',
'headers',
'username',
'password',
'nonce',
].reduce( ( localOptions, key ) => {
... | javascript | function WPRequest( options ) {
/**
* Configuration options for the request
*
* @property _options
* @type Object
* @private
* @default {}
*/
this._options = [
// Whitelisted options keys
'auth',
'endpoint',
'headers',
'username',
'password',
'nonce',
].reduce( ( localOptions, key ) => {
... | [
"function",
"WPRequest",
"(",
"options",
")",
"{",
"/**\n\t * Configuration options for the request\n\t *\n\t * @property _options\n\t * @type Object\n\t * @private\n\t * @default {}\n\t */",
"this",
".",
"_options",
"=",
"[",
"// Whitelisted options keys",
"'auth'",
",",
"'endpoint'",... | WPRequest is the base API request object constructor
@constructor WPRequest
@param {Object} options A hash of options for the WPRequest instance
@param {String} options.endpoint The endpoint URI for the invoking WPAPI instance
@param {Object} options.transport An object of http transport methods (get, post, etc)
@para... | [
"WPRequest",
"is",
"the",
"base",
"API",
"request",
"object",
"constructor"
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/constructors/wp-request.js#L22-L87 |
12,579 | WP-API/node-wpapi | lib/endpoint-request.js | createEndpointRequest | function createEndpointRequest( handlerSpec, resource, namespace ) {
// Create the constructor function for this endpoint
class EndpointRequest extends WPRequest {
constructor( options ) {
super( options );
/**
* Semi-private instance property specifying the available URL path options
* for this end... | javascript | function createEndpointRequest( handlerSpec, resource, namespace ) {
// Create the constructor function for this endpoint
class EndpointRequest extends WPRequest {
constructor( options ) {
super( options );
/**
* Semi-private instance property specifying the available URL path options
* for this end... | [
"function",
"createEndpointRequest",
"(",
"handlerSpec",
",",
"resource",
",",
"namespace",
")",
"{",
"// Create the constructor function for this endpoint",
"class",
"EndpointRequest",
"extends",
"WPRequest",
"{",
"constructor",
"(",
"options",
")",
"{",
"super",
"(",
... | Create an endpoint request handler constructor for a specific resource tree
@method create
@param {Object} handlerSpec A resource handler specification object
@param {String} resource The root resource of requests created from the returned factory
@param {String} namespace The namespace string for the returned fa... | [
"Create",
"an",
"endpoint",
"request",
"handler",
"constructor",
"for",
"a",
"specific",
"resource",
"tree"
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/lib/endpoint-request.js#L20-L68 |
12,580 | WP-API/node-wpapi | superagent/http-transport.js | _setHeaders | function _setHeaders( request, options ) {
// If there's no headers, do nothing
if ( ! options.headers ) {
return request;
}
return objectReduce(
options.headers,
( request, value, key ) => request.set( key, value ),
request
);
} | javascript | function _setHeaders( request, options ) {
// If there's no headers, do nothing
if ( ! options.headers ) {
return request;
}
return objectReduce(
options.headers,
( request, value, key ) => request.set( key, value ),
request
);
} | [
"function",
"_setHeaders",
"(",
"request",
",",
"options",
")",
"{",
"// If there's no headers, do nothing",
"if",
"(",
"!",
"options",
".",
"headers",
")",
"{",
"return",
"request",
";",
"}",
"return",
"objectReduce",
"(",
"options",
".",
"headers",
",",
"(",... | Set any provided headers on the outgoing request object. Runs after _auth.
@method _setHeaders
@private
@param {Object} request A superagent request object
@param {Object} options A WPRequest _options object
@param {Object} A superagent request object, with any available headers set | [
"Set",
"any",
"provided",
"headers",
"on",
"the",
"outgoing",
"request",
"object",
".",
"Runs",
"after",
"_auth",
"."
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/superagent/http-transport.js#L23-L34 |
12,581 | WP-API/node-wpapi | superagent/http-transport.js | _auth | function _auth( request, options, forceAuthentication ) {
// If we're not supposed to authenticate, don't even start
if ( ! forceAuthentication && ! options.auth && ! options.nonce ) {
return request;
}
// Enable nonce in options for Cookie authentication http://wp-api.org/guides/authentication.html
if ( option... | javascript | function _auth( request, options, forceAuthentication ) {
// If we're not supposed to authenticate, don't even start
if ( ! forceAuthentication && ! options.auth && ! options.nonce ) {
return request;
}
// Enable nonce in options for Cookie authentication http://wp-api.org/guides/authentication.html
if ( option... | [
"function",
"_auth",
"(",
"request",
",",
"options",
",",
"forceAuthentication",
")",
"{",
"// If we're not supposed to authenticate, don't even start",
"if",
"(",
"!",
"forceAuthentication",
"&&",
"!",
"options",
".",
"auth",
"&&",
"!",
"options",
".",
"nonce",
")"... | Conditionally set basic authentication on a server request object.
@method _auth
@private
@param {Object} request A superagent request object
@param {Object} options A WPRequest _options object
@param {Boolean} forceAuthentication whether to force authentication on the request
@param {Object} A superagent request obje... | [
"Conditionally",
"set",
"basic",
"authentication",
"on",
"a",
"server",
"request",
"object",
"."
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/superagent/http-transport.js#L46-L69 |
12,582 | WP-API/node-wpapi | superagent/http-transport.js | createPaginationObject | function createPaginationObject( result, options, httpTransport ) {
let _paging = null;
if ( ! result.headers ) {
// No headers: return as-is
return _paging;
}
// Guard against capitalization inconsistencies in returned headers
Object.keys( result.headers ).forEach( ( header ) => {
result.headers[ header.t... | javascript | function createPaginationObject( result, options, httpTransport ) {
let _paging = null;
if ( ! result.headers ) {
// No headers: return as-is
return _paging;
}
// Guard against capitalization inconsistencies in returned headers
Object.keys( result.headers ).forEach( ( header ) => {
result.headers[ header.t... | [
"function",
"createPaginationObject",
"(",
"result",
",",
"options",
",",
"httpTransport",
")",
"{",
"let",
"_paging",
"=",
"null",
";",
"if",
"(",
"!",
"result",
".",
"headers",
")",
"{",
"// No headers: return as-is",
"return",
"_paging",
";",
"}",
"// Guard... | If the response is not paged, return the body as-is. If pagination
information is present in the response headers, parse those headers into
a custom `_paging` property on the response body. `_paging` contains links
to the previous and next pages in the collection, as well as metadata
about the size and number of pages ... | [
"If",
"the",
"response",
"is",
"not",
"paged",
"return",
"the",
"body",
"as",
"-",
"is",
".",
"If",
"pagination",
"information",
"is",
"present",
"in",
"the",
"response",
"headers",
"parse",
"those",
"headers",
"into",
"a",
"custom",
"_paging",
"property",
... | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/superagent/http-transport.js#L120-L176 |
12,583 | WP-API/node-wpapi | superagent/http-transport.js | returnBody | function returnBody( wpreq, result ) {
const body = extractResponseBody( result );
const _paging = createPaginationObject( result, wpreq._options, wpreq.transport );
if ( _paging ) {
body._paging = _paging;
}
return body;
} | javascript | function returnBody( wpreq, result ) {
const body = extractResponseBody( result );
const _paging = createPaginationObject( result, wpreq._options, wpreq.transport );
if ( _paging ) {
body._paging = _paging;
}
return body;
} | [
"function",
"returnBody",
"(",
"wpreq",
",",
"result",
")",
"{",
"const",
"body",
"=",
"extractResponseBody",
"(",
"result",
")",
";",
"const",
"_paging",
"=",
"createPaginationObject",
"(",
"result",
",",
"wpreq",
".",
"_options",
",",
"wpreq",
".",
"transp... | Return the body of the request, augmented with pagination information if the
result is a paged collection.
@private
@param {WPRequest} wpreq The WPRequest representing the returned HTTP response
@param {Object} result The results from the HTTP request
@returns {Object} The "body" property of the result, conditionally ... | [
"Return",
"the",
"body",
"of",
"the",
"request",
"augmented",
"with",
"pagination",
"information",
"if",
"the",
"result",
"is",
"a",
"paged",
"collection",
"."
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/superagent/http-transport.js#L240-L247 |
12,584 | WP-API/node-wpapi | superagent/http-transport.js | _httpPost | function _httpPost( wpreq, data, callback ) {
checkMethodSupport( 'post', wpreq );
const url = wpreq.toString();
data = data || {};
let request = _auth( agent.post( url ), wpreq._options, true );
request = _setHeaders( request, wpreq._options );
if ( wpreq._attachment ) {
// Data must be form-encoded alongside... | javascript | function _httpPost( wpreq, data, callback ) {
checkMethodSupport( 'post', wpreq );
const url = wpreq.toString();
data = data || {};
let request = _auth( agent.post( url ), wpreq._options, true );
request = _setHeaders( request, wpreq._options );
if ( wpreq._attachment ) {
// Data must be form-encoded alongside... | [
"function",
"_httpPost",
"(",
"wpreq",
",",
"data",
",",
"callback",
")",
"{",
"checkMethodSupport",
"(",
"'post'",
",",
"wpreq",
")",
";",
"const",
"url",
"=",
"wpreq",
".",
"toString",
"(",
")",
";",
"data",
"=",
"data",
"||",
"{",
"}",
";",
"let",... | Invoke an HTTP "POST" request against the provided endpoint
@method post
@async
@param {WPRequest} wpreq A WPRequest query object
@param {Object} data The data for the POST request
@param {Function} [callback] A callback to invoke with the results of the POST request
@returns {Promise} A promise to the results of the H... | [
"Invoke",
"an",
"HTTP",
"POST",
"request",
"against",
"the",
"provided",
"endpoint"
] | 613655cde217548bf1d7e2842b1b5e7a338114fd | https://github.com/WP-API/node-wpapi/blob/613655cde217548bf1d7e2842b1b5e7a338114fd/superagent/http-transport.js#L289-L308 |
12,585 | zeit/now-env | lib/apply-env.js | applyEnv | function applyEnv(env, secrets = {}, required = {}) {
if (Array.isArray(env)) {
env.forEach(key => {
// if the key already exists don't overwrite it
if (!process.env[key]) {
const value = getValue(key, {}, secrets, required)
process.env[key] = value
}
})
} else {
Object... | javascript | function applyEnv(env, secrets = {}, required = {}) {
if (Array.isArray(env)) {
env.forEach(key => {
// if the key already exists don't overwrite it
if (!process.env[key]) {
const value = getValue(key, {}, secrets, required)
process.env[key] = value
}
})
} else {
Object... | [
"function",
"applyEnv",
"(",
"env",
",",
"secrets",
"=",
"{",
"}",
",",
"required",
"=",
"{",
"}",
")",
"{",
"if",
"(",
"Array",
".",
"isArray",
"(",
"env",
")",
")",
"{",
"env",
".",
"forEach",
"(",
"key",
"=>",
"{",
"// if the key already exists do... | Apply the environment variables to `process.env`
@param {Object} env Map of environment variables
@param {Object} secrets Map of secrets
@param {Object} required Map of required values | [
"Apply",
"the",
"environment",
"variables",
"to",
"process",
".",
"env"
] | 7761209e7c2500a17ca89398e62f65e6eb31af5d | https://github.com/zeit/now-env/blob/7761209e7c2500a17ca89398e62f65e6eb31af5d/lib/apply-env.js#L9-L27 |
12,586 | zeit/now-env | index.js | config | function config() {
// only run this if it's not running inside Now.sh
if (Boolean(process.env.NOW_REGION || process.env.NOW)) return
const secrets = loadSecrets()
const required = loadRequired()
// load environment variables from now.json
loadNowJSON(secrets, required)
} | javascript | function config() {
// only run this if it's not running inside Now.sh
if (Boolean(process.env.NOW_REGION || process.env.NOW)) return
const secrets = loadSecrets()
const required = loadRequired()
// load environment variables from now.json
loadNowJSON(secrets, required)
} | [
"function",
"config",
"(",
")",
"{",
"// only run this if it's not running inside Now.sh",
"if",
"(",
"Boolean",
"(",
"process",
".",
"env",
".",
"NOW_REGION",
"||",
"process",
".",
"env",
".",
"NOW",
")",
")",
"return",
"const",
"secrets",
"=",
"loadSecrets",
... | Check if is running inside Now.sh and apply variables and secrets to `process.env` | [
"Check",
"if",
"is",
"running",
"inside",
"Now",
".",
"sh",
"and",
"apply",
"variables",
"and",
"secrets",
"to",
"process",
".",
"env"
] | 7761209e7c2500a17ca89398e62f65e6eb31af5d | https://github.com/zeit/now-env/blob/7761209e7c2500a17ca89398e62f65e6eb31af5d/index.js#L11-L20 |
12,587 | RasCarlito/axios-cache-adapter | src/index.js | setupCache | function setupCache (config = {}) {
// Extend default configuration
config = makeConfig(config)
// Axios adapter. Receives the axios request configuration as only parameter
async function adapter (req) {
// Merge the per-request config with the instance config.
const reqConfig = mergeRequestConfig(conf... | javascript | function setupCache (config = {}) {
// Extend default configuration
config = makeConfig(config)
// Axios adapter. Receives the axios request configuration as only parameter
async function adapter (req) {
// Merge the per-request config with the instance config.
const reqConfig = mergeRequestConfig(conf... | [
"function",
"setupCache",
"(",
"config",
"=",
"{",
"}",
")",
"{",
"// Extend default configuration",
"config",
"=",
"makeConfig",
"(",
"config",
")",
"// Axios adapter. Receives the axios request configuration as only parameter",
"async",
"function",
"adapter",
"(",
"req",
... | Configure cache adapter
@param {object} [config={}] Cache adapter options
@returns {object} Object containing cache `adapter` and `store` | [
"Configure",
"cache",
"adapter"
] | af9808c2e862b32ac76a0921e9b27a310be83c67 | https://github.com/RasCarlito/axios-cache-adapter/blob/af9808c2e862b32ac76a0921e9b27a310be83c67/src/index.js#L16-L80 |
12,588 | parro-it/libui-node | examples/histogram.js | buildSolidBrush | function buildSolidBrush(color, alpha) {
let component;
component = (color >> 16) & 0xff;
const R = component / 255;
component = (color >> 8) & 0xff;
const G = component / 255;
component = color & 0xff;
const B = component / 255;
const A = alpha;
const brush = new libui.DrawBrush();
brush.color = new libui.... | javascript | function buildSolidBrush(color, alpha) {
let component;
component = (color >> 16) & 0xff;
const R = component / 255;
component = (color >> 8) & 0xff;
const G = component / 255;
component = color & 0xff;
const B = component / 255;
const A = alpha;
const brush = new libui.DrawBrush();
brush.color = new libui.... | [
"function",
"buildSolidBrush",
"(",
"color",
",",
"alpha",
")",
"{",
"let",
"component",
";",
"component",
"=",
"(",
"color",
">>",
"16",
")",
"&",
"0xff",
";",
"const",
"R",
"=",
"component",
"/",
"255",
";",
"component",
"=",
"(",
"color",
">>",
"8... | Helper to quickly set a brush color | [
"Helper",
"to",
"quickly",
"set",
"a",
"brush",
"color"
] | 7da20e42f446cae99088c6fbacad18ab2944061b | https://github.com/parro-it/libui-node/blob/7da20e42f446cae99088c6fbacad18ab2944061b/examples/histogram.js#L177-L193 |
12,589 | aishek/jquery-animateNumber | jquery.animateNumber.js | function(suffix) {
return function(now, tween) {
var floored_number = Math.floor(now),
target = $(tween.elem);
target.prop('number', now).text(floored_number + suffix);
};
} | javascript | function(suffix) {
return function(now, tween) {
var floored_number = Math.floor(now),
target = $(tween.elem);
target.prop('number', now).text(floored_number + suffix);
};
} | [
"function",
"(",
"suffix",
")",
"{",
"return",
"function",
"(",
"now",
",",
"tween",
")",
"{",
"var",
"floored_number",
"=",
"Math",
".",
"floor",
"(",
"now",
")",
",",
"target",
"=",
"$",
"(",
"tween",
".",
"elem",
")",
";",
"target",
".",
"prop",... | Creates numberStep handler, which appends string to floored animated number on each step.
@example
// will animate to 100 with "1 %", "2 %", "3 %", ...
$('#someid').animateNumber({
number: 100,
numberStep: $.animateNumber.numberStepFactories.append(' %')
});
@params {String} suffix string to append to animated number... | [
"Creates",
"numberStep",
"handler",
"which",
"appends",
"string",
"to",
"floored",
"animated",
"number",
"on",
"each",
"step",
"."
] | 59fa20d3f12b76ad19876ab7d04a9feb10b0ed80 | https://github.com/aishek/jquery-animateNumber/blob/59fa20d3f12b76ad19876ab7d04a9feb10b0ed80/jquery.animateNumber.js#L86-L93 | |
12,590 | aishek/jquery-animateNumber | jquery.animateNumber.js | function(separator, group_length, suffix) {
separator = separator || ' ';
group_length = group_length || 3;
suffix = suffix || '';
return function(now, tween) {
var negative = now < 0,
floored_number = Math.floor((negative ? -1 : 1) * now),
separate... | javascript | function(separator, group_length, suffix) {
separator = separator || ' ';
group_length = group_length || 3;
suffix = suffix || '';
return function(now, tween) {
var negative = now < 0,
floored_number = Math.floor((negative ? -1 : 1) * now),
separate... | [
"function",
"(",
"separator",
",",
"group_length",
",",
"suffix",
")",
"{",
"separator",
"=",
"separator",
"||",
"' '",
";",
"group_length",
"=",
"group_length",
"||",
"3",
";",
"suffix",
"=",
"suffix",
"||",
"''",
";",
"return",
"function",
"(",
"now",
... | Creates numberStep handler, which format floored numbers by separating them to groups.
@example
// will animate with 1 ... 217,980 ... 95,217,980 ... 7,095,217,980
$('#world-population').animateNumber({
number: 7095217980,
numberStep: $.animateNumber.numberStepFactories.separator(',')
});
@example
// will animate with... | [
"Creates",
"numberStep",
"handler",
"which",
"format",
"floored",
"numbers",
"by",
"separating",
"them",
"to",
"groups",
"."
] | 59fa20d3f12b76ad19876ab7d04a9feb10b0ed80 | https://github.com/aishek/jquery-animateNumber/blob/59fa20d3f12b76ad19876ab7d04a9feb10b0ed80/jquery.animateNumber.js#L116-L136 | |
12,591 | Vestride/Shuffle | docs/js/demos/ajax.js | getMarkupFromData | function getMarkupFromData(dataForSingleItem) {
var name = dataForSingleItem.first_name + ' ' + dataForSingleItem.last_name;
// https://www.paulirish.com/2009/random-hex-color-code-snippets/
var randomColor = ('000000' + Math.random().toString(16).slice(2, 8)).slice(-6);
return [
'<div class="js-item col-3@... | javascript | function getMarkupFromData(dataForSingleItem) {
var name = dataForSingleItem.first_name + ' ' + dataForSingleItem.last_name;
// https://www.paulirish.com/2009/random-hex-color-code-snippets/
var randomColor = ('000000' + Math.random().toString(16).slice(2, 8)).slice(-6);
return [
'<div class="js-item col-3@... | [
"function",
"getMarkupFromData",
"(",
"dataForSingleItem",
")",
"{",
"var",
"name",
"=",
"dataForSingleItem",
".",
"first_name",
"+",
"' '",
"+",
"dataForSingleItem",
".",
"last_name",
";",
"// https://www.paulirish.com/2009/random-hex-color-code-snippets/",
"var",
"randomC... | Convert an object to HTML markup for an item.
@param {object} dataForSingleItem Data object.
@return {string} | [
"Convert",
"an",
"object",
"to",
"HTML",
"markup",
"for",
"an",
"item",
"."
] | 9fd4b557b6030e23c5b4b8e68233a42833df423f | https://github.com/Vestride/Shuffle/blob/9fd4b557b6030e23c5b4b8e68233a42833df423f/docs/js/demos/ajax.js#L66-L77 |
12,592 | Vestride/Shuffle | docs/js/demos/ajax.js | replaceLoadMoreButton | function replaceLoadMoreButton() {
var text = document.createTextNode('All users loaded');
var replacement = document.createElement('p');
replacement.appendChild(text);
loadMoreButton.parentNode.replaceChild(replacement, loadMoreButton);
} | javascript | function replaceLoadMoreButton() {
var text = document.createTextNode('All users loaded');
var replacement = document.createElement('p');
replacement.appendChild(text);
loadMoreButton.parentNode.replaceChild(replacement, loadMoreButton);
} | [
"function",
"replaceLoadMoreButton",
"(",
")",
"{",
"var",
"text",
"=",
"document",
".",
"createTextNode",
"(",
"'All users loaded'",
")",
";",
"var",
"replacement",
"=",
"document",
".",
"createElement",
"(",
"'p'",
")",
";",
"replacement",
".",
"appendChild",
... | Remove the load more button so that the user cannot click it again. | [
"Remove",
"the",
"load",
"more",
"button",
"so",
"that",
"the",
"user",
"cannot",
"click",
"it",
"again",
"."
] | 9fd4b557b6030e23c5b4b8e68233a42833df423f | https://github.com/Vestride/Shuffle/blob/9fd4b557b6030e23c5b4b8e68233a42833df423f/docs/js/demos/ajax.js#L101-L106 |
12,593 | Vestride/Shuffle | docs/js/demos/react.js | PhotoItem | function PhotoItem({ id, username, src, name }) {
return (
<div key={id} className="col-3@xs col-4@sm photo-item">
<div className="aspect aspect--4x3">
<div className="aspect__inner">
<img src={src} />
<PhotoAttribution username={username} name={name} />
</div>
</di... | javascript | function PhotoItem({ id, username, src, name }) {
return (
<div key={id} className="col-3@xs col-4@sm photo-item">
<div className="aspect aspect--4x3">
<div className="aspect__inner">
<img src={src} />
<PhotoAttribution username={username} name={name} />
</div>
</di... | [
"function",
"PhotoItem",
"(",
"{",
"id",
",",
"username",
",",
"src",
",",
"name",
"}",
")",
"{",
"return",
"(",
"<",
"div",
"key",
"=",
"{",
"id",
"}",
"className",
"=",
"\"col-3@xs col-4@sm photo-item\"",
">",
"\n ",
"<",
"div",
"className",
"=",
... | A grid item for a photo.
@param {{ id: number, username: string, src: string, name: string }} props Component props.
@return {JSX.Element} | [
"A",
"grid",
"item",
"for",
"a",
"photo",
"."
] | 9fd4b557b6030e23c5b4b8e68233a42833df423f | https://github.com/Vestride/Shuffle/blob/9fd4b557b6030e23c5b4b8e68233a42833df423f/docs/js/demos/react.js#L123-L134 |
12,594 | Vestride/Shuffle | docs/js/demos/react.js | PhotoAttribution | function PhotoAttribution({ username, name }) {
if (!username) {
return null;
}
const href = `https://unsplash.com/${username}?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge`;
const title = `Download free do whatever you want high-resolution photos from ${name}`;
ret... | javascript | function PhotoAttribution({ username, name }) {
if (!username) {
return null;
}
const href = `https://unsplash.com/${username}?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge`;
const title = `Download free do whatever you want high-resolution photos from ${name}`;
ret... | [
"function",
"PhotoAttribution",
"(",
"{",
"username",
",",
"name",
"}",
")",
"{",
"if",
"(",
"!",
"username",
")",
"{",
"return",
"null",
";",
"}",
"const",
"href",
"=",
"`",
"${",
"username",
"}",
"`",
";",
"const",
"title",
"=",
"`",
"${",
"name"... | A small badge with a link to the author of the photo's profile.
@param {{ username: string, name: string }} props Component props.
@return {JSX.Element} | [
"A",
"small",
"badge",
"with",
"a",
"link",
"to",
"the",
"author",
"of",
"the",
"photo",
"s",
"profile",
"."
] | 9fd4b557b6030e23c5b4b8e68233a42833df423f | https://github.com/Vestride/Shuffle/blob/9fd4b557b6030e23c5b4b8e68233a42833df423f/docs/js/demos/react.js#L141-L158 |
12,595 | ondras/rot.js | lib/map/ellermaze.js | addToList | function addToList(i, L, R) {
R[L[i + 1]] = R[i];
L[R[i]] = L[i + 1];
R[i] = i + 1;
L[i + 1] = i;
} | javascript | function addToList(i, L, R) {
R[L[i + 1]] = R[i];
L[R[i]] = L[i + 1];
R[i] = i + 1;
L[i + 1] = i;
} | [
"function",
"addToList",
"(",
"i",
",",
"L",
",",
"R",
")",
"{",
"R",
"[",
"L",
"[",
"i",
"+",
"1",
"]",
"]",
"=",
"R",
"[",
"i",
"]",
";",
"L",
"[",
"R",
"[",
"i",
"]",
"]",
"=",
"L",
"[",
"i",
"+",
"1",
"]",
";",
"R",
"[",
"i",
... | Join lists with "i" and "i+1" | [
"Join",
"lists",
"with",
"i",
"and",
"i",
"+",
"1"
] | 57c4c9e22fa4614f69f42d34ccc83f679615bbf1 | https://github.com/ondras/rot.js/blob/57c4c9e22fa4614f69f42d34ccc83f679615bbf1/lib/map/ellermaze.js#L6-L11 |
12,596 | ondras/rot.js | lib/map/ellermaze.js | removeFromList | function removeFromList(i, L, R) {
R[L[i]] = R[i];
L[R[i]] = L[i];
R[i] = i;
L[i] = i;
} | javascript | function removeFromList(i, L, R) {
R[L[i]] = R[i];
L[R[i]] = L[i];
R[i] = i;
L[i] = i;
} | [
"function",
"removeFromList",
"(",
"i",
",",
"L",
",",
"R",
")",
"{",
"R",
"[",
"L",
"[",
"i",
"]",
"]",
"=",
"R",
"[",
"i",
"]",
";",
"L",
"[",
"R",
"[",
"i",
"]",
"]",
"=",
"L",
"[",
"i",
"]",
";",
"R",
"[",
"i",
"]",
"=",
"i",
";... | Remove "i" from its list | [
"Remove",
"i",
"from",
"its",
"list"
] | 57c4c9e22fa4614f69f42d34ccc83f679615bbf1 | https://github.com/ondras/rot.js/blob/57c4c9e22fa4614f69f42d34ccc83f679615bbf1/lib/map/ellermaze.js#L15-L20 |
12,597 | ondras/rot.js | lib/text.js | breakInsideToken | function breakInsideToken(tokens, tokenIndex, breakIndex, removeBreakChar) {
let newBreakToken = {
type: TYPE_NEWLINE
};
let newTextToken = {
type: TYPE_TEXT,
value: tokens[tokenIndex].value.substring(breakIndex + (removeBreakChar ? 1 : 0))
};
tokens.splice(tokenIndex + 1, 0,... | javascript | function breakInsideToken(tokens, tokenIndex, breakIndex, removeBreakChar) {
let newBreakToken = {
type: TYPE_NEWLINE
};
let newTextToken = {
type: TYPE_TEXT,
value: tokens[tokenIndex].value.substring(breakIndex + (removeBreakChar ? 1 : 0))
};
tokens.splice(tokenIndex + 1, 0,... | [
"function",
"breakInsideToken",
"(",
"tokens",
",",
"tokenIndex",
",",
"breakIndex",
",",
"removeBreakChar",
")",
"{",
"let",
"newBreakToken",
"=",
"{",
"type",
":",
"TYPE_NEWLINE",
"}",
";",
"let",
"newTextToken",
"=",
"{",
"type",
":",
"TYPE_TEXT",
",",
"v... | Create new tokens and insert them into the stream
@param {object[]} tokens
@param {int} tokenIndex Token being processed
@param {int} breakIndex Index within current token's value
@param {bool} removeBreakChar Do we want to remove the breaking character?
@returns {string} remaining unbroken token value | [
"Create",
"new",
"tokens",
"and",
"insert",
"them",
"into",
"the",
"stream"
] | 57c4c9e22fa4614f69f42d34ccc83f679615bbf1 | https://github.com/ondras/rot.js/blob/57c4c9e22fa4614f69f42d34ccc83f679615bbf1/lib/text.js#L172-L182 |
12,598 | aframevr/aframe-inspector | src/lib/entity.js | insertAfter | function insertAfter(newNode, referenceNode) {
if (!referenceNode.parentNode) {
referenceNode = AFRAME.INSPECTOR.selectedEntity;
}
if (!referenceNode) {
AFRAME.INSPECTOR.sceneEl.appendChild(newNode);
} else {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}
} | javascript | function insertAfter(newNode, referenceNode) {
if (!referenceNode.parentNode) {
referenceNode = AFRAME.INSPECTOR.selectedEntity;
}
if (!referenceNode) {
AFRAME.INSPECTOR.sceneEl.appendChild(newNode);
} else {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}
} | [
"function",
"insertAfter",
"(",
"newNode",
",",
"referenceNode",
")",
"{",
"if",
"(",
"!",
"referenceNode",
".",
"parentNode",
")",
"{",
"referenceNode",
"=",
"AFRAME",
".",
"INSPECTOR",
".",
"selectedEntity",
";",
"}",
"if",
"(",
"!",
"referenceNode",
")",
... | Insert an node after a referenced node.
@param {Element} newNode Node to insert.
@param {Element} referenceNode Node used as reference to insert after it. | [
"Insert",
"an",
"node",
"after",
"a",
"referenced",
"node",
"."
] | bb0de5e92e4f0ee727726d5f580a0876d5e49047 | https://github.com/aframevr/aframe-inspector/blob/bb0de5e92e4f0ee727726d5f580a0876d5e49047/src/lib/entity.js#L112-L122 |
12,599 | aframevr/aframe-inspector | src/lib/entity.js | prepareForSerialization | function prepareForSerialization(entity) {
var clone = entity.cloneNode(false);
var children = entity.childNodes;
for (var i = 0, l = children.length; i < l; i++) {
var child = children[i];
if (
child.nodeType !== Node.ELEMENT_NODE ||
(!child.hasAttribute('aframe-injected') &&
!child.h... | javascript | function prepareForSerialization(entity) {
var clone = entity.cloneNode(false);
var children = entity.childNodes;
for (var i = 0, l = children.length; i < l; i++) {
var child = children[i];
if (
child.nodeType !== Node.ELEMENT_NODE ||
(!child.hasAttribute('aframe-injected') &&
!child.h... | [
"function",
"prepareForSerialization",
"(",
"entity",
")",
"{",
"var",
"clone",
"=",
"entity",
".",
"cloneNode",
"(",
"false",
")",
";",
"var",
"children",
"=",
"entity",
".",
"childNodes",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"childre... | Returns a copy of the DOM hierarchy prepared for serialization.
The process optimises component representation to avoid values coming from
primitive attributes, mixins and defaults.
@param {Element} entity Root of the DOM hierarchy.
@return {Elment} Copy of the DOM hierarchy ready for serialization. | [
"Returns",
"a",
"copy",
"of",
"the",
"DOM",
"hierarchy",
"prepared",
"for",
"serialization",
".",
"The",
"process",
"optimises",
"component",
"representation",
"to",
"avoid",
"values",
"coming",
"from",
"primitive",
"attributes",
"mixins",
"and",
"defaults",
"."
] | bb0de5e92e4f0ee727726d5f580a0876d5e49047 | https://github.com/aframevr/aframe-inspector/blob/bb0de5e92e4f0ee727726d5f580a0876d5e49047/src/lib/entity.js#L171-L187 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.