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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
10,700 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | _goto | function _goto(n) {
if (n) {
// setFocus/setActive will scroll later (if autoScroll is specified)
try {
n.makeVisible({ scrollIntoView: false });
} catch (e) {} // #272
// Node may still be hidden by a filter
if (!$(n.span).is(":visible")) {
n.debug("Navigate: skipping hidden no... | javascript | function _goto(n) {
if (n) {
// setFocus/setActive will scroll later (if autoScroll is specified)
try {
n.makeVisible({ scrollIntoView: false });
} catch (e) {} // #272
// Node may still be hidden by a filter
if (!$(n.span).is(":visible")) {
n.debug("Navigate: skipping hidden no... | [
"function",
"_goto",
"(",
"n",
")",
"{",
"if",
"(",
"n",
")",
"{",
"// setFocus/setActive will scroll later (if autoScroll is specified)",
"try",
"{",
"n",
".",
"makeVisible",
"(",
"{",
"scrollIntoView",
":",
"false",
"}",
")",
";",
"}",
"catch",
"(",
"e",
"... | Navigate to node | [
"Navigate",
"to",
"node"
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L3137-L3151 |
10,701 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(cmp, deep) {
var i,
l,
cl = this.children;
if (!cl) {
return;
}
cmp =
cmp ||
function(a, b) {
var x = a.title.toLowerCase(),
y = b.title.toLowerCase();
return x === y ? 0 : x > y ? 1 : -1;
};
cl.sort(cmp);
if (deep) {
for (i = 0, l = cl.length; i <... | javascript | function(cmp, deep) {
var i,
l,
cl = this.children;
if (!cl) {
return;
}
cmp =
cmp ||
function(a, b) {
var x = a.title.toLowerCase(),
y = b.title.toLowerCase();
return x === y ? 0 : x > y ? 1 : -1;
};
cl.sort(cmp);
if (deep) {
for (i = 0, l = cl.length; i <... | [
"function",
"(",
"cmp",
",",
"deep",
")",
"{",
"var",
"i",
",",
"l",
",",
"cl",
"=",
"this",
".",
"children",
";",
"if",
"(",
"!",
"cl",
")",
"{",
"return",
";",
"}",
"cmp",
"=",
"cmp",
"||",
"function",
"(",
"a",
",",
"b",
")",
"{",
"var",... | Sort child list by title.
@param {function} [cmp] custom compare function(a, b) that returns -1, 0, or 1 (defaults to sort by title).
@param {boolean} [deep=false] pass true to sort all descendant nodes | [
"Sort",
"child",
"list",
"by",
"title",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L3609-L3636 | |
10,702 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(value, flag) {
var className,
hasClass,
rnotwhite = /\S+/g,
classNames = value.match(rnotwhite) || [],
i = 0,
wasAdded = false,
statusElem = this[this.tree.statusClassPropName],
curClasses = " " + (this.extraClasses || "") + " ";
// this.info("toggleClass('" + value + "', " +... | javascript | function(value, flag) {
var className,
hasClass,
rnotwhite = /\S+/g,
classNames = value.match(rnotwhite) || [],
i = 0,
wasAdded = false,
statusElem = this[this.tree.statusClassPropName],
curClasses = " " + (this.extraClasses || "") + " ";
// this.info("toggleClass('" + value + "', " +... | [
"function",
"(",
"value",
",",
"flag",
")",
"{",
"var",
"className",
",",
"hasClass",
",",
"rnotwhite",
"=",
"/",
"\\S+",
"/",
"g",
",",
"classNames",
"=",
"value",
".",
"match",
"(",
"rnotwhite",
")",
"||",
"[",
"]",
",",
"i",
"=",
"0",
",",
"wa... | Set, clear, or toggle class of node's span tag and .extraClasses.
@param {string} className class name (separate multiple classes by space)
@param {boolean} [flag] true/false to add/remove class. If omitted, class is toggled.
@returns {boolean} true if a class was added
@since 2.17 | [
"Set",
"clear",
"or",
"toggle",
"class",
"of",
"node",
"s",
"span",
"tag",
"and",
".",
"extraClasses",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L3690-L3727 | |
10,703 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(operation, childNode, extra) {
var data,
modifyChild = this.tree.options.modifyChild;
if (modifyChild) {
if (childNode && childNode.parent !== this) {
$.error(
"childNode " + childNode + " is not a child of " + this
);
}
data = {
node: this,
tree: this.tree,
... | javascript | function(operation, childNode, extra) {
var data,
modifyChild = this.tree.options.modifyChild;
if (modifyChild) {
if (childNode && childNode.parent !== this) {
$.error(
"childNode " + childNode + " is not a child of " + this
);
}
data = {
node: this,
tree: this.tree,
... | [
"function",
"(",
"operation",
",",
"childNode",
",",
"extra",
")",
"{",
"var",
"data",
",",
"modifyChild",
"=",
"this",
".",
"tree",
".",
"options",
".",
"modifyChild",
";",
"if",
"(",
"modifyChild",
")",
"{",
"if",
"(",
"childNode",
"&&",
"childNode",
... | Trigger `modifyChild` event on a parent to signal that a child was modified.
@param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...
@param {FancytreeNode} [childNode]
@param {object} [extra] | [
"Trigger",
"modifyChild",
"event",
"on",
"a",
"parent",
"to",
"signal",
"that",
"a",
"child",
"was",
"modified",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L3746-L3767 | |
10,704 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(flag) {
flag = flag !== false; // Confusing use of '!'
/*jshint -W018 */ if (!!this._enableUpdate === !!flag) {
return flag;
}
/*jshint +W018 */
this._enableUpdate = flag;
if (flag) {
this.debug("enableUpdate(true): redraw "); //, this._dirtyRoots);
this.render();
} else {
... | javascript | function(flag) {
flag = flag !== false; // Confusing use of '!'
/*jshint -W018 */ if (!!this._enableUpdate === !!flag) {
return flag;
}
/*jshint +W018 */
this._enableUpdate = flag;
if (flag) {
this.debug("enableUpdate(true): redraw "); //, this._dirtyRoots);
this.render();
} else {
... | [
"function",
"(",
"flag",
")",
"{",
"flag",
"=",
"flag",
"!==",
"false",
";",
"// Confusing use of '!'",
"/*jshint -W018 */",
"if",
"(",
"!",
"!",
"this",
".",
"_enableUpdate",
"===",
"!",
"!",
"flag",
")",
"{",
"return",
"flag",
";",
"}",
"/*jshint +W018 *... | Temporarily suppress rendering to improve performance on bulk-updates.
@param {boolean} flag
@returns {boolean} previous status
@since 2.19 | [
"Temporarily",
"suppress",
"rendering",
"to",
"improve",
"performance",
"on",
"bulk",
"-",
"updates",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L4285-L4300 | |
10,705 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(match, startNode, visibleOnly) {
match =
typeof match === "string"
? _makeNodeTitleStartMatcher(match)
: match;
startNode = startNode || this.getFirstChild();
var stopNode = null,
parentChildren = startNode.parent.children,
matchingNode = null,
walkVisible = function(parent,... | javascript | function(match, startNode, visibleOnly) {
match =
typeof match === "string"
? _makeNodeTitleStartMatcher(match)
: match;
startNode = startNode || this.getFirstChild();
var stopNode = null,
parentChildren = startNode.parent.children,
matchingNode = null,
walkVisible = function(parent,... | [
"function",
"(",
"match",
",",
"startNode",
",",
"visibleOnly",
")",
"{",
"match",
"=",
"typeof",
"match",
"===",
"\"string\"",
"?",
"_makeNodeTitleStartMatcher",
"(",
"match",
")",
":",
"match",
";",
"startNode",
"=",
"startNode",
"||",
"this",
".",
"getFir... | Find the next visible node that starts with `match`, starting at `startNode`
and wrap-around at the end.
@param {string|function} match
@param {FancytreeNode} [startNode] defaults to first node
@returns {FancytreeNode} matching node or null | [
"Find",
"the",
"next",
"visible",
"node",
"that",
"starts",
"with",
"match",
"starting",
"at",
"startNode",
"and",
"wrap",
"-",
"around",
"at",
"the",
"end",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L4350-L4422 | |
10,706 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(key, searchRoot) {
// Search the DOM by element ID (assuming this is faster than traversing all nodes).
var el, match;
// TODO: use tree.keyMap if available
// TODO: check opts.generateIds === true
if (!searchRoot) {
el = document.getElementById(this.options.idPrefix + key);
if (el) {
... | javascript | function(key, searchRoot) {
// Search the DOM by element ID (assuming this is faster than traversing all nodes).
var el, match;
// TODO: use tree.keyMap if available
// TODO: check opts.generateIds === true
if (!searchRoot) {
el = document.getElementById(this.options.idPrefix + key);
if (el) {
... | [
"function",
"(",
"key",
",",
"searchRoot",
")",
"{",
"// Search the DOM by element ID (assuming this is faster than traversing all nodes).",
"var",
"el",
",",
"match",
";",
"// TODO: use tree.keyMap if available",
"// TODO: check opts.generateIds === true",
"if",
"(",
"!",
"searc... | Return node with a given key or null if not found.
@param {string} key
@param {FancytreeNode} [searchRoot] only search below this node
@returns {FancytreeNode | null} | [
"Return",
"node",
"with",
"a",
"given",
"key",
"or",
"null",
"if",
"not",
"found",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L4545-L4566 | |
10,707 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(ctx, callOpts) {
// TODO: return promise?
var ac,
i,
l,
node = ctx.node;
if (node.parent) {
ac = node.parent.children;
for (i = 0, l = ac.length; i < l; i++) {
if (ac[i] !== node && ac[i].expanded) {
this._callHook(
"nodeSetExpanded",
ac[i],
... | javascript | function(ctx, callOpts) {
// TODO: return promise?
var ac,
i,
l,
node = ctx.node;
if (node.parent) {
ac = node.parent.children;
for (i = 0, l = ac.length; i < l; i++) {
if (ac[i] !== node && ac[i].expanded) {
this._callHook(
"nodeSetExpanded",
ac[i],
... | [
"function",
"(",
"ctx",
",",
"callOpts",
")",
"{",
"// TODO: return promise?",
"var",
"ac",
",",
"i",
",",
"l",
",",
"node",
"=",
"ctx",
".",
"node",
";",
"if",
"(",
"node",
".",
"parent",
")",
"{",
"ac",
"=",
"node",
".",
"parent",
".",
"children"... | Collapse all other children of same parent.
@param {EventData} ctx
@param {object} callOpts | [
"Collapse",
"all",
"other",
"children",
"of",
"same",
"parent",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L5148-L5168 | |
10,708 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(ctx) {
var node = ctx.node;
// FT.debug("nodeRemoveMarkup()", node.toString());
// TODO: Unlink attr.ftnode to support GC
if (node.li) {
$(node.li).remove();
node.li = null;
}
this.nodeRemoveChildMarkup(ctx);
} | javascript | function(ctx) {
var node = ctx.node;
// FT.debug("nodeRemoveMarkup()", node.toString());
// TODO: Unlink attr.ftnode to support GC
if (node.li) {
$(node.li).remove();
node.li = null;
}
this.nodeRemoveChildMarkup(ctx);
} | [
"function",
"(",
"ctx",
")",
"{",
"var",
"node",
"=",
"ctx",
".",
"node",
";",
"// FT.debug(\"nodeRemoveMarkup()\", node.toString());",
"// TODO: Unlink attr.ftnode to support GC",
"if",
"(",
"node",
".",
"li",
")",
"{",
"$",
"(",
"node",
".",
"li",
")",
".",
... | Remove HTML markup for ctx.node and all its descendents.
@param {EventData} ctx | [
"Remove",
"HTML",
"markup",
"for",
"ctx",
".",
"node",
"and",
"all",
"its",
"descendents",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L5741-L5750 | |
10,709 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(ctx, flag) {
// ctx.node.debug("nodeSetFocus(" + flag + ")");
var ctx2,
tree = ctx.tree,
node = ctx.node,
opts = tree.options,
// et = ctx.originalEvent && ctx.originalEvent.type,
isInput = ctx.originalEvent
? $(ctx.originalEvent.target).is(":input")
: false;
f... | javascript | function(ctx, flag) {
// ctx.node.debug("nodeSetFocus(" + flag + ")");
var ctx2,
tree = ctx.tree,
node = ctx.node,
opts = tree.options,
// et = ctx.originalEvent && ctx.originalEvent.type,
isInput = ctx.originalEvent
? $(ctx.originalEvent.target).is(":input")
: false;
f... | [
"function",
"(",
"ctx",
",",
"flag",
")",
"{",
"// ctx.node.debug(\"nodeSetFocus(\" + flag + \")\");",
"var",
"ctx2",
",",
"tree",
"=",
"ctx",
".",
"tree",
",",
"node",
"=",
"ctx",
".",
"node",
",",
"opts",
"=",
"tree",
".",
"options",
",",
"// et = ctx.orig... | Focus or blur this node.
@param {EventData} ctx
@param {boolean} [flag=true] | [
"Focus",
"or",
"blur",
"this",
"node",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L6618-L6693 | |
10,710 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(ctx) {
var tree = ctx.tree;
tree.activeNode = null;
tree.focusNode = null;
tree.$div.find(">ul.fancytree-container").empty();
// TODO: call destructors and remove reference loops
tree.rootNode.children = null;
} | javascript | function(ctx) {
var tree = ctx.tree;
tree.activeNode = null;
tree.focusNode = null;
tree.$div.find(">ul.fancytree-container").empty();
// TODO: call destructors and remove reference loops
tree.rootNode.children = null;
} | [
"function",
"(",
"ctx",
")",
"{",
"var",
"tree",
"=",
"ctx",
".",
"tree",
";",
"tree",
".",
"activeNode",
"=",
"null",
";",
"tree",
".",
"focusNode",
"=",
"null",
";",
"tree",
".",
"$div",
".",
"find",
"(",
"\">ul.fancytree-container\"",
")",
".",
"e... | Remove all nodes.
@param {EventData} ctx | [
"Remove",
"all",
"nodes",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L6914-L6921 | |
10,711 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(el) {
var widget;
if (el instanceof Fancytree) {
return el; // el already was a Fancytree
}
if (el === undefined) {
el = 0; // get first tree
}
if (typeof el === "number") {
el = $(".fancytree-container").eq(el); // el was an integer: return nth instance
} else if (t... | javascript | function(el) {
var widget;
if (el instanceof Fancytree) {
return el; // el already was a Fancytree
}
if (el === undefined) {
el = 0; // get first tree
}
if (typeof el === "number") {
el = $(".fancytree-container").eq(el); // el was an integer: return nth instance
} else if (t... | [
"function",
"(",
"el",
")",
"{",
"var",
"widget",
";",
"if",
"(",
"el",
"instanceof",
"Fancytree",
")",
"{",
"return",
"el",
";",
"// el already was a Fancytree",
"}",
"if",
"(",
"el",
"===",
"undefined",
")",
"{",
"el",
"=",
"0",
";",
"// get first tree... | Return a Fancytree instance, from element, index, event, or jQueryObject.
@param {Element | jQueryObject | Event | integer | string} [el]
@returns {Fancytree} matching tree or null
@example
$.ui.fancytree.getTree(); // Get first Fancytree instance on page
$.ui.fancytree.getTree(1); // Get second Fancytree instance ... | [
"Return",
"a",
"Fancytree",
"instance",
"from",
"element",
"index",
"event",
"or",
"jQueryObject",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L7859-L7880 | |
10,712 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(
optionName,
node,
nodeObject,
treeOptions,
defaultValue
) {
var ctx,
res,
tree = node.tree,
treeOpt = treeOptions[optionName],
nodeOpt = nodeObject[optionName];
if ($.isFunction(treeOpt)) {
ctx = {
node: node,
tree: tree,
widget: tree.... | javascript | function(
optionName,
node,
nodeObject,
treeOptions,
defaultValue
) {
var ctx,
res,
tree = node.tree,
treeOpt = treeOptions[optionName],
nodeOpt = nodeObject[optionName];
if ($.isFunction(treeOpt)) {
ctx = {
node: node,
tree: tree,
widget: tree.... | [
"function",
"(",
"optionName",
",",
"node",
",",
"nodeObject",
",",
"treeOptions",
",",
"defaultValue",
")",
"{",
"var",
"ctx",
",",
"res",
",",
"tree",
"=",
"node",
".",
"tree",
",",
"treeOpt",
"=",
"treeOptions",
"[",
"optionName",
"]",
",",
"nodeOpt",... | Return an option value that has a default, but may be overridden by a
callback or a node instance attribute.
Evaluation sequence:<br>
If tree.options.<optionName> is a callback that returns something, use that.<br>
Else if node.<optionName> is defined, use that.<br>
Else if tree.options.<optionName> is a value, use t... | [
"Return",
"an",
"option",
"value",
"that",
"has",
"a",
"default",
"but",
"may",
"be",
"overridden",
"by",
"a",
"callback",
"or",
"a",
"node",
"instance",
"attribute",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L7906-L7938 | |
10,713 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(span, baseClass, icon) {
var $span = $(span);
if (typeof icon === "string") {
$span.attr("class", baseClass + " " + icon);
} else {
// support object syntax: { text: ligature, addClasse: classname }
if (icon.text) {
$span.text("" + icon.text);
} else if (icon.html) {
... | javascript | function(span, baseClass, icon) {
var $span = $(span);
if (typeof icon === "string") {
$span.attr("class", baseClass + " " + icon);
} else {
// support object syntax: { text: ligature, addClasse: classname }
if (icon.text) {
$span.text("" + icon.text);
} else if (icon.html) {
... | [
"function",
"(",
"span",
",",
"baseClass",
",",
"icon",
")",
"{",
"var",
"$span",
"=",
"$",
"(",
"span",
")",
";",
"if",
"(",
"typeof",
"icon",
"===",
"\"string\"",
")",
"{",
"$span",
".",
"attr",
"(",
"\"class\"",
",",
"baseClass",
"+",
"\" \"",
"... | Set expander, checkbox, or node icon, supporting string and object format.
@param {Element | jQueryObject} span
@param {string} baseClass
@param {string | object} icon
@since 2.27 | [
"Set",
"expander",
"checkbox",
"or",
"node",
"icon",
"supporting",
"string",
"and",
"object",
"format",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L7946-L7963 | |
10,714 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(event) {
// Poor-man's hotkeys. See here for a complete implementation:
// https://github.com/jeresig/jquery.hotkeys
var which = event.which,
et = event.type,
s = [];
if (event.altKey) {
s.push("alt");
}
if (event.ctrlKey) {
s.push("ctrl");
}
if (event.met... | javascript | function(event) {
// Poor-man's hotkeys. See here for a complete implementation:
// https://github.com/jeresig/jquery.hotkeys
var which = event.which,
et = event.type,
s = [];
if (event.altKey) {
s.push("alt");
}
if (event.ctrlKey) {
s.push("ctrl");
}
if (event.met... | [
"function",
"(",
"event",
")",
"{",
"// Poor-man's hotkeys. See here for a complete implementation:",
"// https://github.com/jeresig/jquery.hotkeys",
"var",
"which",
"=",
"event",
".",
"which",
",",
"et",
"=",
"event",
".",
"type",
",",
"s",
"=",
"[",
"]",
";",
"i... | Convert a keydown or mouse event to a canonical string like 'ctrl+a',
'ctrl+shift+f2', 'shift+leftdblclick'.
This is especially handy for switch-statements in event handlers.
@param {event}
@returns {string}
@example
switch( $.ui.fancytree.eventToString(event) ) {
case "-":
tree.nodeSetExpanded(ctx, false);
break;
... | [
"Convert",
"a",
"keydown",
"or",
"mouse",
"event",
"to",
"a",
"canonical",
"string",
"like",
"ctrl",
"+",
"a",
"ctrl",
"+",
"shift",
"+",
"f2",
"shift",
"+",
"leftdblclick",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L7991-L8022 | |
10,715 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(instance, methodName, handler, context) {
var prevSuper,
_super = instance[methodName] || $.noop;
instance[methodName] = function() {
var self = context || this;
try {
prevSuper = self._super;
self._super = _super;
return handler.apply(self, arguments);
} finally... | javascript | function(instance, methodName, handler, context) {
var prevSuper,
_super = instance[methodName] || $.noop;
instance[methodName] = function() {
var self = context || this;
try {
prevSuper = self._super;
self._super = _super;
return handler.apply(self, arguments);
} finally... | [
"function",
"(",
"instance",
",",
"methodName",
",",
"handler",
",",
"context",
")",
"{",
"var",
"prevSuper",
",",
"_super",
"=",
"instance",
"[",
"methodName",
"]",
"||",
"$",
".",
"noop",
";",
"instance",
"[",
"methodName",
"]",
"=",
"function",
"(",
... | Return a wrapped handler method, that provides `this._super`.
@example
Implement `opts.createNode` event to add the 'draggable' attribute
$.ui.fancytree.overrideMethod(ctx.options, "createNode", function(event, data) {
Default processing if any
this._super.apply(this, arguments);
Add 'draggable' attribute
data.node.sp... | [
"Return",
"a",
"wrapped",
"handler",
"method",
"that",
"provides",
"this",
".",
"_super",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L8055-L8070 | |
10,716 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(definition) {
_assert(
definition.name != null,
"extensions must have a `name` property."
);
_assert(
definition.version != null,
"extensions must have a `version` property."
);
$.ui.fancytree._extensions[definition.name] = definition;
} | javascript | function(definition) {
_assert(
definition.name != null,
"extensions must have a `name` property."
);
_assert(
definition.version != null,
"extensions must have a `version` property."
);
$.ui.fancytree._extensions[definition.name] = definition;
} | [
"function",
"(",
"definition",
")",
"{",
"_assert",
"(",
"definition",
".",
"name",
"!=",
"null",
",",
"\"extensions must have a `name` property.\"",
")",
";",
"_assert",
"(",
"definition",
".",
"version",
"!=",
"null",
",",
"\"extensions must have a `version` propert... | Add Fancytree extension definition to the list of globally available extensions.
@param {object} definition | [
"Add",
"Fancytree",
"extension",
"definition",
"to",
"the",
"list",
"of",
"globally",
"available",
"extensions",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L8189-L8199 | |
10,717 | mar10/fancytree | lib/jquery.planize.js | function() {
var level = 0;
var levels = [0,0,0,0,0,0,0];
var hLevelText = '';
var prependText = '';
var prevLevel = 0;
var n = 0;
self.children('*:header:visible').each(function(index, heading) {
log('Processing heading %o', heading);
level = parseInt(heading.tagName.su... | javascript | function() {
var level = 0;
var levels = [0,0,0,0,0,0,0];
var hLevelText = '';
var prependText = '';
var prevLevel = 0;
var n = 0;
self.children('*:header:visible').each(function(index, heading) {
log('Processing heading %o', heading);
level = parseInt(heading.tagName.su... | [
"function",
"(",
")",
"{",
"var",
"level",
"=",
"0",
";",
"var",
"levels",
"=",
"[",
"0",
",",
"0",
",",
"0",
",",
"0",
",",
"0",
",",
"0",
",",
"0",
"]",
";",
"var",
"hLevelText",
"=",
"''",
";",
"var",
"prependText",
"=",
"''",
";",
"var"... | Prepends all headers text with the current tree number reference
@return void | [
"Prepends",
"all",
"headers",
"text",
"with",
"the",
"current",
"tree",
"number",
"reference"
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/lib/jquery.planize.js#L59-L120 | |
10,718 | mar10/fancytree | lib/jquery.planize.js | function() {
if (!config.debug) {
return;
}
try {
console.log.apply(console, arguments);
} catch(e) {
try {
opera.postError.apply(opera, arguments);
} catch(e){}
}
} | javascript | function() {
if (!config.debug) {
return;
}
try {
console.log.apply(console, arguments);
} catch(e) {
try {
opera.postError.apply(opera, arguments);
} catch(e){}
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"config",
".",
"debug",
")",
"{",
"return",
";",
"}",
"try",
"{",
"console",
".",
"log",
".",
"apply",
"(",
"console",
",",
"arguments",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"try",
"{",
"opera",... | Logs a message into the firebug or opera console if available | [
"Logs",
"a",
"message",
"into",
"the",
"firebug",
"or",
"opera",
"console",
"if",
"available"
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/lib/jquery.planize.js#L126-L137 | |
10,719 | mar10/fancytree | lib/jquery.configurator.js | function(){
var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
opts = this.options,
actualOpts = plugin.options,
availOptList = opts.optionList,
$opts = $(this.options.optionTarget).empty(),
$ul = $("<ul>").appendTo($opts),
$li... | javascript | function(){
var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
opts = this.options,
actualOpts = plugin.options,
availOptList = opts.optionList,
$opts = $(this.options.optionTarget).empty(),
$ul = $("<ul>").appendTo($opts),
$li... | [
"function",
"(",
")",
"{",
"var",
"plugin",
"=",
"$",
"(",
"this",
".",
"element",
")",
".",
"data",
"(",
"\"ui-\"",
"+",
"this",
".",
"options",
".",
"pluginName",
")",
"||",
"$",
"(",
"this",
".",
"element",
")",
".",
"data",
"(",
"this",
".",
... | Render checkboxes and other controls into configurator panel. | [
"Render",
"checkboxes",
"and",
"other",
"controls",
"into",
"configurator",
"panel",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/lib/jquery.configurator.js#L93-L146 | |
10,720 | mar10/fancytree | lib/jquery.configurator.js | function(){
var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
opts = this.options,
actualOpts = plugin.options,
availOptList = opts.optionList,
lines = [],
header = opts.header || '$("#selector").' + opts.pluginName + "({",
fo... | javascript | function(){
var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
opts = this.options,
actualOpts = plugin.options,
availOptList = opts.optionList,
lines = [],
header = opts.header || '$("#selector").' + opts.pluginName + "({",
fo... | [
"function",
"(",
")",
"{",
"var",
"plugin",
"=",
"$",
"(",
"this",
".",
"element",
")",
".",
"data",
"(",
"\"ui-\"",
"+",
"this",
".",
"options",
".",
"pluginName",
")",
"||",
"$",
"(",
"this",
".",
"element",
")",
".",
"data",
"(",
"this",
".",
... | Render source code into source panel. | [
"Render",
"source",
"code",
"into",
"source",
"panel",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/lib/jquery.configurator.js#L150-L198 | |
10,721 | mar10/fancytree | demo/taxonomy-browser/taxonomy-browser-itis.js | updateControls | function updateControls() {
var query = $.trim($("input[name=query]").val());
$("#btnPin").attr("disabled", !taxonTree.getActiveNode());
$("#btnUnpin")
.attr("disabled", !taxonTree.isFilterActive())
.toggleClass("btn-success", taxonTree.isFilterActive());
$("#btnResetSearch").attr("disabled", query.lengt... | javascript | function updateControls() {
var query = $.trim($("input[name=query]").val());
$("#btnPin").attr("disabled", !taxonTree.getActiveNode());
$("#btnUnpin")
.attr("disabled", !taxonTree.isFilterActive())
.toggleClass("btn-success", taxonTree.isFilterActive());
$("#btnResetSearch").attr("disabled", query.lengt... | [
"function",
"updateControls",
"(",
")",
"{",
"var",
"query",
"=",
"$",
".",
"trim",
"(",
"$",
"(",
"\"input[name=query]\"",
")",
".",
"val",
"(",
")",
")",
";",
"$",
"(",
"\"#btnPin\"",
")",
".",
"attr",
"(",
"\"disabled\"",
",",
"!",
"taxonTree",
".... | Update UI elements according to current status | [
"Update",
"UI",
"elements",
"according",
"to",
"current",
"status"
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/demo/taxonomy-browser/taxonomy-browser-itis.js#L46-L55 |
10,722 | mar10/fancytree | demo/taxonomy-browser/taxonomy-browser-itis.js | _delay | function _delay(tag, ms, callback) {
/*jshint -W040:true */
var self = this;
tag = "" + (tag || "default");
if (timerMap[tag] != null) {
clearTimeout(timerMap[tag]);
delete timerMap[tag];
// console.log("Cancel timer '" + tag + "'");
}
if (ms == null || callback == null) {
return;
}
// cons... | javascript | function _delay(tag, ms, callback) {
/*jshint -W040:true */
var self = this;
tag = "" + (tag || "default");
if (timerMap[tag] != null) {
clearTimeout(timerMap[tag]);
delete timerMap[tag];
// console.log("Cancel timer '" + tag + "'");
}
if (ms == null || callback == null) {
return;
}
// cons... | [
"function",
"_delay",
"(",
"tag",
",",
"ms",
",",
"callback",
")",
"{",
"/*jshint -W040:true */",
"var",
"self",
"=",
"this",
";",
"tag",
"=",
"\"\"",
"+",
"(",
"tag",
"||",
"\"default\"",
")",
";",
"if",
"(",
"timerMap",
"[",
"tag",
"]",
"!=",
"null... | Invoke callback after `ms` milliseconds.
Any pending action of this type is cancelled before. | [
"Invoke",
"callback",
"after",
"ms",
"milliseconds",
".",
"Any",
"pending",
"action",
"of",
"this",
"type",
"is",
"cancelled",
"before",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/demo/taxonomy-browser/taxonomy-browser-itis.js#L61-L79 |
10,723 | UnitedIncome/serverless-python-requirements | lib/inject.js | moveModuleUp | function moveModuleUp(source, target, module) {
const targetZip = new JSZip();
return fse
.readFileAsync(source)
.then(buffer => JSZip.loadAsync(buffer))
.then(sourceZip => sourceZip.filter(file => file.startsWith(module + '/')))
.map(srcZipObj =>
zipFile(
targetZip,
srcZipObj... | javascript | function moveModuleUp(source, target, module) {
const targetZip = new JSZip();
return fse
.readFileAsync(source)
.then(buffer => JSZip.loadAsync(buffer))
.then(sourceZip => sourceZip.filter(file => file.startsWith(module + '/')))
.map(srcZipObj =>
zipFile(
targetZip,
srcZipObj... | [
"function",
"moveModuleUp",
"(",
"source",
",",
"target",
",",
"module",
")",
"{",
"const",
"targetZip",
"=",
"new",
"JSZip",
"(",
")",
";",
"return",
"fse",
".",
"readFileAsync",
"(",
"source",
")",
".",
"then",
"(",
"buffer",
"=>",
"JSZip",
".",
"loa... | Remove all modules but the selected module from a package.
@param {string} source path to original package
@param {string} target path to result package
@param {string} module module to keep
@return {Promise} the JSZip object written out. | [
"Remove",
"all",
"modules",
"but",
"the",
"selected",
"module",
"from",
"a",
"package",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/inject.js#L58-L73 |
10,724 | UnitedIncome/serverless-python-requirements | lib/clean.js | cleanup | function cleanup() {
const artifacts = ['.requirements'];
if (this.options.zip) {
if (this.serverless.service.package.individually) {
this.targetFuncs.forEach(f => {
artifacts.push(path.join(f.module, '.requirements.zip'));
artifacts.push(path.join(f.module, 'unzip_requirements.py'));
... | javascript | function cleanup() {
const artifacts = ['.requirements'];
if (this.options.zip) {
if (this.serverless.service.package.individually) {
this.targetFuncs.forEach(f => {
artifacts.push(path.join(f.module, '.requirements.zip'));
artifacts.push(path.join(f.module, 'unzip_requirements.py'));
... | [
"function",
"cleanup",
"(",
")",
"{",
"const",
"artifacts",
"=",
"[",
"'.requirements'",
"]",
";",
"if",
"(",
"this",
".",
"options",
".",
"zip",
")",
"{",
"if",
"(",
"this",
".",
"serverless",
".",
"service",
".",
"package",
".",
"individually",
")",
... | clean up .requirements and .requirements.zip and unzip_requirements.py
@return {Promise} | [
"clean",
"up",
".",
"requirements",
"and",
".",
"requirements",
".",
"zip",
"and",
"unzip_requirements",
".",
"py"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/clean.js#L13-L32 |
10,725 | UnitedIncome/serverless-python-requirements | lib/clean.js | cleanupCache | function cleanupCache() {
const cacheLocation = getUserCachePath(this.options);
if (fse.existsSync(cacheLocation)) {
if (this.serverless) {
this.serverless.cli.log(`Removing static caches at: ${cacheLocation}`);
}
// Only remove cache folders that we added, just incase someone accidentally puts a... | javascript | function cleanupCache() {
const cacheLocation = getUserCachePath(this.options);
if (fse.existsSync(cacheLocation)) {
if (this.serverless) {
this.serverless.cli.log(`Removing static caches at: ${cacheLocation}`);
}
// Only remove cache folders that we added, just incase someone accidentally puts a... | [
"function",
"cleanupCache",
"(",
")",
"{",
"const",
"cacheLocation",
"=",
"getUserCachePath",
"(",
"this",
".",
"options",
")",
";",
"if",
"(",
"fse",
".",
"existsSync",
"(",
"cacheLocation",
")",
")",
"{",
"if",
"(",
"this",
".",
"serverless",
")",
"{",... | Clean up static cache, remove all items in there
@return {Promise} | [
"Clean",
"up",
"static",
"cache",
"remove",
"all",
"items",
"in",
"there"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/clean.js#L38-L60 |
10,726 | UnitedIncome/serverless-python-requirements | lib/docker.js | dockerCommand | function dockerCommand(options) {
const cmd = 'docker';
const ps = spawnSync(cmd, options, { encoding: 'utf-8' });
if (ps.error) {
if (ps.error.code === 'ENOENT') {
throw new Error('docker not found! Please install it.');
}
throw new Error(ps.error);
} else if (ps.status !== 0) {
throw new... | javascript | function dockerCommand(options) {
const cmd = 'docker';
const ps = spawnSync(cmd, options, { encoding: 'utf-8' });
if (ps.error) {
if (ps.error.code === 'ENOENT') {
throw new Error('docker not found! Please install it.');
}
throw new Error(ps.error);
} else if (ps.status !== 0) {
throw new... | [
"function",
"dockerCommand",
"(",
"options",
")",
"{",
"const",
"cmd",
"=",
"'docker'",
";",
"const",
"ps",
"=",
"spawnSync",
"(",
"cmd",
",",
"options",
",",
"{",
"encoding",
":",
"'utf-8'",
"}",
")",
";",
"if",
"(",
"ps",
".",
"error",
")",
"{",
... | Helper function to run a docker command
@param {string[]} options
@return {Object} | [
"Helper",
"function",
"to",
"run",
"a",
"docker",
"command"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/docker.js#L11-L23 |
10,727 | UnitedIncome/serverless-python-requirements | lib/docker.js | tryBindPath | function tryBindPath(serverless, bindPath, testFile) {
const options = [
'run',
'--rm',
'-v',
`${bindPath}:/test`,
'alpine',
'ls',
`/test/${testFile}`
];
try {
const ps = dockerCommand(options);
if (process.env.SLS_DEBUG) {
serverless.cli.log(`Trying bindPath ${bindPath} ... | javascript | function tryBindPath(serverless, bindPath, testFile) {
const options = [
'run',
'--rm',
'-v',
`${bindPath}:/test`,
'alpine',
'ls',
`/test/${testFile}`
];
try {
const ps = dockerCommand(options);
if (process.env.SLS_DEBUG) {
serverless.cli.log(`Trying bindPath ${bindPath} ... | [
"function",
"tryBindPath",
"(",
"serverless",
",",
"bindPath",
",",
"testFile",
")",
"{",
"const",
"options",
"=",
"[",
"'run'",
",",
"'--rm'",
",",
"'-v'",
",",
"`",
"${",
"bindPath",
"}",
"`",
",",
"'alpine'",
",",
"'ls'",
",",
"`",
"${",
"testFile",... | Test bind path to make sure it's working
@param {string} bindPath
@return {boolean} | [
"Test",
"bind",
"path",
"to",
"make",
"sure",
"it",
"s",
"working"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/docker.js#L65-L85 |
10,728 | UnitedIncome/serverless-python-requirements | lib/docker.js | getBindPath | function getBindPath(serverless, servicePath) {
// Determine bind path
if (process.platform !== 'win32' && !isWsl) {
return servicePath;
}
// test docker is available
dockerCommand(['version']);
// find good bind path for Windows
let bindPaths = [];
let baseBindPath = servicePath.replace(/\\([^\s]... | javascript | function getBindPath(serverless, servicePath) {
// Determine bind path
if (process.platform !== 'win32' && !isWsl) {
return servicePath;
}
// test docker is available
dockerCommand(['version']);
// find good bind path for Windows
let bindPaths = [];
let baseBindPath = servicePath.replace(/\\([^\s]... | [
"function",
"getBindPath",
"(",
"serverless",
",",
"servicePath",
")",
"{",
"// Determine bind path",
"if",
"(",
"process",
".",
"platform",
"!==",
"'win32'",
"&&",
"!",
"isWsl",
")",
"{",
"return",
"servicePath",
";",
"}",
"// test docker is available",
"dockerCo... | Get bind path depending on os platform
@param {object} serverless
@param {string} servicePath
@return {string} The bind path. | [
"Get",
"bind",
"path",
"depending",
"on",
"os",
"platform"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/docker.js#L93-L143 |
10,729 | UnitedIncome/serverless-python-requirements | lib/docker.js | getDockerUid | function getDockerUid(bindPath) {
const options = [
'run',
'--rm',
'-v',
`${bindPath}:/test`,
'alpine',
'stat',
'-c',
'%u',
'/bin/sh'
];
const ps = dockerCommand(options);
return ps.stdout.trim();
} | javascript | function getDockerUid(bindPath) {
const options = [
'run',
'--rm',
'-v',
`${bindPath}:/test`,
'alpine',
'stat',
'-c',
'%u',
'/bin/sh'
];
const ps = dockerCommand(options);
return ps.stdout.trim();
} | [
"function",
"getDockerUid",
"(",
"bindPath",
")",
"{",
"const",
"options",
"=",
"[",
"'run'",
",",
"'--rm'",
",",
"'-v'",
",",
"`",
"${",
"bindPath",
"}",
"`",
",",
"'alpine'",
",",
"'stat'",
",",
"'-c'",
",",
"'%u'",
",",
"'/bin/sh'",
"]",
";",
"con... | Find out what uid the docker machine is using
@param {string} bindPath
@return {boolean} | [
"Find",
"out",
"what",
"uid",
"the",
"docker",
"machine",
"is",
"using"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/docker.js#L150-L164 |
10,730 | UnitedIncome/serverless-python-requirements | lib/layer.js | zipRequirements | function zipRequirements() {
const rootZip = new JSZip();
const src = path.join('.serverless', 'requirements');
const runtimepath = 'python';
return addTree(rootZip.folder(runtimepath), src).then(() =>
writeZip(rootZip, path.join('.serverless', 'pythonRequirements.zip'))
);
} | javascript | function zipRequirements() {
const rootZip = new JSZip();
const src = path.join('.serverless', 'requirements');
const runtimepath = 'python';
return addTree(rootZip.folder(runtimepath), src).then(() =>
writeZip(rootZip, path.join('.serverless', 'pythonRequirements.zip'))
);
} | [
"function",
"zipRequirements",
"(",
")",
"{",
"const",
"rootZip",
"=",
"new",
"JSZip",
"(",
")",
";",
"const",
"src",
"=",
"path",
".",
"join",
"(",
"'.serverless'",
",",
"'requirements'",
")",
";",
"const",
"runtimepath",
"=",
"'python'",
";",
"return",
... | Zip up requirements to be used as layer package.
@return {Promise} the JSZip object constructed. | [
"Zip",
"up",
"requirements",
"to",
"be",
"used",
"as",
"layer",
"package",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/layer.js#L13-L21 |
10,731 | UnitedIncome/serverless-python-requirements | lib/layer.js | createLayers | function createLayers() {
if (!this.serverless.service.layers) {
this.serverless.service.layers = {};
}
this.serverless.service.layers['pythonRequirements'] = Object.assign(
{
artifact: path.join('.serverless', 'pythonRequirements.zip'),
name: `${
this.serverless.service.service
... | javascript | function createLayers() {
if (!this.serverless.service.layers) {
this.serverless.service.layers = {};
}
this.serverless.service.layers['pythonRequirements'] = Object.assign(
{
artifact: path.join('.serverless', 'pythonRequirements.zip'),
name: `${
this.serverless.service.service
... | [
"function",
"createLayers",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"serverless",
".",
"service",
".",
"layers",
")",
"{",
"this",
".",
"serverless",
".",
"service",
".",
"layers",
"=",
"{",
"}",
";",
"}",
"this",
".",
"serverless",
".",
"service... | Creates a layer on the serverless service for the requirements zip.
@return {Promise} empty promise | [
"Creates",
"a",
"layer",
"on",
"the",
"serverless",
"service",
"for",
"the",
"requirements",
"zip",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/layer.js#L27-L45 |
10,732 | UnitedIncome/serverless-python-requirements | lib/layer.js | layerRequirements | function layerRequirements() {
if (!this.options.layer) {
return BbPromise.resolve();
}
this.serverless.cli.log('Packaging Python Requirements Lambda Layer...');
return BbPromise.bind(this)
.then(zipRequirements)
.then(createLayers);
} | javascript | function layerRequirements() {
if (!this.options.layer) {
return BbPromise.resolve();
}
this.serverless.cli.log('Packaging Python Requirements Lambda Layer...');
return BbPromise.bind(this)
.then(zipRequirements)
.then(createLayers);
} | [
"function",
"layerRequirements",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"options",
".",
"layer",
")",
"{",
"return",
"BbPromise",
".",
"resolve",
"(",
")",
";",
"}",
"this",
".",
"serverless",
".",
"cli",
".",
"log",
"(",
"'Packaging Python Requirem... | Creates a layer from the installed requirements.
@return {Promise} the combined promise for requirements layer. | [
"Creates",
"a",
"layer",
"from",
"the",
"installed",
"requirements",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/layer.js#L51-L61 |
10,733 | UnitedIncome/serverless-python-requirements | lib/zip.js | addVendorHelper | function addVendorHelper() {
if (this.options.zip) {
if (this.serverless.service.package.individually) {
return BbPromise.resolve(this.targetFuncs)
.map(f => {
if (!get(f, 'package.include')) {
set(f, ['package', 'include'], []);
}
if (!get(f, 'module')) {
... | javascript | function addVendorHelper() {
if (this.options.zip) {
if (this.serverless.service.package.individually) {
return BbPromise.resolve(this.targetFuncs)
.map(f => {
if (!get(f, 'package.include')) {
set(f, ['package', 'include'], []);
}
if (!get(f, 'module')) {
... | [
"function",
"addVendorHelper",
"(",
")",
"{",
"if",
"(",
"this",
".",
"options",
".",
"zip",
")",
"{",
"if",
"(",
"this",
".",
"serverless",
".",
"service",
".",
"package",
".",
"individually",
")",
"{",
"return",
"BbPromise",
".",
"resolve",
"(",
"thi... | Add the vendor helper to the current service tree.
@return {Promise} | [
"Add",
"the",
"vendor",
"helper",
"to",
"the",
"current",
"service",
"tree",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/zip.js#L16-L56 |
10,734 | UnitedIncome/serverless-python-requirements | lib/zip.js | removeVendorHelper | function removeVendorHelper() {
if (this.options.zip && this.options.cleanupZipHelper) {
if (this.serverless.service.package.individually) {
return BbPromise.resolve(this.targetFuncs)
.map(f => {
if (!get(f, 'module')) {
set(f, ['module'], '.');
}
return f;
... | javascript | function removeVendorHelper() {
if (this.options.zip && this.options.cleanupZipHelper) {
if (this.serverless.service.package.individually) {
return BbPromise.resolve(this.targetFuncs)
.map(f => {
if (!get(f, 'module')) {
set(f, ['module'], '.');
}
return f;
... | [
"function",
"removeVendorHelper",
"(",
")",
"{",
"if",
"(",
"this",
".",
"options",
".",
"zip",
"&&",
"this",
".",
"options",
".",
"cleanupZipHelper",
")",
"{",
"if",
"(",
"this",
".",
"serverless",
".",
"service",
".",
"package",
".",
"individually",
")... | Remove the vendor helper from the current service tree.
@return {Promise} the promise to remove the vendor helper. | [
"Remove",
"the",
"vendor",
"helper",
"from",
"the",
"current",
"service",
"tree",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/zip.js#L62-L88 |
10,735 | UnitedIncome/serverless-python-requirements | lib/zipTree.js | addTree | function addTree(zip, src) {
const srcN = path.normalize(src);
return fse
.readdirAsync(srcN)
.map(name => {
const srcPath = path.join(srcN, name);
return fse.statAsync(srcPath).then(stat => {
if (stat.isDirectory()) {
return addTree(zip.folder(name), srcPath);
} else... | javascript | function addTree(zip, src) {
const srcN = path.normalize(src);
return fse
.readdirAsync(srcN)
.map(name => {
const srcPath = path.join(srcN, name);
return fse.statAsync(srcPath).then(stat => {
if (stat.isDirectory()) {
return addTree(zip.folder(name), srcPath);
} else... | [
"function",
"addTree",
"(",
"zip",
",",
"src",
")",
"{",
"const",
"srcN",
"=",
"path",
".",
"normalize",
"(",
"src",
")",
";",
"return",
"fse",
".",
"readdirAsync",
"(",
"srcN",
")",
".",
"map",
"(",
"name",
"=>",
"{",
"const",
"srcPath",
"=",
"pat... | Add a directory recursively to a zip file. Files in src will be added to the top folder of zip.
@param {JSZip} zip a zip object in the folder you want to add files to.
@param {string} src the source folder.
@return {Promise} a promise offering the original JSZip object. | [
"Add",
"a",
"directory",
"recursively",
"to",
"a",
"zip",
"file",
".",
"Files",
"in",
"src",
"will",
"be",
"added",
"to",
"the",
"top",
"folder",
"of",
"zip",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/zipTree.js#L13-L33 |
10,736 | UnitedIncome/serverless-python-requirements | lib/zipTree.js | writeZip | function writeZip(zip, targetPath) {
const opts = {
platform: process.platform == 'win32' ? 'DOS' : 'UNIX',
compression: 'DEFLATE',
compressionOptions: {
level: 9
}
};
return new BbPromise(resolve =>
zip
.generateNodeStream(opts)
.pipe(fse.createWriteStream(targetPath))
... | javascript | function writeZip(zip, targetPath) {
const opts = {
platform: process.platform == 'win32' ? 'DOS' : 'UNIX',
compression: 'DEFLATE',
compressionOptions: {
level: 9
}
};
return new BbPromise(resolve =>
zip
.generateNodeStream(opts)
.pipe(fse.createWriteStream(targetPath))
... | [
"function",
"writeZip",
"(",
"zip",
",",
"targetPath",
")",
"{",
"const",
"opts",
"=",
"{",
"platform",
":",
"process",
".",
"platform",
"==",
"'win32'",
"?",
"'DOS'",
":",
"'UNIX'",
",",
"compression",
":",
"'DEFLATE'",
",",
"compressionOptions",
":",
"{"... | Write zip contents to a file.
@param {JSZip} zip the zip object
@param {string} targetPath path to write the zip file to.
@return {Promise} a promise resolving to null. | [
"Write",
"zip",
"contents",
"to",
"a",
"file",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/zipTree.js#L41-L55 |
10,737 | UnitedIncome/serverless-python-requirements | lib/zipTree.js | zipFile | function zipFile(zip, zipPath, bufferPromise, fileOpts) {
return bufferPromise
.then(buffer =>
zip.file(
zipPath,
buffer,
Object.assign(
{},
{
// necessary to get the same hash when zipping the same content
date: new Date(0)
},
... | javascript | function zipFile(zip, zipPath, bufferPromise, fileOpts) {
return bufferPromise
.then(buffer =>
zip.file(
zipPath,
buffer,
Object.assign(
{},
{
// necessary to get the same hash when zipping the same content
date: new Date(0)
},
... | [
"function",
"zipFile",
"(",
"zip",
",",
"zipPath",
",",
"bufferPromise",
",",
"fileOpts",
")",
"{",
"return",
"bufferPromise",
".",
"then",
"(",
"buffer",
"=>",
"zip",
".",
"file",
"(",
"zipPath",
",",
"buffer",
",",
"Object",
".",
"assign",
"(",
"{",
... | Add a new file to a zip file from a buffer.
@param {JSZip} zip the zip object to add the file to.
@param {string} zipPath the target path in the zip.
@param {Promise} bufferPromise a promise providing a nodebuffer.
@return {Promise} a promise providing the JSZip object.
@param {object} fileOpts an object with the opts ... | [
"Add",
"a",
"new",
"file",
"to",
"a",
"zip",
"file",
"from",
"a",
"buffer",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/zipTree.js#L65-L82 |
10,738 | UnitedIncome/serverless-python-requirements | lib/pip.js | mergeCommands | function mergeCommands(commands) {
const cmds = filterCommands(commands);
if (cmds.length === 0) {
throw new Error('Expected at least one non-empty command');
} else if (cmds.length === 1) {
return cmds[0];
} else {
// Quote the arguments in each command and join them all using &&.
const script ... | javascript | function mergeCommands(commands) {
const cmds = filterCommands(commands);
if (cmds.length === 0) {
throw new Error('Expected at least one non-empty command');
} else if (cmds.length === 1) {
return cmds[0];
} else {
// Quote the arguments in each command and join them all using &&.
const script ... | [
"function",
"mergeCommands",
"(",
"commands",
")",
"{",
"const",
"cmds",
"=",
"filterCommands",
"(",
"commands",
")",
";",
"if",
"(",
"cmds",
".",
"length",
"===",
"0",
")",
"{",
"throw",
"new",
"Error",
"(",
"'Expected at least one non-empty command'",
")",
... | Render zero or more commands as a single command for a Unix environment.
In this context, a "command" is a list of arguments. An empty list or falsy value is ommitted.
@param {string[][]} many commands to merge.
@return {string[]} a single list of words. | [
"Render",
"zero",
"or",
"more",
"commands",
"as",
"a",
"single",
"command",
"for",
"a",
"Unix",
"environment",
".",
"In",
"this",
"context",
"a",
"command",
"is",
"a",
"list",
"of",
"arguments",
".",
"An",
"empty",
"list",
"or",
"falsy",
"value",
"is",
... | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/pip.js#L34-L45 |
10,739 | UnitedIncome/serverless-python-requirements | lib/pip.js | generateRequirementsFile | function generateRequirementsFile(
requirementsPath,
targetFile,
serverless,
servicePath,
options
) {
if (
options.usePoetry &&
fse.existsSync(path.join(servicePath, 'pyproject.toml'))
) {
filterRequirementsFile(
path.join(servicePath, '.serverless/requirements.txt'),
targetFile,
... | javascript | function generateRequirementsFile(
requirementsPath,
targetFile,
serverless,
servicePath,
options
) {
if (
options.usePoetry &&
fse.existsSync(path.join(servicePath, 'pyproject.toml'))
) {
filterRequirementsFile(
path.join(servicePath, '.serverless/requirements.txt'),
targetFile,
... | [
"function",
"generateRequirementsFile",
"(",
"requirementsPath",
",",
"targetFile",
",",
"serverless",
",",
"servicePath",
",",
"options",
")",
"{",
"if",
"(",
"options",
".",
"usePoetry",
"&&",
"fse",
".",
"existsSync",
"(",
"path",
".",
"join",
"(",
"service... | Just generate the requirements file in the .serverless folder
@param {string} requirementsPath
@param {string} targetFile
@param {Object} serverless
@param {string} servicePath
@param {Object} options
@return {undefined} | [
"Just",
"generate",
"the",
"requirements",
"file",
"in",
"the",
".",
"serverless",
"folder"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/pip.js#L56-L93 |
10,740 | UnitedIncome/serverless-python-requirements | lib/pip.js | copyVendors | function copyVendors(vendorFolder, targetFolder, serverless) {
// Create target folder if it does not exist
fse.ensureDirSync(targetFolder);
serverless.cli.log(
`Copying vendor libraries from ${vendorFolder} to ${targetFolder}...`
);
fse.readdirSync(vendorFolder).map(file => {
let source = path.join... | javascript | function copyVendors(vendorFolder, targetFolder, serverless) {
// Create target folder if it does not exist
fse.ensureDirSync(targetFolder);
serverless.cli.log(
`Copying vendor libraries from ${vendorFolder} to ${targetFolder}...`
);
fse.readdirSync(vendorFolder).map(file => {
let source = path.join... | [
"function",
"copyVendors",
"(",
"vendorFolder",
",",
"targetFolder",
",",
"serverless",
")",
"{",
"// Create target folder if it does not exist",
"fse",
".",
"ensureDirSync",
"(",
"targetFolder",
")",
";",
"serverless",
".",
"cli",
".",
"log",
"(",
"`",
"${",
"ven... | Copy everything from vendorFolder to targetFolder
@param {string} vendorFolder
@param {string} targetFolder
@param {Object} serverless
@return {undefined} | [
"Copy",
"everything",
"from",
"vendorFolder",
"to",
"targetFolder"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/pip.js#L377-L393 |
10,741 | UnitedIncome/serverless-python-requirements | lib/pip.js | requirementsFileExists | function requirementsFileExists(servicePath, options, fileName) {
if (
options.usePoetry &&
fse.existsSync(path.join(servicePath, 'pyproject.toml'))
) {
return true;
}
if (options.usePipenv && fse.existsSync(path.join(servicePath, 'Pipfile'))) {
return true;
}
if (fse.existsSync(fileName))... | javascript | function requirementsFileExists(servicePath, options, fileName) {
if (
options.usePoetry &&
fse.existsSync(path.join(servicePath, 'pyproject.toml'))
) {
return true;
}
if (options.usePipenv && fse.existsSync(path.join(servicePath, 'Pipfile'))) {
return true;
}
if (fse.existsSync(fileName))... | [
"function",
"requirementsFileExists",
"(",
"servicePath",
",",
"options",
",",
"fileName",
")",
"{",
"if",
"(",
"options",
".",
"usePoetry",
"&&",
"fse",
".",
"existsSync",
"(",
"path",
".",
"join",
"(",
"servicePath",
",",
"'pyproject.toml'",
")",
")",
")",... | This checks if requirements file exists.
@param {string} servicePath
@param {Object} options
@param {string} fileName | [
"This",
"checks",
"if",
"requirements",
"file",
"exists",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/pip.js#L401-L418 |
10,742 | UnitedIncome/serverless-python-requirements | lib/pip.js | installRequirementsIfNeeded | function installRequirementsIfNeeded(
servicePath,
modulePath,
options,
funcOptions,
serverless
) {
// Our source requirements, under our service path, and our module path (if specified)
const fileName = path.join(servicePath, modulePath, options.fileName);
// Skip requirements generation, if requireme... | javascript | function installRequirementsIfNeeded(
servicePath,
modulePath,
options,
funcOptions,
serverless
) {
// Our source requirements, under our service path, and our module path (if specified)
const fileName = path.join(servicePath, modulePath, options.fileName);
// Skip requirements generation, if requireme... | [
"function",
"installRequirementsIfNeeded",
"(",
"servicePath",
",",
"modulePath",
",",
"options",
",",
"funcOptions",
",",
"serverless",
")",
"{",
"// Our source requirements, under our service path, and our module path (if specified)",
"const",
"fileName",
"=",
"path",
".",
... | This evaluates if requirements are actually needed to be installed, but fails
gracefully if no req file is found intentionally. It also assists with code
re-use for this logic pertaining to individually packaged functions
@param {string} servicePath
@param {string} modulePath
@param {Object} options
@param {Object} fu... | [
"This",
"evaluates",
"if",
"requirements",
"are",
"actually",
"needed",
"to",
"be",
"installed",
"but",
"fails",
"gracefully",
"if",
"no",
"req",
"file",
"is",
"found",
"intentionally",
".",
"It",
"also",
"assists",
"with",
"code",
"re",
"-",
"use",
"for",
... | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/pip.js#L431-L532 |
10,743 | UnitedIncome/serverless-python-requirements | lib/pip.js | installAllRequirements | function installAllRequirements() {
// fse.ensureDirSync(path.join(this.servicePath, '.serverless'));
// First, check and delete cache versions, if enabled
checkForAndDeleteMaxCacheVersions(this.options, this.serverless);
// Then if we're going to package functions individually...
if (this.serverless.service... | javascript | function installAllRequirements() {
// fse.ensureDirSync(path.join(this.servicePath, '.serverless'));
// First, check and delete cache versions, if enabled
checkForAndDeleteMaxCacheVersions(this.options, this.serverless);
// Then if we're going to package functions individually...
if (this.serverless.service... | [
"function",
"installAllRequirements",
"(",
")",
"{",
"// fse.ensureDirSync(path.join(this.servicePath, '.serverless'));",
"// First, check and delete cache versions, if enabled",
"checkForAndDeleteMaxCacheVersions",
"(",
"this",
".",
"options",
",",
"this",
".",
"serverless",
")",
... | pip install the requirements to the requirements directory
@return {undefined} | [
"pip",
"install",
"the",
"requirements",
"to",
"the",
"requirements",
"directory"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/pip.js#L538-L621 |
10,744 | UnitedIncome/serverless-python-requirements | lib/shared.js | checkForAndDeleteMaxCacheVersions | function checkForAndDeleteMaxCacheVersions(options, serverless) {
// If we're using the static cache, and we have static cache max versions enabled
if (
options.useStaticCache &&
options.staticCacheMaxVersions &&
parseInt(options.staticCacheMaxVersions) > 0
) {
// Get the list of our cache files
... | javascript | function checkForAndDeleteMaxCacheVersions(options, serverless) {
// If we're using the static cache, and we have static cache max versions enabled
if (
options.useStaticCache &&
options.staticCacheMaxVersions &&
parseInt(options.staticCacheMaxVersions) > 0
) {
// Get the list of our cache files
... | [
"function",
"checkForAndDeleteMaxCacheVersions",
"(",
"options",
",",
"serverless",
")",
"{",
"// If we're using the static cache, and we have static cache max versions enabled",
"if",
"(",
"options",
".",
"useStaticCache",
"&&",
"options",
".",
"staticCacheMaxVersions",
"&&",
... | This helper will check if we're using static cache and have max
versions enabled and will delete older versions in a fifo fashion
@param {Object} options
@param {Object} serverless
@return {undefined} | [
"This",
"helper",
"will",
"check",
"if",
"we",
"re",
"using",
"static",
"cache",
"and",
"have",
"max",
"versions",
"enabled",
"and",
"will",
"delete",
"older",
"versions",
"in",
"a",
"fifo",
"fashion"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/shared.js#L15-L51 |
10,745 | UnitedIncome/serverless-python-requirements | lib/shared.js | getRequirementsWorkingPath | function getRequirementsWorkingPath(
subfolder,
requirementsTxtDirectory,
options
) {
// If we want to use the static cache
if (options && options.useStaticCache) {
if (subfolder) {
subfolder = subfolder + '_slspyc';
}
// If we have max number of cache items...
return path.join(getUserC... | javascript | function getRequirementsWorkingPath(
subfolder,
requirementsTxtDirectory,
options
) {
// If we want to use the static cache
if (options && options.useStaticCache) {
if (subfolder) {
subfolder = subfolder + '_slspyc';
}
// If we have max number of cache items...
return path.join(getUserC... | [
"function",
"getRequirementsWorkingPath",
"(",
"subfolder",
",",
"requirementsTxtDirectory",
",",
"options",
")",
"{",
"// If we want to use the static cache",
"if",
"(",
"options",
"&&",
"options",
".",
"useStaticCache",
")",
"{",
"if",
"(",
"subfolder",
")",
"{",
... | The working path that all requirements will be compiled into
@param {string} subfolder
@param {string} servicePath
@param {Object} options
@return {string} | [
"The",
"working",
"path",
"that",
"all",
"requirements",
"will",
"be",
"compiled",
"into"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/shared.js#L60-L77 |
10,746 | UnitedIncome/serverless-python-requirements | lib/shared.js | getUserCachePath | function getUserCachePath(options) {
// If we've manually set the static cache location
if (options && options.cacheLocation) {
return path.resolve(options.cacheLocation);
}
// Otherwise, find/use the python-ey appdirs cache location
const dirs = new Appdir({
appName: 'serverless-python-requirements'... | javascript | function getUserCachePath(options) {
// If we've manually set the static cache location
if (options && options.cacheLocation) {
return path.resolve(options.cacheLocation);
}
// Otherwise, find/use the python-ey appdirs cache location
const dirs = new Appdir({
appName: 'serverless-python-requirements'... | [
"function",
"getUserCachePath",
"(",
"options",
")",
"{",
"// If we've manually set the static cache location",
"if",
"(",
"options",
"&&",
"options",
".",
"cacheLocation",
")",
"{",
"return",
"path",
".",
"resolve",
"(",
"options",
".",
"cacheLocation",
")",
";",
... | The static cache path that will be used for this system + options, used if static cache is enabled
@param {Object} options
@return {string} | [
"The",
"static",
"cache",
"path",
"that",
"will",
"be",
"used",
"for",
"this",
"system",
"+",
"options",
"used",
"if",
"static",
"cache",
"is",
"enabled"
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/shared.js#L84-L96 |
10,747 | UnitedIncome/serverless-python-requirements | lib/poetry.js | isPoetryProject | function isPoetryProject(servicePath) {
const pyprojectPath = path.join(servicePath, 'pyproject.toml');
if (!fse.existsSync(pyprojectPath)) {
return false;
}
const pyprojectToml = fs.readFileSync(pyprojectPath);
const pyproject = tomlParse(pyprojectToml);
const buildSystemReqs =
(pyproject['build... | javascript | function isPoetryProject(servicePath) {
const pyprojectPath = path.join(servicePath, 'pyproject.toml');
if (!fse.existsSync(pyprojectPath)) {
return false;
}
const pyprojectToml = fs.readFileSync(pyprojectPath);
const pyproject = tomlParse(pyprojectToml);
const buildSystemReqs =
(pyproject['build... | [
"function",
"isPoetryProject",
"(",
"servicePath",
")",
"{",
"const",
"pyprojectPath",
"=",
"path",
".",
"join",
"(",
"servicePath",
",",
"'pyproject.toml'",
")",
";",
"if",
"(",
"!",
"fse",
".",
"existsSync",
"(",
"pyprojectPath",
")",
")",
"{",
"return",
... | Check if pyproject.toml file exists and is a poetry project. | [
"Check",
"if",
"pyproject",
".",
"toml",
"file",
"exists",
"and",
"is",
"a",
"poetry",
"project",
"."
] | 2e8117502606fd4bd82c19c3050ba0350adb2789 | https://github.com/UnitedIncome/serverless-python-requirements/blob/2e8117502606fd4bd82c19c3050ba0350adb2789/lib/poetry.js#L45-L65 |
10,748 | google/lovefield | gulpfile.js | function(browser) {
return runner.runJsUnitTests(options.filter, browser).then(
function(results) {
var failedCount = results.reduce(function(prev, item) {
return prev + (item['pass'] ? 0 : 1);
}, 0);
log(results.length + ' tests, ' + failedCount + ' fai... | javascript | function(browser) {
return runner.runJsUnitTests(options.filter, browser).then(
function(results) {
var failedCount = results.reduce(function(prev, item) {
return prev + (item['pass'] ? 0 : 1);
}, 0);
log(results.length + ' tests, ' + failedCount + ' fai... | [
"function",
"(",
"browser",
")",
"{",
"return",
"runner",
".",
"runJsUnitTests",
"(",
"options",
".",
"filter",
",",
"browser",
")",
".",
"then",
"(",
"function",
"(",
"results",
")",
"{",
"var",
"failedCount",
"=",
"results",
".",
"reduce",
"(",
"functi... | Run only JSUnit tests. | [
"Run",
"only",
"JSUnit",
"tests",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/gulpfile.js#L153-L166 | |
10,749 | google/lovefield | lib/proc/index_key_range_calculator.js | calculateCartesianProduct | function calculateCartesianProduct(keyRangeSets) {
goog.asserts.assert(
keyRangeSets.length > 1,
'Should only be called for cross-column indices.');
var keyRangeSetsAsArrays = keyRangeSets.map(
function(keyRangeSet) {
return keyRangeSet.getValues();
});
var it = goog.iter.product... | javascript | function calculateCartesianProduct(keyRangeSets) {
goog.asserts.assert(
keyRangeSets.length > 1,
'Should only be called for cross-column indices.');
var keyRangeSetsAsArrays = keyRangeSets.map(
function(keyRangeSet) {
return keyRangeSet.getValues();
});
var it = goog.iter.product... | [
"function",
"calculateCartesianProduct",
"(",
"keyRangeSets",
")",
"{",
"goog",
".",
"asserts",
".",
"assert",
"(",
"keyRangeSets",
".",
"length",
">",
"1",
",",
"'Should only be called for cross-column indices.'",
")",
";",
"var",
"keyRangeSetsAsArrays",
"=",
"keyRan... | Finds the cartesian product of a collection of SingleKeyRangeSets.
@param {!Array<!lf.index.SingleKeyRangeSet>} keyRangeSets A SingleKeyRangeSet
at position i in the input array corresponds to all possible values for
the ith dimension in the N-dimensional space (where N is the number of
columns in the cross-column inde... | [
"Finds",
"the",
"cartesian",
"product",
"of",
"a",
"collection",
"of",
"SingleKeyRangeSets",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/lib/proc/index_key_range_calculator.js#L227-L243 |
10,750 | google/lovefield | tools/scan_deps.js | scanDeps | function scanDeps() {
var provideMap = new ProvideMap_();
var requireMap = new RequireMap_();
scanFiles(relativeGlob('lib'), provideMap, requireMap);
var closureRequire = new RequireMap_();
var closureProvide = new ProvideMap_();
var closurePath = config.CLOSURE_LIBRARY_PATH + '/closure/goog';
scanFiles(... | javascript | function scanDeps() {
var provideMap = new ProvideMap_();
var requireMap = new RequireMap_();
scanFiles(relativeGlob('lib'), provideMap, requireMap);
var closureRequire = new RequireMap_();
var closureProvide = new ProvideMap_();
var closurePath = config.CLOSURE_LIBRARY_PATH + '/closure/goog';
scanFiles(... | [
"function",
"scanDeps",
"(",
")",
"{",
"var",
"provideMap",
"=",
"new",
"ProvideMap_",
"(",
")",
";",
"var",
"requireMap",
"=",
"new",
"RequireMap_",
"(",
")",
";",
"scanFiles",
"(",
"relativeGlob",
"(",
"'lib'",
")",
",",
"provideMap",
",",
"requireMap",
... | Find Closure dependency files for the lib.
@return {!Array<string>} | [
"Find",
"Closure",
"dependency",
"files",
"for",
"the",
"lib",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/tools/scan_deps.js#L292-L324 |
10,751 | google/lovefield | tools/scan_deps.js | genAddDependency | function genAddDependency(basePath, provideMap, requireMap) {
var provide = provideMap.getAllProvides();
var require = requireMap.getAllRequires();
var set = new Set();
provide.forEach(function(value, key) {
set.add(key);
});
require.forEach(function(value, key) {
set.add(key);
});
var results... | javascript | function genAddDependency(basePath, provideMap, requireMap) {
var provide = provideMap.getAllProvides();
var require = requireMap.getAllRequires();
var set = new Set();
provide.forEach(function(value, key) {
set.add(key);
});
require.forEach(function(value, key) {
set.add(key);
});
var results... | [
"function",
"genAddDependency",
"(",
"basePath",
",",
"provideMap",
",",
"requireMap",
")",
"{",
"var",
"provide",
"=",
"provideMap",
".",
"getAllProvides",
"(",
")",
";",
"var",
"require",
"=",
"requireMap",
".",
"getAllRequires",
"(",
")",
";",
"var",
"set... | Generates goog.addDependency.
@param {string} basePath
@param {!ProvideMap_} provideMap
@param {!RequireMap_} requireMap
@return {!Array<string>} | [
"Generates",
"goog",
".",
"addDependency",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/tools/scan_deps.js#L334-L380 |
10,752 | google/lovefield | tools/scan_deps.js | genDeps | function genDeps(basePath, targets) {
var provideMap = new ProvideMap_();
var requireMap = new RequireMap_();
var files = [];
targets.forEach(function(target) {
files = files.concat(relativeGlob(target));
});
scanFiles(files, provideMap, requireMap);
var results = genAddDependency(basePath, provideM... | javascript | function genDeps(basePath, targets) {
var provideMap = new ProvideMap_();
var requireMap = new RequireMap_();
var files = [];
targets.forEach(function(target) {
files = files.concat(relativeGlob(target));
});
scanFiles(files, provideMap, requireMap);
var results = genAddDependency(basePath, provideM... | [
"function",
"genDeps",
"(",
"basePath",
",",
"targets",
")",
"{",
"var",
"provideMap",
"=",
"new",
"ProvideMap_",
"(",
")",
";",
"var",
"requireMap",
"=",
"new",
"RequireMap_",
"(",
")",
";",
"var",
"files",
"=",
"[",
"]",
";",
"targets",
".",
"forEach... | Generates deps.js used for testing.
@param {string} basePath
@param {!Array<string>} targets
@return {string} | [
"Generates",
"deps",
".",
"js",
"used",
"for",
"testing",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/tools/scan_deps.js#L389-L401 |
10,753 | google/lovefield | tools/scan_deps.js | genModuleDeps | function genModuleDeps(scriptPath) {
var provideMap = new ProvideMap_();
var requireMap = new RequireMap_();
scanFiles([scriptPath], provideMap, requireMap);
var dumpValues = function(map) {
var results = [];
map.forEach(function(value, key) {
results = results.concat(value);
});
return re... | javascript | function genModuleDeps(scriptPath) {
var provideMap = new ProvideMap_();
var requireMap = new RequireMap_();
scanFiles([scriptPath], provideMap, requireMap);
var dumpValues = function(map) {
var results = [];
map.forEach(function(value, key) {
results = results.concat(value);
});
return re... | [
"function",
"genModuleDeps",
"(",
"scriptPath",
")",
"{",
"var",
"provideMap",
"=",
"new",
"ProvideMap_",
"(",
")",
";",
"var",
"requireMap",
"=",
"new",
"RequireMap_",
"(",
")",
";",
"scanFiles",
"(",
"[",
"scriptPath",
"]",
",",
"provideMap",
",",
"requi... | Generate addDependency for single module.
@param {string} scriptPath
@return {string} | [
"Generate",
"addDependency",
"for",
"single",
"module",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/tools/scan_deps.js#L409-L431 |
10,754 | google/lovefield | lib/proc/index_join_pass.js | function(table) {
return table.getEffectiveName() ==
joinStep.predicate.rightColumn.getTable().getEffectiveName() ?
joinStep.predicate.rightColumn : joinStep.predicate.leftColumn;
} | javascript | function(table) {
return table.getEffectiveName() ==
joinStep.predicate.rightColumn.getTable().getEffectiveName() ?
joinStep.predicate.rightColumn : joinStep.predicate.leftColumn;
} | [
"function",
"(",
"table",
")",
"{",
"return",
"table",
".",
"getEffectiveName",
"(",
")",
"==",
"joinStep",
".",
"predicate",
".",
"rightColumn",
".",
"getTable",
"(",
")",
".",
"getEffectiveName",
"(",
")",
"?",
"joinStep",
".",
"predicate",
".",
"rightCo... | Finds which of the two joined columns corresponds to the given table.
@param {!lf.schema.Table} table
@return {!lf.schema.Column} | [
"Finds",
"which",
"of",
"the",
"two",
"joined",
"columns",
"corresponds",
"to",
"the",
"given",
"table",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/lib/proc/index_join_pass.js#L96-L100 | |
10,755 | google/lovefield | lib/proc/index_join_pass.js | function(executionStep) {
// In order to use and index for implementing a join, the entire relation
// must be fed to the JoinStep, otherwise the index can't be used.
if (!(executionStep instanceof lf.proc.TableAccessFullStep)) {
return null;
}
var candidateColumn = getColumnForTable(execution... | javascript | function(executionStep) {
// In order to use and index for implementing a join, the entire relation
// must be fed to the JoinStep, otherwise the index can't be used.
if (!(executionStep instanceof lf.proc.TableAccessFullStep)) {
return null;
}
var candidateColumn = getColumnForTable(execution... | [
"function",
"(",
"executionStep",
")",
"{",
"// In order to use and index for implementing a join, the entire relation",
"// must be fed to the JoinStep, otherwise the index can't be used.",
"if",
"(",
"!",
"(",
"executionStep",
"instanceof",
"lf",
".",
"proc",
".",
"TableAccessFul... | Extracts the candidate indexed column for the given execution step node.
@param {!lf.proc.PhysicalQueryPlanNode} executionStep
@return {?lf.schema.Column} The candidate column or null if no such column
exists. | [
"Extracts",
"the",
"candidate",
"indexed",
"column",
"for",
"the",
"given",
"execution",
"step",
"node",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/lib/proc/index_join_pass.js#L108-L116 | |
10,756 | google/lovefield | demos/moviedb/demo-binding.js | addSampleData | function addSampleData() {
return Promise.all([
insertPersonData('actor.json', db.getSchema().table('Actor')),
insertPersonData('director.json', db.getSchema().table('Director')),
insertData('movie.json', db.getSchema().table('Movie')),
insertData('movieactor.json', db.getSchema().table('MovieActor'))... | javascript | function addSampleData() {
return Promise.all([
insertPersonData('actor.json', db.getSchema().table('Actor')),
insertPersonData('director.json', db.getSchema().table('Director')),
insertData('movie.json', db.getSchema().table('Movie')),
insertData('movieactor.json', db.getSchema().table('MovieActor'))... | [
"function",
"addSampleData",
"(",
")",
"{",
"return",
"Promise",
".",
"all",
"(",
"[",
"insertPersonData",
"(",
"'actor.json'",
",",
"db",
".",
"getSchema",
"(",
")",
".",
"table",
"(",
"'Actor'",
")",
")",
",",
"insertPersonData",
"(",
"'director.json'",
... | Adds sample data to the database.
@return {!IThenable} | [
"Adds",
"sample",
"data",
"to",
"the",
"database",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/demos/moviedb/demo-binding.js#L128-L140 |
10,757 | google/lovefield | lib/tree.js | function(original, clone) {
if (goog.isNull(original)) {
return;
}
var cloneFull = original.getChildCount() == clone.getChildCount();
if (cloneFull) {
var cloneIndex = copyParentStack.indexOf(clone);
if (cloneIndex != -1) {
copyParentStack.splice(cloneIndex, 1);
}
}
... | javascript | function(original, clone) {
if (goog.isNull(original)) {
return;
}
var cloneFull = original.getChildCount() == clone.getChildCount();
if (cloneFull) {
var cloneIndex = copyParentStack.indexOf(clone);
if (cloneIndex != -1) {
copyParentStack.splice(cloneIndex, 1);
}
}
... | [
"function",
"(",
"original",
",",
"clone",
")",
"{",
"if",
"(",
"goog",
".",
"isNull",
"(",
"original",
")",
")",
"{",
"return",
";",
"}",
"var",
"cloneFull",
"=",
"original",
".",
"getChildCount",
"(",
")",
"==",
"clone",
".",
"getChildCount",
"(",
... | Removes a node from the parent stack, if that node has already reached its
target number of children.
@param {?lf.structs.TreeNode} original The original node.
@param {!lf.structs.TreeNode} clone The corresponding cloned node. | [
"Removes",
"a",
"node",
"from",
"the",
"parent",
"stack",
"if",
"that",
"node",
"has",
"already",
"reached",
"its",
"target",
"number",
"of",
"children",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/lib/tree.js#L44-L56 | |
10,758 | google/lovefield | lib/index/btree.js | function(coverage) {
return coverage[0] ?
(coverage[1] ? lf.index.Favor.TIE : lf.index.Favor.LHS) :
lf.index.Favor.RHS;
} | javascript | function(coverage) {
return coverage[0] ?
(coverage[1] ? lf.index.Favor.TIE : lf.index.Favor.LHS) :
lf.index.Favor.RHS;
} | [
"function",
"(",
"coverage",
")",
"{",
"return",
"coverage",
"[",
"0",
"]",
"?",
"(",
"coverage",
"[",
"1",
"]",
"?",
"lf",
".",
"index",
".",
"Favor",
".",
"TIE",
":",
"lf",
".",
"index",
".",
"Favor",
".",
"LHS",
")",
":",
"lf",
".",
"index",... | Position of range relative to the key. | [
"Position",
"of",
"range",
"relative",
"to",
"the",
"key",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/lib/index/btree.js#L1193-L1197 | |
10,759 | google/lovefield | demos/moviedb/demo-jquery.js | selectAllMovies | function selectAllMovies() {
var movie = db.getSchema().table('Movie');
db.select(movie.id, movie.title, movie.year).
from(movie).exec().then(
function(results) {
var elapsed = Date.now() - startTime;
$('#load_time').text(elapsed.toString() + 'ms');
$('#master').bootstrapTable('l... | javascript | function selectAllMovies() {
var movie = db.getSchema().table('Movie');
db.select(movie.id, movie.title, movie.year).
from(movie).exec().then(
function(results) {
var elapsed = Date.now() - startTime;
$('#load_time').text(elapsed.toString() + 'ms');
$('#master').bootstrapTable('l... | [
"function",
"selectAllMovies",
"(",
")",
"{",
"var",
"movie",
"=",
"db",
".",
"getSchema",
"(",
")",
".",
"table",
"(",
"'Movie'",
")",
";",
"db",
".",
"select",
"(",
"movie",
".",
"id",
",",
"movie",
".",
"title",
",",
"movie",
".",
"year",
")",
... | Selects all movies. | [
"Selects",
"all",
"movies",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/demos/moviedb/demo-jquery.js#L148-L161 |
10,760 | google/lovefield | demos/moviedb/demo-jquery.js | generateDetails | function generateDetails(id) {
var m = db.getSchema().table('Movie');
var ma = db.getSchema().table('MovieActor');
var md = db.getSchema().table('MovieDirector');
var a = db.getSchema().table('Actor');
var d = db.getSchema().table('Director');
var details = {};
var promises = [];
promises.push(
d... | javascript | function generateDetails(id) {
var m = db.getSchema().table('Movie');
var ma = db.getSchema().table('MovieActor');
var md = db.getSchema().table('MovieDirector');
var a = db.getSchema().table('Actor');
var d = db.getSchema().table('Director');
var details = {};
var promises = [];
promises.push(
d... | [
"function",
"generateDetails",
"(",
"id",
")",
"{",
"var",
"m",
"=",
"db",
".",
"getSchema",
"(",
")",
".",
"table",
"(",
"'Movie'",
")",
";",
"var",
"ma",
"=",
"db",
".",
"getSchema",
"(",
")",
".",
"table",
"(",
"'MovieActor'",
")",
";",
"var",
... | Display details results for selected movie.
@param {string} id | [
"Display",
"details",
"results",
"for",
"selected",
"movie",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/demos/moviedb/demo-jquery.js#L168-L214 |
10,761 | google/lovefield | tools/node_bootstrap.js | bootstrap | function bootstrap(lovefieldBinary) {
// Setting "window" to be Node's global context.
global.window = global;
// Setting "self" to be Node's global context. This must be placed after
// global.window.
global.self = global;
// Setting "document" to a dummy object, even though it is not actually used,
//... | javascript | function bootstrap(lovefieldBinary) {
// Setting "window" to be Node's global context.
global.window = global;
// Setting "self" to be Node's global context. This must be placed after
// global.window.
global.self = global;
// Setting "document" to a dummy object, even though it is not actually used,
//... | [
"function",
"bootstrap",
"(",
"lovefieldBinary",
")",
"{",
"// Setting \"window\" to be Node's global context.",
"global",
".",
"window",
"=",
"global",
";",
"// Setting \"self\" to be Node's global context. This must be placed after",
"// global.window.",
"global",
".",
"self",
... | Bootstraps a lovefield binary such that is runnable in nodejs.
@param {string} lovefieldBinary The aboslute path of the binary file. | [
"Bootstraps",
"a",
"lovefield",
"binary",
"such",
"that",
"is",
"runnable",
"in",
"nodejs",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/tools/node_bootstrap.js#L35-L48 |
10,762 | google/lovefield | tools/builder.js | runSpac | function runSpac(schemaFilePath, namespace, outputDir) {
var spacPath = pathMod.resolve(pathMod.join(__dirname, '../spac/spac.js'));
var spac = childProcess.fork(
spacPath,
[
'--schema=' + schemaFilePath,
'--namespace=' + namespace,
'--outputdir=' + outputDir,
'--nocombin... | javascript | function runSpac(schemaFilePath, namespace, outputDir) {
var spacPath = pathMod.resolve(pathMod.join(__dirname, '../spac/spac.js'));
var spac = childProcess.fork(
spacPath,
[
'--schema=' + schemaFilePath,
'--namespace=' + namespace,
'--outputdir=' + outputDir,
'--nocombin... | [
"function",
"runSpac",
"(",
"schemaFilePath",
",",
"namespace",
",",
"outputDir",
")",
"{",
"var",
"spacPath",
"=",
"pathMod",
".",
"resolve",
"(",
"pathMod",
".",
"join",
"(",
"__dirname",
",",
"'../spac/spac.js'",
")",
")",
";",
"var",
"spac",
"=",
"chil... | Runs SPAC to generate code.
@param {string} schemaFilePath
@param {string} namespace
@param {string} outputDir
@return {!IThenable} | [
"Runs",
"SPAC",
"to",
"generate",
"code",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/tools/builder.js#L219-L242 |
10,763 | google/lovefield | spac/codegen.js | function(col, defaultValue) {
var lhs = ' ' + prefix + '.' + col.getName() + ' = ';
body.push(lhs + (col.isNullable() ? 'null' : defaultValue) + ';');
} | javascript | function(col, defaultValue) {
var lhs = ' ' + prefix + '.' + col.getName() + ' = ';
body.push(lhs + (col.isNullable() ? 'null' : defaultValue) + ';');
} | [
"function",
"(",
"col",
",",
"defaultValue",
")",
"{",
"var",
"lhs",
"=",
"' '",
"+",
"prefix",
"+",
"'.'",
"+",
"col",
".",
"getName",
"(",
")",
"+",
"' = '",
";",
"body",
".",
"push",
"(",
"lhs",
"+",
"(",
"col",
".",
"isNullable",
"(",
")",
... | Object body for UserType default object.
@param {!lf.schema.Column} col
@param {string} defaultValue | [
"Object",
"body",
"for",
"UserType",
"default",
"object",
"."
] | 46f70024af70dd665d790170700a3c109b4922f5 | https://github.com/google/lovefield/blob/46f70024af70dd665d790170700a3c109b4922f5/spac/codegen.js#L318-L321 | |
10,764 | akxcv/vuera | dist/vuera.cjs.js | babelReactResolver$$1 | function babelReactResolver$$1(component, props, children) {
return isReactComponent(component) ? React.createElement(component, props, children) : React.createElement(VueContainer, Object.assign({ component: component }, props), children);
} | javascript | function babelReactResolver$$1(component, props, children) {
return isReactComponent(component) ? React.createElement(component, props, children) : React.createElement(VueContainer, Object.assign({ component: component }, props), children);
} | [
"function",
"babelReactResolver$$1",
"(",
"component",
",",
"props",
",",
"children",
")",
"{",
"return",
"isReactComponent",
"(",
"component",
")",
"?",
"React",
".",
"createElement",
"(",
"component",
",",
"props",
",",
"children",
")",
":",
"React",
".",
... | This function gets imported by the babel plugin. It wraps a suspected React element and, if it
isn't a valid React element, wraps it into a Vue container. | [
"This",
"function",
"gets",
"imported",
"by",
"the",
"babel",
"plugin",
".",
"It",
"wraps",
"a",
"suspected",
"React",
"element",
"and",
"if",
"it",
"isn",
"t",
"a",
"valid",
"React",
"element",
"wraps",
"it",
"into",
"a",
"Vue",
"container",
"."
] | 246a58c4750f4ee5a4a5980810babecac2c87c20 | https://github.com/akxcv/vuera/blob/246a58c4750f4ee5a4a5980810babecac2c87c20/dist/vuera.cjs.js#L479-L481 |
10,765 | ericf/express-handlebars | examples/advanced/server.js | exposeTemplates | function exposeTemplates(req, res, next) {
// Uses the `ExpressHandlebars` instance to get the get the **precompiled**
// templates which will be shared with the client-side of the app.
hbs.getTemplates('shared/templates/', {
cache : app.enabled('view cache'),
precompiled: true
}).t... | javascript | function exposeTemplates(req, res, next) {
// Uses the `ExpressHandlebars` instance to get the get the **precompiled**
// templates which will be shared with the client-side of the app.
hbs.getTemplates('shared/templates/', {
cache : app.enabled('view cache'),
precompiled: true
}).t... | [
"function",
"exposeTemplates",
"(",
"req",
",",
"res",
",",
"next",
")",
"{",
"// Uses the `ExpressHandlebars` instance to get the get the **precompiled**",
"// templates which will be shared with the client-side of the app.",
"hbs",
".",
"getTemplates",
"(",
"'shared/templates/'",
... | Middleware to expose the app's shared templates to the client-side of the app for pages which need them. | [
"Middleware",
"to",
"expose",
"the",
"app",
"s",
"shared",
"templates",
"to",
"the",
"client",
"-",
"side",
"of",
"the",
"app",
"for",
"pages",
"which",
"need",
"them",
"."
] | 6ce977a541d50d1b7d7bd42fadf782a48899e29a | https://github.com/ericf/express-handlebars/blob/6ce977a541d50d1b7d7bd42fadf782a48899e29a/examples/advanced/server.js#L30-L57 |
10,766 | openseadragon/openseadragon | src/control.js | function( opacity ) {
if ( this.element[ $.SIGNAL ] && $.Browser.vendor == $.BROWSERS.IE ) {
$.setElementOpacity( this.element, opacity, true );
} else {
$.setElementOpacity( this.wrapper, opacity, true );
}
} | javascript | function( opacity ) {
if ( this.element[ $.SIGNAL ] && $.Browser.vendor == $.BROWSERS.IE ) {
$.setElementOpacity( this.element, opacity, true );
} else {
$.setElementOpacity( this.wrapper, opacity, true );
}
} | [
"function",
"(",
"opacity",
")",
"{",
"if",
"(",
"this",
".",
"element",
"[",
"$",
".",
"SIGNAL",
"]",
"&&",
"$",
".",
"Browser",
".",
"vendor",
"==",
"$",
".",
"BROWSERS",
".",
"IE",
")",
"{",
"$",
".",
"setElementOpacity",
"(",
"this",
".",
"el... | Sets the opacity level for the control.
@function
@param {Number} opactiy - a value between 1 and 0 inclusively. | [
"Sets",
"the",
"opacity",
"level",
"for",
"the",
"control",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/control.js#L192-L198 | |
10,767 | openseadragon/openseadragon | src/navigator.js | function( viewport ) {
var viewerSize,
newWidth,
newHeight,
bounds,
topleft,
bottomright;
viewerSize = $.getElementSize( this.viewer.element );
if ( this._resizeWithViewer && viewerSize.x && viewerSize.y && !viewerSize.equals( this.ol... | javascript | function( viewport ) {
var viewerSize,
newWidth,
newHeight,
bounds,
topleft,
bottomright;
viewerSize = $.getElementSize( this.viewer.element );
if ( this._resizeWithViewer && viewerSize.x && viewerSize.y && !viewerSize.equals( this.ol... | [
"function",
"(",
"viewport",
")",
"{",
"var",
"viewerSize",
",",
"newWidth",
",",
"newHeight",
",",
"bounds",
",",
"topleft",
",",
"bottomright",
";",
"viewerSize",
"=",
"$",
".",
"getElementSize",
"(",
"this",
".",
"viewer",
".",
"element",
")",
";",
"i... | Used to update the navigator minimap's viewport rectangle when a change in the viewer's viewport occurs.
@function
@param {OpenSeadragon.Viewport} The viewport this navigator is tracking. | [
"Used",
"to",
"update",
"the",
"navigator",
"minimap",
"s",
"viewport",
"rectangle",
"when",
"a",
"change",
"in",
"the",
"viewer",
"s",
"viewport",
"occurs",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/navigator.js#L302-L353 | |
10,768 | openseadragon/openseadragon | src/navigator.js | function(options) {
var _this = this;
var original = options.originalTiledImage;
delete options.original;
var optionsClone = $.extend({}, options, {
success: function(event) {
var myItem = event.item;
myItem._originalForNavigator = original;
... | javascript | function(options) {
var _this = this;
var original = options.originalTiledImage;
delete options.original;
var optionsClone = $.extend({}, options, {
success: function(event) {
var myItem = event.item;
myItem._originalForNavigator = original;
... | [
"function",
"(",
"options",
")",
"{",
"var",
"_this",
"=",
"this",
";",
"var",
"original",
"=",
"options",
".",
"originalTiledImage",
";",
"delete",
"options",
".",
"original",
";",
"var",
"optionsClone",
"=",
"$",
".",
"extend",
"(",
"{",
"}",
",",
"o... | overrides Viewer.addTiledImage | [
"overrides",
"Viewer",
".",
"addTiledImage"
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/navigator.js#L356-L388 | |
10,769 | openseadragon/openseadragon | src/tiledimage.js | function() {
var xUpdated = this._xSpring.update();
var yUpdated = this._ySpring.update();
var scaleUpdated = this._scaleSpring.update();
var degreesUpdated = this._degreesSpring.update();
if (xUpdated || yUpdated || scaleUpdated || degreesUpdated) {
this._updateForS... | javascript | function() {
var xUpdated = this._xSpring.update();
var yUpdated = this._ySpring.update();
var scaleUpdated = this._scaleSpring.update();
var degreesUpdated = this._degreesSpring.update();
if (xUpdated || yUpdated || scaleUpdated || degreesUpdated) {
this._updateForS... | [
"function",
"(",
")",
"{",
"var",
"xUpdated",
"=",
"this",
".",
"_xSpring",
".",
"update",
"(",
")",
";",
"var",
"yUpdated",
"=",
"this",
".",
"_ySpring",
".",
"update",
"(",
")",
";",
"var",
"scaleUpdated",
"=",
"this",
".",
"_scaleSpring",
".",
"up... | Updates the TiledImage's bounds, animating if needed.
@returns {Boolean} Whether the TiledImage animated. | [
"Updates",
"the",
"TiledImage",
"s",
"bounds",
"animating",
"if",
"needed",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L294-L307 | |
10,770 | openseadragon/openseadragon | src/tiledimage.js | function(current) {
return current ?
new $.Rect(
this._xSpring.current.value,
this._ySpring.current.value,
this._worldWidthCurrent,
this._worldHeightCurrent) :
new $.Rect(
this._xSpring.target.value,
... | javascript | function(current) {
return current ?
new $.Rect(
this._xSpring.current.value,
this._ySpring.current.value,
this._worldWidthCurrent,
this._worldHeightCurrent) :
new $.Rect(
this._xSpring.target.value,
... | [
"function",
"(",
"current",
")",
"{",
"return",
"current",
"?",
"new",
"$",
".",
"Rect",
"(",
"this",
".",
"_xSpring",
".",
"current",
".",
"value",
",",
"this",
".",
"_ySpring",
".",
"current",
".",
"value",
",",
"this",
".",
"_worldWidthCurrent",
","... | Get this TiledImage's bounds in viewport coordinates without taking
rotation into account.
@param {Boolean} [current=false] - Pass true for the current location;
false for target location.
@returns {OpenSeadragon.Rect} This TiledImage's bounds in viewport coordinates. | [
"Get",
"this",
"TiledImage",
"s",
"bounds",
"in",
"viewport",
"coordinates",
"without",
"taking",
"rotation",
"into",
"account",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L349-L361 | |
10,771 | openseadragon/openseadragon | src/tiledimage.js | function(current) {
var bounds = this.getBoundsNoRotate(current);
if (this._clip) {
var worldWidth = current ?
this._worldWidthCurrent : this._worldWidthTarget;
var ratio = worldWidth / this.source.dimensions.x;
var clip = this._clip.times(ratio);
... | javascript | function(current) {
var bounds = this.getBoundsNoRotate(current);
if (this._clip) {
var worldWidth = current ?
this._worldWidthCurrent : this._worldWidthTarget;
var ratio = worldWidth / this.source.dimensions.x;
var clip = this._clip.times(ratio);
... | [
"function",
"(",
"current",
")",
"{",
"var",
"bounds",
"=",
"this",
".",
"getBoundsNoRotate",
"(",
"current",
")",
";",
"if",
"(",
"this",
".",
"_clip",
")",
"{",
"var",
"worldWidth",
"=",
"current",
"?",
"this",
".",
"_worldWidthCurrent",
":",
"this",
... | Get the bounds of the displayed part of the tiled image.
@param {Boolean} [current=false] Pass true for the current location,
false for the target location.
@returns {$.Rect} The clipped bounds in viewport coordinates. | [
"Get",
"the",
"bounds",
"of",
"the",
"displayed",
"part",
"of",
"the",
"tiled",
"image",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L375-L389 | |
10,772 | openseadragon/openseadragon | src/tiledimage.js | function( pixel ) {
var viewerCoordinates = pixel.minus(
OpenSeadragon.getElementPosition( this.viewer.element ));
return this.viewerElementToImageCoordinates( viewerCoordinates );
} | javascript | function( pixel ) {
var viewerCoordinates = pixel.minus(
OpenSeadragon.getElementPosition( this.viewer.element ));
return this.viewerElementToImageCoordinates( viewerCoordinates );
} | [
"function",
"(",
"pixel",
")",
"{",
"var",
"viewerCoordinates",
"=",
"pixel",
".",
"minus",
"(",
"OpenSeadragon",
".",
"getElementPosition",
"(",
"this",
".",
"viewer",
".",
"element",
")",
")",
";",
"return",
"this",
".",
"viewerElementToImageCoordinates",
"(... | Convert pixel coordinates relative to the window to image coordinates.
@param {OpenSeadragon.Point} pixel
@returns {OpenSeadragon.Point} | [
"Convert",
"pixel",
"coordinates",
"relative",
"to",
"the",
"window",
"to",
"image",
"coordinates",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L559-L563 | |
10,773 | openseadragon/openseadragon | src/tiledimage.js | function( pixel ) {
var viewerCoordinates = this.imageToViewerElementCoordinates( pixel );
return viewerCoordinates.plus(
OpenSeadragon.getElementPosition( this.viewer.element ));
} | javascript | function( pixel ) {
var viewerCoordinates = this.imageToViewerElementCoordinates( pixel );
return viewerCoordinates.plus(
OpenSeadragon.getElementPosition( this.viewer.element ));
} | [
"function",
"(",
"pixel",
")",
"{",
"var",
"viewerCoordinates",
"=",
"this",
".",
"imageToViewerElementCoordinates",
"(",
"pixel",
")",
";",
"return",
"viewerCoordinates",
".",
"plus",
"(",
"OpenSeadragon",
".",
"getElementPosition",
"(",
"this",
".",
"viewer",
... | Convert image coordinates to pixel coordinates relative to the window.
@param {OpenSeadragon.Point} pixel
@returns {OpenSeadragon.Point} | [
"Convert",
"image",
"coordinates",
"to",
"pixel",
"coordinates",
"relative",
"to",
"the",
"window",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L570-L574 | |
10,774 | openseadragon/openseadragon | src/tiledimage.js | function(position, immediately) {
var sameTarget = (this._xSpring.target.value === position.x &&
this._ySpring.target.value === position.y);
if (immediately) {
if (sameTarget && this._xSpring.current.value === position.x &&
this._ySpring.current.value === pos... | javascript | function(position, immediately) {
var sameTarget = (this._xSpring.target.value === position.x &&
this._ySpring.target.value === position.y);
if (immediately) {
if (sameTarget && this._xSpring.current.value === position.x &&
this._ySpring.current.value === pos... | [
"function",
"(",
"position",
",",
"immediately",
")",
"{",
"var",
"sameTarget",
"=",
"(",
"this",
".",
"_xSpring",
".",
"target",
".",
"value",
"===",
"position",
".",
"x",
"&&",
"this",
".",
"_ySpring",
".",
"target",
".",
"value",
"===",
"position",
... | Sets the TiledImage's position in the world.
@param {OpenSeadragon.Point} position - The new position, in viewport coordinates.
@param {Boolean} [immediately=false] - Whether to animate to the new position or snap immediately.
@fires OpenSeadragon.TiledImage.event:bounds-change | [
"Sets",
"the",
"TiledImage",
"s",
"position",
"in",
"the",
"world",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L629-L655 | |
10,775 | openseadragon/openseadragon | src/tiledimage.js | function(degrees, immediately) {
if (this._degreesSpring.target.value === degrees &&
this._degreesSpring.isAtTargetValue()) {
return;
}
if (immediately) {
this._degreesSpring.resetTo(degrees);
} else {
this._degreesSpring.springTo(degrees);... | javascript | function(degrees, immediately) {
if (this._degreesSpring.target.value === degrees &&
this._degreesSpring.isAtTargetValue()) {
return;
}
if (immediately) {
this._degreesSpring.resetTo(degrees);
} else {
this._degreesSpring.springTo(degrees);... | [
"function",
"(",
"degrees",
",",
"immediately",
")",
"{",
"if",
"(",
"this",
".",
"_degreesSpring",
".",
"target",
".",
"value",
"===",
"degrees",
"&&",
"this",
".",
"_degreesSpring",
".",
"isAtTargetValue",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
... | Set the current rotation of this tiled image in degrees.
@param {Number} degrees the rotation in degrees.
@param {Boolean} [immediately=false] Whether to animate to the new angle
or rotate immediately.
@fires OpenSeadragon.TiledImage.event:bounds-change | [
"Set",
"the",
"current",
"rotation",
"of",
"this",
"tiled",
"image",
"in",
"degrees",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tiledimage.js#L845-L857 | |
10,776 | openseadragon/openseadragon | src/drawer.js | function( opacity ) {
$.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");
var world = this.viewer.world;
for (var i = 0; i < world.getItemCount(); i++) {
world.getItemAt( i ).setOpacity( opacity );
}
return this;
} | javascript | function( opacity ) {
$.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");
var world = this.viewer.world;
for (var i = 0; i < world.getItemCount(); i++) {
world.getItemAt( i ).setOpacity( opacity );
}
return this;
} | [
"function",
"(",
"opacity",
")",
"{",
"$",
".",
"console",
".",
"error",
"(",
"\"drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.\"",
")",
";",
"var",
"world",
"=",
"this",
".",
"viewer",
".",
"world",
";",
"for",
"(",
"var",
"i",
"=",
"0",
... | Set the opacity of the drawer.
@param {Number} opacity
@return {OpenSeadragon.Drawer} Chainable. | [
"Set",
"the",
"opacity",
"of",
"the",
"drawer",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/drawer.js#L174-L181 | |
10,777 | openseadragon/openseadragon | src/drawer.js | function() {
$.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");
var world = this.viewer.world;
var maxOpacity = 0;
for (var i = 0; i < world.getItemCount(); i++) {
var opacity = world.getItemAt( i ).getOpacity();
if ( opacity >... | javascript | function() {
$.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");
var world = this.viewer.world;
var maxOpacity = 0;
for (var i = 0; i < world.getItemCount(); i++) {
var opacity = world.getItemAt( i ).getOpacity();
if ( opacity >... | [
"function",
"(",
")",
"{",
"$",
".",
"console",
".",
"error",
"(",
"\"drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.\"",
")",
";",
"var",
"world",
"=",
"this",
".",
"viewer",
".",
"world",
";",
"var",
"maxOpacity",
"=",
"0",
";",
"for",
"(... | Get the opacity of the drawer.
@returns {Number} | [
"Get",
"the",
"opacity",
"of",
"the",
"drawer",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/drawer.js#L187-L198 | |
10,778 | openseadragon/openseadragon | src/drawer.js | function() {
this.canvas.innerHTML = "";
if ( this.useCanvas ) {
var viewportSize = this._calculateCanvasSize();
if( this.canvas.width != viewportSize.x ||
this.canvas.height != viewportSize.y ) {
this.canvas.width = viewportSize.x;
... | javascript | function() {
this.canvas.innerHTML = "";
if ( this.useCanvas ) {
var viewportSize = this._calculateCanvasSize();
if( this.canvas.width != viewportSize.x ||
this.canvas.height != viewportSize.y ) {
this.canvas.width = viewportSize.x;
... | [
"function",
"(",
")",
"{",
"this",
".",
"canvas",
".",
"innerHTML",
"=",
"\"\"",
";",
"if",
"(",
"this",
".",
"useCanvas",
")",
"{",
"var",
"viewportSize",
"=",
"this",
".",
"_calculateCanvasSize",
"(",
")",
";",
"if",
"(",
"this",
".",
"canvas",
"."... | Clears the Drawer so it's ready to draw another frame. | [
"Clears",
"the",
"Drawer",
"so",
"it",
"s",
"ready",
"to",
"draw",
"another",
"frame",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/drawer.js#L248-L266 | |
10,779 | openseadragon/openseadragon | src/drawer.js | function(tile, drawingHandler, useSketch, scale, translate) {
$.console.assert(tile, '[Drawer.drawTile] tile is required');
$.console.assert(drawingHandler, '[Drawer.drawTile] drawingHandler is required');
if (this.useCanvas) {
var context = this._getContext(useSketch);
... | javascript | function(tile, drawingHandler, useSketch, scale, translate) {
$.console.assert(tile, '[Drawer.drawTile] tile is required');
$.console.assert(drawingHandler, '[Drawer.drawTile] drawingHandler is required');
if (this.useCanvas) {
var context = this._getContext(useSketch);
... | [
"function",
"(",
"tile",
",",
"drawingHandler",
",",
"useSketch",
",",
"scale",
",",
"translate",
")",
"{",
"$",
".",
"console",
".",
"assert",
"(",
"tile",
",",
"'[Drawer.drawTile] tile is required'",
")",
";",
"$",
".",
"console",
".",
"assert",
"(",
"dr... | Draws the given tile.
@param {OpenSeadragon.Tile} tile - The tile to draw.
@param {Function} drawingHandler - Method for firing the drawing event if using canvas.
drawingHandler({context, tile, rendered})
@param {Boolean} useSketch - Whether to use the sketch canvas or not.
where <code>rendered</code> is the context wi... | [
"Draws",
"the",
"given",
"tile",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/drawer.js#L309-L320 | |
10,780 | openseadragon/openseadragon | src/drawer.js | function(opacity, scale, translate, compositeOperation) {
var options = opacity;
if (!$.isPlainObject(options)) {
options = {
opacity: opacity,
scale: scale,
translate: translate,
compositeOperation: compositeOperation
... | javascript | function(opacity, scale, translate, compositeOperation) {
var options = opacity;
if (!$.isPlainObject(options)) {
options = {
opacity: opacity,
scale: scale,
translate: translate,
compositeOperation: compositeOperation
... | [
"function",
"(",
"opacity",
",",
"scale",
",",
"translate",
",",
"compositeOperation",
")",
"{",
"var",
"options",
"=",
"opacity",
";",
"if",
"(",
"!",
"$",
".",
"isPlainObject",
"(",
"options",
")",
")",
"{",
"options",
"=",
"{",
"opacity",
":",
"opac... | Blends the sketch canvas in the main canvas.
@param {Object} options The options
@param {Float} options.opacity The opacity of the blending.
@param {Float} [options.scale=1] The scale at which tiles were drawn on
the sketch. Default is 1.
Use scale to draw at a lower scale and then enlarge onto the main canvas.
@param ... | [
"Blends",
"the",
"sketch",
"canvas",
"in",
"the",
"main",
"canvas",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/drawer.js#L413-L492 | |
10,781 | openseadragon/openseadragon | src/drawer.js | function(sketch) {
var canvas = this._getContext(sketch).canvas;
return new $.Point(canvas.width, canvas.height);
} | javascript | function(sketch) {
var canvas = this._getContext(sketch).canvas;
return new $.Point(canvas.width, canvas.height);
} | [
"function",
"(",
"sketch",
")",
"{",
"var",
"canvas",
"=",
"this",
".",
"_getContext",
"(",
"sketch",
")",
".",
"canvas",
";",
"return",
"new",
"$",
".",
"Point",
"(",
"canvas",
".",
"width",
",",
"canvas",
".",
"height",
")",
";",
"}"
] | Get the canvas size
@param {Boolean} sketch If set to true return the size of the sketch canvas
@returns {OpenSeadragon.Point} The size of the canvas | [
"Get",
"the",
"canvas",
"size"
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/drawer.js#L647-L650 | |
10,782 | openseadragon/openseadragon | src/tilesource.js | processResponse | function processResponse( xhr ){
var responseText = xhr.responseText,
status = xhr.status,
statusText,
data;
if ( !xhr ) {
throw new Error( $.getString( "Errors.Security" ) );
} else if ( xhr.status !== 200 && xhr.status !== 0 ) {
status = xhr.status;
... | javascript | function processResponse( xhr ){
var responseText = xhr.responseText,
status = xhr.status,
statusText,
data;
if ( !xhr ) {
throw new Error( $.getString( "Errors.Security" ) );
} else if ( xhr.status !== 200 && xhr.status !== 0 ) {
status = xhr.status;
... | [
"function",
"processResponse",
"(",
"xhr",
")",
"{",
"var",
"responseText",
"=",
"xhr",
".",
"responseText",
",",
"status",
"=",
"xhr",
".",
"status",
",",
"statusText",
",",
"data",
";",
"if",
"(",
"!",
"xhr",
")",
"{",
"throw",
"new",
"Error",
"(",
... | Decides whether to try to process the response as xml, json, or hand back
the text
@private
@inner
@function
@param {XMLHttpRequest} xhr - the completed network request | [
"Decides",
"whether",
"to",
"try",
"to",
"process",
"the",
"response",
"as",
"xml",
"json",
"or",
"hand",
"back",
"the",
"text"
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tilesource.js#L633-L667 |
10,783 | openseadragon/openseadragon | src/tilecache.js | function( options ) {
$.console.assert( options, "[TileCache.cacheTile] options is required" );
$.console.assert( options.tile, "[TileCache.cacheTile] options.tile is required" );
$.console.assert( options.tile.cacheKey, "[TileCache.cacheTile] options.tile.cacheKey is required" );
$.cons... | javascript | function( options ) {
$.console.assert( options, "[TileCache.cacheTile] options is required" );
$.console.assert( options.tile, "[TileCache.cacheTile] options.tile is required" );
$.console.assert( options.tile.cacheKey, "[TileCache.cacheTile] options.tile.cacheKey is required" );
$.cons... | [
"function",
"(",
"options",
")",
"{",
"$",
".",
"console",
".",
"assert",
"(",
"options",
",",
"\"[TileCache.cacheTile] options is required\"",
")",
";",
"$",
".",
"console",
".",
"assert",
"(",
"options",
".",
"tile",
",",
"\"[TileCache.cacheTile] options.tile is... | Caches the specified tile, removing an old tile if necessary to stay under the
maxImageCacheCount specified on construction. Note that if multiple tiles reference
the same image, there may be more tiles than maxImageCacheCount; the goal is to keep
the number of images below that number. Note, as well, that even the num... | [
"Caches",
"the",
"specified",
"tile",
"removing",
"an",
"old",
"tile",
"if",
"necessary",
"to",
"stay",
"under",
"the",
"maxImageCacheCount",
"specified",
"on",
"construction",
".",
"Note",
"that",
"if",
"multiple",
"tiles",
"reference",
"the",
"same",
"image",
... | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tilecache.js#L150-L216 | |
10,784 | openseadragon/openseadragon | src/tilecache.js | function( tiledImage ) {
$.console.assert(tiledImage, '[TileCache.clearTilesFor] tiledImage is required');
var tileRecord;
for ( var i = 0; i < this._tilesLoaded.length; ++i ) {
tileRecord = this._tilesLoaded[ i ];
if ( tileRecord.tiledImage === tiledImage ) {
... | javascript | function( tiledImage ) {
$.console.assert(tiledImage, '[TileCache.clearTilesFor] tiledImage is required');
var tileRecord;
for ( var i = 0; i < this._tilesLoaded.length; ++i ) {
tileRecord = this._tilesLoaded[ i ];
if ( tileRecord.tiledImage === tiledImage ) {
... | [
"function",
"(",
"tiledImage",
")",
"{",
"$",
".",
"console",
".",
"assert",
"(",
"tiledImage",
",",
"'[TileCache.clearTilesFor] tiledImage is required'",
")",
";",
"var",
"tileRecord",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"_t... | Clears all tiles associated with the specified tiledImage.
@param {OpenSeadragon.TiledImage} tiledImage | [
"Clears",
"all",
"tiles",
"associated",
"with",
"the",
"specified",
"tiledImage",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/tilecache.js#L222-L233 | |
10,785 | openseadragon/openseadragon | src/openseadragon.js | function( object, method ) {
return function(){
var args = arguments;
if ( args === undefined ){
args = [];
}
return method.apply( object, args );
};
} | javascript | function( object, method ) {
return function(){
var args = arguments;
if ( args === undefined ){
args = [];
}
return method.apply( object, args );
};
} | [
"function",
"(",
"object",
",",
"method",
")",
"{",
"return",
"function",
"(",
")",
"{",
"var",
"args",
"=",
"arguments",
";",
"if",
"(",
"args",
"===",
"undefined",
")",
"{",
"args",
"=",
"[",
"]",
";",
"}",
"return",
"method",
".",
"apply",
"(",
... | Returns a function which invokes the method as if it were a method belonging to the object.
@function
@param {Object} object
@param {Function} method
@returns {Function} | [
"Returns",
"a",
"function",
"which",
"invokes",
"the",
"method",
"as",
"if",
"it",
"were",
"a",
"method",
"belonging",
"to",
"the",
"object",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1297-L1305 | |
10,786 | openseadragon/openseadragon | src/openseadragon.js | function( element ) {
var result = new $.Point(),
isFixed,
offsetParent;
element = $.getElement( element );
isFixed = $.getElementStyle( element ).position == "fixed";
offsetParent = getOffsetParent( element, isFixed );
... | javascript | function( element ) {
var result = new $.Point(),
isFixed,
offsetParent;
element = $.getElement( element );
isFixed = $.getElementStyle( element ).position == "fixed";
offsetParent = getOffsetParent( element, isFixed );
... | [
"function",
"(",
"element",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
"Point",
"(",
")",
",",
"isFixed",
",",
"offsetParent",
";",
"element",
"=",
"$",
".",
"getElement",
"(",
"element",
")",
";",
"isFixed",
"=",
"$",
".",
"getElementStyle",
"... | Determines the position of the upper-left corner of the element.
@function
@param {Element|String} element - the element we want the position for.
@returns {OpenSeadragon.Point} - the position of the upper left corner of the element. | [
"Determines",
"the",
"position",
"of",
"the",
"upper",
"-",
"left",
"corner",
"of",
"the",
"element",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1349-L1373 | |
10,787 | openseadragon/openseadragon | src/openseadragon.js | function(property) {
var memo = {};
$.getCssPropertyWithVendorPrefix = function(property) {
if (memo[property] !== undefined) {
return memo[property];
}
var style = document.createElement('div').style;
var resul... | javascript | function(property) {
var memo = {};
$.getCssPropertyWithVendorPrefix = function(property) {
if (memo[property] !== undefined) {
return memo[property];
}
var style = document.createElement('div').style;
var resul... | [
"function",
"(",
"property",
")",
"{",
"var",
"memo",
"=",
"{",
"}",
";",
"$",
".",
"getCssPropertyWithVendorPrefix",
"=",
"function",
"(",
"property",
")",
"{",
"if",
"(",
"memo",
"[",
"property",
"]",
"!==",
"undefined",
")",
"{",
"return",
"memo",
"... | Returns the property with the correct vendor prefix appended.
@param {String} property the property name
@returns {String} the property with the correct prefix or null if not
supported. | [
"Returns",
"the",
"property",
"with",
"the",
"correct",
"vendor",
"prefix",
"appended",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1452-L1479 | |
10,788 | openseadragon/openseadragon | src/openseadragon.js | function( event ) {
if( event ){
$.getEvent = function( event ) {
return event;
};
} else {
$.getEvent = function() {
return window.event;
};
}
return $.getEvent( event... | javascript | function( event ) {
if( event ){
$.getEvent = function( event ) {
return event;
};
} else {
$.getEvent = function() {
return window.event;
};
}
return $.getEvent( event... | [
"function",
"(",
"event",
")",
"{",
"if",
"(",
"event",
")",
"{",
"$",
".",
"getEvent",
"=",
"function",
"(",
"event",
")",
"{",
"return",
"event",
";",
"}",
";",
"}",
"else",
"{",
"$",
".",
"getEvent",
"=",
"function",
"(",
")",
"{",
"return",
... | Gets the latest event, really only useful internally since its
specific to IE behavior.
@function
@param {Event} [event]
@returns {Event}
@deprecated For internal use only
@private | [
"Gets",
"the",
"latest",
"event",
"really",
"only",
"useful",
"internally",
"since",
"its",
"specific",
"to",
"IE",
"behavior",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1529-L1540 | |
10,789 | openseadragon/openseadragon | src/openseadragon.js | function( event ) {
if ( typeof ( event.pageX ) == "number" ) {
$.getMousePosition = function( event ){
var result = new $.Point();
event = $.getEvent( event );
result.x = event.pageX;
result.y = event.pageY;
... | javascript | function( event ) {
if ( typeof ( event.pageX ) == "number" ) {
$.getMousePosition = function( event ){
var result = new $.Point();
event = $.getEvent( event );
result.x = event.pageX;
result.y = event.pageY;
... | [
"function",
"(",
"event",
")",
"{",
"if",
"(",
"typeof",
"(",
"event",
".",
"pageX",
")",
"==",
"\"number\"",
")",
"{",
"$",
".",
"getMousePosition",
"=",
"function",
"(",
"event",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
"Point",
"(",
")",... | Gets the position of the mouse on the screen for a given event.
@function
@param {Event} [event]
@returns {OpenSeadragon.Point} | [
"Gets",
"the",
"position",
"of",
"the",
"mouse",
"on",
"the",
"screen",
"for",
"a",
"given",
"event",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1549-L1584 | |
10,790 | openseadragon/openseadragon | src/openseadragon.js | function() {
var docElement = document.documentElement || {},
body = document.body || {};
if ( typeof ( window.pageXOffset ) == "number" ) {
$.getPageScroll = function(){
return new $.Point(
window.pageXOffset,
... | javascript | function() {
var docElement = document.documentElement || {},
body = document.body || {};
if ( typeof ( window.pageXOffset ) == "number" ) {
$.getPageScroll = function(){
return new $.Point(
window.pageXOffset,
... | [
"function",
"(",
")",
"{",
"var",
"docElement",
"=",
"document",
".",
"documentElement",
"||",
"{",
"}",
",",
"body",
"=",
"document",
".",
"body",
"||",
"{",
"}",
";",
"if",
"(",
"typeof",
"(",
"window",
".",
"pageXOffset",
")",
"==",
"\"number\"",
... | Determines the page's current scroll position.
@function
@returns {OpenSeadragon.Point} | [
"Determines",
"the",
"page",
"s",
"current",
"scroll",
"position",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1592-L1623 | |
10,791 | openseadragon/openseadragon | src/openseadragon.js | function( scroll ) {
if ( typeof ( window.scrollTo ) !== "undefined" ) {
$.setPageScroll = function( scroll ) {
window.scrollTo( scroll.x, scroll.y );
};
} else {
var originalScroll = $.getPageScroll();
if ( orig... | javascript | function( scroll ) {
if ( typeof ( window.scrollTo ) !== "undefined" ) {
$.setPageScroll = function( scroll ) {
window.scrollTo( scroll.x, scroll.y );
};
} else {
var originalScroll = $.getPageScroll();
if ( orig... | [
"function",
"(",
"scroll",
")",
"{",
"if",
"(",
"typeof",
"(",
"window",
".",
"scrollTo",
")",
"!==",
"\"undefined\"",
")",
"{",
"$",
".",
"setPageScroll",
"=",
"function",
"(",
"scroll",
")",
"{",
"window",
".",
"scrollTo",
"(",
"scroll",
".",
"x",
... | Set the page scroll position.
@function
@returns {OpenSeadragon.Point} | [
"Set",
"the",
"page",
"scroll",
"position",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1630-L1674 | |
10,792 | openseadragon/openseadragon | src/openseadragon.js | function() {
var docElement = document.documentElement || {},
body = document.body || {};
if ( typeof ( window.innerWidth ) == 'number' ) {
$.getWindowSize = function(){
return new $.Point(
window.innerWidth,
... | javascript | function() {
var docElement = document.documentElement || {},
body = document.body || {};
if ( typeof ( window.innerWidth ) == 'number' ) {
$.getWindowSize = function(){
return new $.Point(
window.innerWidth,
... | [
"function",
"(",
")",
"{",
"var",
"docElement",
"=",
"document",
".",
"documentElement",
"||",
"{",
"}",
",",
"body",
"=",
"document",
".",
"body",
"||",
"{",
"}",
";",
"if",
"(",
"typeof",
"(",
"window",
".",
"innerWidth",
")",
"==",
"'number'",
")"... | Determines the size of the browsers window.
@function
@returns {OpenSeadragon.Point} | [
"Determines",
"the",
"size",
"of",
"the",
"browsers",
"window",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1681-L1711 | |
10,793 | openseadragon/openseadragon | src/openseadragon.js | function( element ) {
// Convert a possible ID to an actual HTMLElement
element = $.getElement( element );
/*
CSS tables require you to have a display:table/row/cell hierarchy so we need to create
three nested wrapper divs:
*/
... | javascript | function( element ) {
// Convert a possible ID to an actual HTMLElement
element = $.getElement( element );
/*
CSS tables require you to have a display:table/row/cell hierarchy so we need to create
three nested wrapper divs:
*/
... | [
"function",
"(",
"element",
")",
"{",
"// Convert a possible ID to an actual HTMLElement",
"element",
"=",
"$",
".",
"getElement",
"(",
"element",
")",
";",
"/*\n CSS tables require you to have a display:table/row/cell hierarchy so we need to create\n thre... | Wraps the given element in a nest of divs so that the element can
be easily centered using CSS tables
@function
@param {Element|String} element
@returns {Element} outermost wrapper element | [
"Wraps",
"the",
"given",
"element",
"in",
"a",
"nest",
"of",
"divs",
"so",
"that",
"the",
"element",
"can",
"be",
"easily",
"centered",
"using",
"CSS",
"tables"
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1721-L1758 | |
10,794 | openseadragon/openseadragon | src/openseadragon.js | function( tagName ) {
var element = document.createElement( tagName ),
style = element.style;
style.background = "transparent none";
style.border = "none";
style.margin = "0px";
style.padding = "0px";
style.position ... | javascript | function( tagName ) {
var element = document.createElement( tagName ),
style = element.style;
style.background = "transparent none";
style.border = "none";
style.margin = "0px";
style.padding = "0px";
style.position ... | [
"function",
"(",
"tagName",
")",
"{",
"var",
"element",
"=",
"document",
".",
"createElement",
"(",
"tagName",
")",
",",
"style",
"=",
"element",
".",
"style",
";",
"style",
".",
"background",
"=",
"\"transparent none\"",
";",
"style",
".",
"border",
"=",
... | Creates an easily positionable element of the given type that therefor
serves as an excellent container element.
@function
@param {String} tagName
@returns {Element} | [
"Creates",
"an",
"easily",
"positionable",
"element",
"of",
"the",
"given",
"type",
"that",
"therefor",
"serves",
"as",
"an",
"excellent",
"container",
"element",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1768-L1779 | |
10,795 | openseadragon/openseadragon | src/openseadragon.js | function( src ) {
$.makeTransparentImage = function( src ){
var img = $.makeNeutralElement( "img" );
img.src = src;
return img;
};
if ( $.Browser.vendor == $.BROWSERS.IE && $.Browser.version < 7 ) {
$.makeTransparen... | javascript | function( src ) {
$.makeTransparentImage = function( src ){
var img = $.makeNeutralElement( "img" );
img.src = src;
return img;
};
if ( $.Browser.vendor == $.BROWSERS.IE && $.Browser.version < 7 ) {
$.makeTransparen... | [
"function",
"(",
"src",
")",
"{",
"$",
".",
"makeTransparentImage",
"=",
"function",
"(",
"src",
")",
"{",
"var",
"img",
"=",
"$",
".",
"makeNeutralElement",
"(",
"\"img\"",
")",
";",
"img",
".",
"src",
"=",
"src",
";",
"return",
"img",
";",
"}",
"... | Ensures an image is loaded correctly to support alpha transparency.
Generally only IE has issues doing this correctly for formats like
png.
@function
@param {String} src
@returns {Element} | [
"Ensures",
"an",
"image",
"is",
"loaded",
"correctly",
"to",
"support",
"alpha",
"transparency",
".",
"Generally",
"only",
"IE",
"has",
"issues",
"doing",
"this",
"correctly",
"for",
"formats",
"like",
"png",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1807-L1846 | |
10,796 | openseadragon/openseadragon | src/openseadragon.js | function( element, opacity, usesAlpha ) {
var ieOpacity,
ieFilter;
element = $.getElement( element );
if ( usesAlpha && !$.Browser.alpha ) {
opacity = Math.round( opacity );
}
if ( $.Browser.opacity ) {
eleme... | javascript | function( element, opacity, usesAlpha ) {
var ieOpacity,
ieFilter;
element = $.getElement( element );
if ( usesAlpha && !$.Browser.alpha ) {
opacity = Math.round( opacity );
}
if ( $.Browser.opacity ) {
eleme... | [
"function",
"(",
"element",
",",
"opacity",
",",
"usesAlpha",
")",
"{",
"var",
"ieOpacity",
",",
"ieFilter",
";",
"element",
"=",
"$",
".",
"getElement",
"(",
"element",
")",
";",
"if",
"(",
"usesAlpha",
"&&",
"!",
"$",
".",
"Browser",
".",
"alpha",
... | Sets the opacity of the specified element.
@function
@param {Element|String} element
@param {Number} opacity
@param {Boolean} [usesAlpha] | [
"Sets",
"the",
"opacity",
"of",
"the",
"specified",
"element",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1856-L1878 | |
10,797 | openseadragon/openseadragon | src/openseadragon.js | function( element ) {
element = $.getElement( element );
if ( typeof element.style.touchAction !== 'undefined' ) {
element.style.touchAction = 'none';
} else if ( typeof element.style.msTouchAction !== 'undefined' ) {
element.style.msTouchAction = 'non... | javascript | function( element ) {
element = $.getElement( element );
if ( typeof element.style.touchAction !== 'undefined' ) {
element.style.touchAction = 'none';
} else if ( typeof element.style.msTouchAction !== 'undefined' ) {
element.style.msTouchAction = 'non... | [
"function",
"(",
"element",
")",
"{",
"element",
"=",
"$",
".",
"getElement",
"(",
"element",
")",
";",
"if",
"(",
"typeof",
"element",
".",
"style",
".",
"touchAction",
"!==",
"'undefined'",
")",
"{",
"element",
".",
"style",
".",
"touchAction",
"=",
... | Sets the specified element's touch-action style attribute to 'none'.
@function
@param {Element|String} element | [
"Sets",
"the",
"specified",
"element",
"s",
"touch",
"-",
"action",
"style",
"attribute",
"to",
"none",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1886-L1893 | |
10,798 | openseadragon/openseadragon | src/openseadragon.js | function( element, className ) {
element = $.getElement( element );
if (!element.className) {
element.className = className;
} else if ( ( ' ' + element.className + ' ' ).
indexOf( ' ' + className + ' ' ) === -1 ) {
element.className +... | javascript | function( element, className ) {
element = $.getElement( element );
if (!element.className) {
element.className = className;
} else if ( ( ' ' + element.className + ' ' ).
indexOf( ' ' + className + ' ' ) === -1 ) {
element.className +... | [
"function",
"(",
"element",
",",
"className",
")",
"{",
"element",
"=",
"$",
".",
"getElement",
"(",
"element",
")",
";",
"if",
"(",
"!",
"element",
".",
"className",
")",
"{",
"element",
".",
"className",
"=",
"className",
";",
"}",
"else",
"if",
"(... | Add the specified CSS class to the element if not present.
@function
@param {Element|String} element
@param {String} className | [
"Add",
"the",
"specified",
"CSS",
"class",
"to",
"the",
"element",
"if",
"not",
"present",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1902-L1911 | |
10,799 | openseadragon/openseadragon | src/openseadragon.js | function( array, searchElement, fromIndex ) {
if ( Array.prototype.indexOf ) {
this.indexOf = function( array, searchElement, fromIndex ) {
return array.indexOf( searchElement, fromIndex );
};
} else {
this.indexOf = function( a... | javascript | function( array, searchElement, fromIndex ) {
if ( Array.prototype.indexOf ) {
this.indexOf = function( array, searchElement, fromIndex ) {
return array.indexOf( searchElement, fromIndex );
};
} else {
this.indexOf = function( a... | [
"function",
"(",
"array",
",",
"searchElement",
",",
"fromIndex",
")",
"{",
"if",
"(",
"Array",
".",
"prototype",
".",
"indexOf",
")",
"{",
"this",
".",
"indexOf",
"=",
"function",
"(",
"array",
",",
"searchElement",
",",
"fromIndex",
")",
"{",
"return",... | Find the first index at which an element is found in an array or -1
if not present.
Code taken and adapted from
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Compatibility
@function
@param {Array} array The array from which to find the element
@param {Object} searchEle... | [
"Find",
"the",
"first",
"index",
"at",
"which",
"an",
"element",
"is",
"found",
"in",
"an",
"array",
"or",
"-",
"1",
"if",
"not",
"present",
"."
] | e7108f23602575fc6eb152d4b82a8b44b2ca698e | https://github.com/openseadragon/openseadragon/blob/e7108f23602575fc6eb152d4b82a8b44b2ca698e/src/openseadragon.js#L1926-L1958 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.