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
32,500
browserstack/selenium-webdriver-nodejs
lib/webdriver/promise.js
notify
function notify(listener) { var func = state == webdriver.promise.Deferred.State_.RESOLVED ? listener.callback : listener.errback; if (func) { flow.runInNewFrame_(goog.partial(func, value), listener.fulfill, listener.reject); } else if (state == webdriver.promise.Deferred.State_.REJE...
javascript
function notify(listener) { var func = state == webdriver.promise.Deferred.State_.RESOLVED ? listener.callback : listener.errback; if (func) { flow.runInNewFrame_(goog.partial(func, value), listener.fulfill, listener.reject); } else if (state == webdriver.promise.Deferred.State_.REJE...
[ "function", "notify", "(", "listener", ")", "{", "var", "func", "=", "state", "==", "webdriver", ".", "promise", ".", "Deferred", ".", "State_", ".", "RESOLVED", "?", "listener", ".", "callback", ":", "listener", ".", "errback", ";", "if", "(", "func", ...
Notifies a single listener of this Deferred's change in state. @param {!webdriver.promise.Deferred.Listener_} listener The listener to notify.
[ "Notifies", "a", "single", "listener", "of", "this", "Deferred", "s", "change", "in", "state", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/lib/webdriver/promise.js#L440-L451
32,501
browserstack/selenium-webdriver-nodejs
lib/webdriver/promise.js
cancel
function cancel(opt_reason) { if (!isPending()) { return; } if (opt_canceller) { opt_reason = opt_canceller(opt_reason) || opt_reason; } reject(opt_reason); }
javascript
function cancel(opt_reason) { if (!isPending()) { return; } if (opt_canceller) { opt_reason = opt_canceller(opt_reason) || opt_reason; } reject(opt_reason); }
[ "function", "cancel", "(", "opt_reason", ")", "{", "if", "(", "!", "isPending", "(", ")", ")", "{", "return", ";", "}", "if", "(", "opt_canceller", ")", "{", "opt_reason", "=", "opt_canceller", "(", "opt_reason", ")", "||", "opt_reason", ";", "}", "rej...
Attempts to cancel the computation of this instance's value. This attempt will silently fail if this instance has already resolved. @param {*=} opt_reason The reason for cancelling this promise.
[ "Attempts", "to", "cancel", "the", "computation", "of", "this", "instance", "s", "value", ".", "This", "attempt", "will", "silently", "fail", "if", "this", "instance", "has", "already", "resolved", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/lib/webdriver/promise.js#L530-L540
32,502
browserstack/selenium-webdriver-nodejs
firefox/extension.js
AddonFormatError
function AddonFormatError(msg) { Error.call(this); Error.captureStackTrace(this, AddonFormatError); /** @override */ this.name = AddonFormatError.name; /** @override */ this.message = msg; }
javascript
function AddonFormatError(msg) { Error.call(this); Error.captureStackTrace(this, AddonFormatError); /** @override */ this.name = AddonFormatError.name; /** @override */ this.message = msg; }
[ "function", "AddonFormatError", "(", "msg", ")", "{", "Error", ".", "call", "(", "this", ")", ";", "Error", ".", "captureStackTrace", "(", "this", ",", "AddonFormatError", ")", ";", "/** @override */", "this", ".", "name", "=", "AddonFormatError", ".", "name...
Thrown when there an add-on is malformed. @param {string} msg The error message. @constructor @extends {Error}
[ "Thrown", "when", "there", "an", "add", "-", "on", "is", "malformed", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/firefox/extension.js#L37-L47
32,503
browserstack/selenium-webdriver-nodejs
firefox/extension.js
getDetails
function getDetails(addonPath) { return readManifest(addonPath).then(function(doc) { var em = getNamespaceId(doc, 'http://www.mozilla.org/2004/em-rdf#'); var rdf = getNamespaceId( doc, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); var description = doc[rdf + 'RDF'][rdf + 'Description'][0]; ...
javascript
function getDetails(addonPath) { return readManifest(addonPath).then(function(doc) { var em = getNamespaceId(doc, 'http://www.mozilla.org/2004/em-rdf#'); var rdf = getNamespaceId( doc, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); var description = doc[rdf + 'RDF'][rdf + 'Description'][0]; ...
[ "function", "getDetails", "(", "addonPath", ")", "{", "return", "readManifest", "(", "addonPath", ")", ".", "then", "(", "function", "(", "doc", ")", "{", "var", "em", "=", "getNamespaceId", "(", "doc", ",", "'http://www.mozilla.org/2004/em-rdf#'", ")", ";", ...
Extracts the details needed to install an add-on. @param {string} addonPath Path to the extension directory. @return {!promise.Promise.<!AddonDetails>} A promise for the add-on details.
[ "Extracts", "the", "details", "needed", "to", "install", "an", "add", "-", "on", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/firefox/extension.js#L94-L143
32,504
browserstack/selenium-webdriver-nodejs
firefox/extension.js
readManifest
function readManifest(addonPath) { var manifest; if (addonPath.slice(-4) === '.xpi') { manifest = checkedCall(fs.readFile, addonPath).then(function(buff) { var zip = new AdmZip(buff); if (!zip.getEntry('install.rdf')) { throw new AddonFormatError( 'Could not find install.rdf in ...
javascript
function readManifest(addonPath) { var manifest; if (addonPath.slice(-4) === '.xpi') { manifest = checkedCall(fs.readFile, addonPath).then(function(buff) { var zip = new AdmZip(buff); if (!zip.getEntry('install.rdf')) { throw new AddonFormatError( 'Could not find install.rdf in ...
[ "function", "readManifest", "(", "addonPath", ")", "{", "var", "manifest", ";", "if", "(", "addonPath", ".", "slice", "(", "-", "4", ")", "===", "'.xpi'", ")", "{", "manifest", "=", "checkedCall", "(", "fs", ".", "readFile", ",", "addonPath", ")", ".",...
Reads the manifest for a Firefox add-on. @param {string} addonPath Path to a Firefox add-on as a xpi or an extension. @return {!promise.Promise.<!Object>} A promise for the parsed manifest.
[ "Reads", "the", "manifest", "for", "a", "Firefox", "add", "-", "on", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/firefox/extension.js#L151-L178
32,505
browserstack/selenium-webdriver-nodejs
chrome.js
function(opt_config, opt_service, opt_flow) { var service = opt_service || getDefaultService(); var executor = executors.createExecutor(service.start()); var capabilities = opt_config instanceof Options ? opt_config.toCapabilities() : (opt_config || webdriver.Capabilities.chrome()); var driver = w...
javascript
function(opt_config, opt_service, opt_flow) { var service = opt_service || getDefaultService(); var executor = executors.createExecutor(service.start()); var capabilities = opt_config instanceof Options ? opt_config.toCapabilities() : (opt_config || webdriver.Capabilities.chrome()); var driver = w...
[ "function", "(", "opt_config", ",", "opt_service", ",", "opt_flow", ")", "{", "var", "service", "=", "opt_service", "||", "getDefaultService", "(", ")", ";", "var", "executor", "=", "executors", ".", "createExecutor", "(", "service", ".", "start", "(", ")", ...
Creates a new WebDriver client for Chrome. @param {(webdriver.Capabilities|Options)=} opt_config The configuration options. @param {remote.DriverService=} opt_service The session to use; will use the {@link getDefaultService default service} by default. @param {webdriver.promise.ControlFlow=} opt_flow The control flow...
[ "Creates", "a", "new", "WebDriver", "client", "for", "Chrome", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/chrome.js#L469-L482
32,506
browserstack/selenium-webdriver-nodejs
net/portprober.js
findUnixPortRange
function findUnixPortRange() { var cmd; if (process.platform === 'sunos') { cmd = '/usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port'; } else if (fs.existsSync('/proc/sys/net/ipv4/ip_local_port_range')) { // Linux cmd = 'cat /proc/sys/net/ipv4/ip_local_port_range'; } else {...
javascript
function findUnixPortRange() { var cmd; if (process.platform === 'sunos') { cmd = '/usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port'; } else if (fs.existsSync('/proc/sys/net/ipv4/ip_local_port_range')) { // Linux cmd = 'cat /proc/sys/net/ipv4/ip_local_port_range'; } else {...
[ "function", "findUnixPortRange", "(", ")", "{", "var", "cmd", ";", "if", "(", "process", ".", "platform", "===", "'sunos'", ")", "{", "cmd", "=", "'/usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port'", ";", "}", "else", "if", "(", "fs", ".", "ex...
Computes the ephemeral port range for a Unix-like system. @return {!webdriver.promise.Promise.<{min: number, max: number}>} A promise that will resolve with the ephemeral port range on the current system.
[ "Computes", "the", "ephemeral", "port", "range", "for", "a", "Unix", "-", "like", "system", "." ]
80a1379f73354aaf722a343c2d0ccc1aa7674b29
https://github.com/browserstack/selenium-webdriver-nodejs/blob/80a1379f73354aaf722a343c2d0ccc1aa7674b29/net/portprober.js#L84-L103
32,507
Cerealkillerway/materialNote
src/js/base/core/agent.js
function (fontName) { var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS'; var $tester = $('<div>').css({ position: 'absolute', left: '-9999px', top: '-9999px', fontSize: '200px' }).text('mmmmmmmmmwwwwwww').appendTo(document.body); var originalWidth...
javascript
function (fontName) { var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS'; var $tester = $('<div>').css({ position: 'absolute', left: '-9999px', top: '-9999px', fontSize: '200px' }).text('mmmmmmmmmwwwwwww').appendTo(document.body); var originalWidth...
[ "function", "(", "fontName", ")", "{", "var", "testFontName", "=", "fontName", "===", "'Comic Sans MS'", "?", "'Courier New'", ":", "'Comic Sans MS'", ";", "var", "$tester", "=", "$", "(", "'<div>'", ")", ".", "css", "(", "{", "position", ":", "'absolute'", ...
returns whether font is installed or not. @param {String} fontName @return {Boolean}
[ "returns", "whether", "font", "is", "installed", "or", "not", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/agent.js#L10-L25
32,508
Cerealkillerway/materialNote
src/js/base/core/range.js
function (sc, so, ec, eo) { if (arguments.length === 4) { return new WrappedRange(sc, so, ec, eo); } else if (arguments.length === 2) { //collapsed ec = sc; eo = so; return new WrappedRange(sc, so, ec, eo); ...
javascript
function (sc, so, ec, eo) { if (arguments.length === 4) { return new WrappedRange(sc, so, ec, eo); } else if (arguments.length === 2) { //collapsed ec = sc; eo = so; return new WrappedRange(sc, so, ec, eo); ...
[ "function", "(", "sc", ",", "so", ",", "ec", ",", "eo", ")", "{", "if", "(", "arguments", ".", "length", "===", "4", ")", "{", "return", "new", "WrappedRange", "(", "sc", ",", "so", ",", "ec", ",", "eo", ")", ";", "}", "else", "if", "(", "arg...
create Range Object From arguments or Browser Selection @param {Node} sc - start container @param {Number} so - start offset @param {Node} ec - end container @param {Number} eo - end offset @return {WrappedRange}
[ "create", "Range", "Object", "From", "arguments", "or", "Browser", "Selection" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/range.js#L654-L669
32,509
Cerealkillerway/materialNote
src/materialize/materialize.js
returnToOriginal
function returnToOriginal() { doneAnimating = false; var placeholder = origin.parent('.material-placeholder'); var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var originalWidth = origin.data('width'); var originalHeight = origin.data('height'...
javascript
function returnToOriginal() { doneAnimating = false; var placeholder = origin.parent('.material-placeholder'); var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var originalWidth = origin.data('width'); var originalHeight = origin.data('height'...
[ "function", "returnToOriginal", "(", ")", "{", "doneAnimating", "=", "false", ";", "var", "placeholder", "=", "origin", ".", "parent", "(", "'.material-placeholder'", ")", ";", "var", "windowWidth", "=", "window", ".", "innerWidth", ";", "var", "windowHeight", ...
This function returns the modaled image to the original spot
[ "This", "function", "returns", "the", "modaled", "image", "to", "the", "original", "spot" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/materialize/materialize.js#L1265-L1334
32,510
Cerealkillerway/materialNote
src/materialize/materialize.js
function(string, $el) { var img = $el.find('img'); var matchStart = $el.text().toLowerCase().indexOf("" + string.toLowerCase() + ""), matchEnd = matchStart + string.length - 1, beforeMatch = $el.text().slice(0, matchStart), matchText = $el.text().s...
javascript
function(string, $el) { var img = $el.find('img'); var matchStart = $el.text().toLowerCase().indexOf("" + string.toLowerCase() + ""), matchEnd = matchStart + string.length - 1, beforeMatch = $el.text().slice(0, matchStart), matchText = $el.text().s...
[ "function", "(", "string", ",", "$el", ")", "{", "var", "img", "=", "$el", ".", "find", "(", "'img'", ")", ";", "var", "matchStart", "=", "$el", ".", "text", "(", ")", ".", "toLowerCase", "(", ")", ".", "indexOf", "(", "\"\"", "+", "string", ".",...
Highlight partial match.
[ "Highlight", "partial", "match", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/materialize/materialize.js#L3298-L3309
32,511
Cerealkillerway/materialNote
src/materialize/materialize.js
function(collection, newOption, firstActivation) { if (newOption) { collection.find('li.selected').removeClass('selected'); var option = $(newOption); option.addClass('selected'); if (!multiple || !!firstActivation) { options.scrollTo(option); } ...
javascript
function(collection, newOption, firstActivation) { if (newOption) { collection.find('li.selected').removeClass('selected'); var option = $(newOption); option.addClass('selected'); if (!multiple || !!firstActivation) { options.scrollTo(option); } ...
[ "function", "(", "collection", ",", "newOption", ",", "firstActivation", ")", "{", "if", "(", "newOption", ")", "{", "collection", ".", "find", "(", "'li.selected'", ")", ".", "removeClass", "(", "'selected'", ")", ";", "var", "option", "=", "$", "(", "n...
Make option as selected and scroll to selected position @param {jQuery} collection Select options jQuery element @param {Element} newOption element of the new option @param {Boolean} firstActivation If on first activation of select
[ "Make", "option", "as", "selected", "and", "scroll", "to", "selected", "position" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/materialize/materialize.js#L3629-L3638
32,512
Cerealkillerway/materialNote
src/materialize/materialize.js
function(btn) { if (btn.attr('data-open') === "true") { return; } var offsetX, offsetY, scaleFactor; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var btnRect = btn[0].getBoundingClientRect(); var anchor = btn.find('> a').first(); var menu = btn.find(...
javascript
function(btn) { if (btn.attr('data-open') === "true") { return; } var offsetX, offsetY, scaleFactor; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var btnRect = btn[0].getBoundingClientRect(); var anchor = btn.find('> a').first(); var menu = btn.find(...
[ "function", "(", "btn", ")", "{", "if", "(", "btn", ".", "attr", "(", "'data-open'", ")", "===", "\"true\"", ")", "{", "return", ";", "}", "var", "offsetX", ",", "offsetY", ",", "scaleFactor", ";", "var", "windowWidth", "=", "window", ".", "innerWidth"...
Transform FAB into toolbar @param {Object} object jQuery object
[ "Transform", "FAB", "into", "toolbar" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/materialize/materialize.js#L4597-L4679
32,513
Cerealkillerway/materialNote
src/materialize/materialize.js
function(btn) { if (btn.attr('data-open') !== "true") { return; } var offsetX, offsetY, scaleFactor; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var btnWidth = btn.attr('data-origin-width'); var btnBottom = btn.attr('data-origin-bottom'); var btnLef...
javascript
function(btn) { if (btn.attr('data-open') !== "true") { return; } var offsetX, offsetY, scaleFactor; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var btnWidth = btn.attr('data-origin-width'); var btnBottom = btn.attr('data-origin-bottom'); var btnLef...
[ "function", "(", "btn", ")", "{", "if", "(", "btn", ".", "attr", "(", "'data-open'", ")", "!==", "\"true\"", ")", "{", "return", ";", "}", "var", "offsetX", ",", "offsetY", ",", "scaleFactor", ";", "var", "windowWidth", "=", "window", ".", "innerWidth"...
Transform toolbar back into FAB @param {Object} object jQuery object
[ "Transform", "toolbar", "back", "into", "FAB" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/materialize/materialize.js#L4685-L4753
32,514
Cerealkillerway/materialNote
src/materialize/materialize.js
function( giveFocus ) { // If we need to give focus, do it before changing states. if ( giveFocus ) { // ....ah yes! It would’ve been incomplete without a crazy workaround for IE :| // The focus is triggered *after* the close has completed - causi...
javascript
function( giveFocus ) { // If we need to give focus, do it before changing states. if ( giveFocus ) { // ....ah yes! It would’ve been incomplete without a crazy workaround for IE :| // The focus is triggered *after* the close has completed - causi...
[ "function", "(", "giveFocus", ")", "{", "// If we need to give focus, do it before changing states.", "if", "(", "giveFocus", ")", "{", "// ....ah yes! It would’ve been incomplete without a crazy workaround for IE :|", "// The focus is triggered *after* the close has completed - causing it",...
open Close the picker
[ "open", "Close", "the", "picker" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/materialize/materialize.js#L5300-L5346
32,515
Cerealkillerway/materialNote
src/js/base/core/func.js
function (obj) { var inverted = {}; for (var key in obj) { if (obj.hasOwnProperty(key)) { inverted[obj[key]] = key; } } return inverted; }
javascript
function (obj) { var inverted = {}; for (var key in obj) { if (obj.hasOwnProperty(key)) { inverted[obj[key]] = key; } } return inverted; }
[ "function", "(", "obj", ")", "{", "var", "inverted", "=", "{", "}", ";", "for", "(", "var", "key", "in", "obj", ")", "{", "if", "(", "obj", ".", "hasOwnProperty", "(", "key", ")", ")", "{", "inverted", "[", "obj", "[", "key", "]", "]", "=", "...
returns a copy of the object where the keys have become the values and the values the keys. @param {Object} obj @return {Object}
[ "returns", "a", "copy", "of", "the", "object", "where", "the", "keys", "have", "become", "the", "values", "and", "the", "values", "the", "keys", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/func.js#L97-L105
32,516
Cerealkillerway/materialNote
src/js/base/core/dom.js
function (node, pred) { pred = pred || func.ok; var siblings = []; if (node.previousSibling && pred(node.previousSibling)) { siblings.push(node.previousSibling); } siblings.push(node); if (node.nextSibling && pred(node.nextSibling)...
javascript
function (node, pred) { pred = pred || func.ok; var siblings = []; if (node.previousSibling && pred(node.previousSibling)) { siblings.push(node.previousSibling); } siblings.push(node); if (node.nextSibling && pred(node.nextSibling)...
[ "function", "(", "node", ",", "pred", ")", "{", "pred", "=", "pred", "||", "func", ".", "ok", ";", "var", "siblings", "=", "[", "]", ";", "if", "(", "node", ".", "previousSibling", "&&", "pred", "(", "node", ".", "previousSibling", ")", ")", "{", ...
returns array of closest siblings with node @param {Node} node @param {function} [pred] - predicate function @return {Node[]}
[ "returns", "array", "of", "closest", "siblings", "with", "node" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/dom.js#L178-L190
32,517
Cerealkillerway/materialNote
src/js/base/core/dom.js
function (node, pred) { node = node.parentNode; while (node) { if (nodeLength(node) !== 1) { break; } if (pred(node)) { return node; } if (isEditable(node)) { break; } node = node.parentNode; } return null;...
javascript
function (node, pred) { node = node.parentNode; while (node) { if (nodeLength(node) !== 1) { break; } if (pred(node)) { return node; } if (isEditable(node)) { break; } node = node.parentNode; } return null;...
[ "function", "(", "node", ",", "pred", ")", "{", "node", "=", "node", ".", "parentNode", ";", "while", "(", "node", ")", "{", "if", "(", "nodeLength", "(", "node", ")", "!==", "1", ")", "{", "break", ";", "}", "if", "(", "pred", "(", "node", ")"...
find nearest ancestor only single child blood line and predicate hit @param {Node} node @param {Function} pred - predicate function
[ "find", "nearest", "ancestor", "only", "single", "child", "blood", "line", "and", "predicate", "hit" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/dom.js#L272-L283
32,518
Cerealkillerway/materialNote
src/js/base/core/dom.js
function (node, wrapperName) { var parent = node.parentNode; var wrapper = $('<' + wrapperName + '>')[0]; parent.insertBefore(wrapper, node); wrapper.appendChild(node); return wrapper; }
javascript
function (node, wrapperName) { var parent = node.parentNode; var wrapper = $('<' + wrapperName + '>')[0]; parent.insertBefore(wrapper, node); wrapper.appendChild(node); return wrapper; }
[ "function", "(", "node", ",", "wrapperName", ")", "{", "var", "parent", "=", "node", ".", "parentNode", ";", "var", "wrapper", "=", "$", "(", "'<'", "+", "wrapperName", "+", "'>'", ")", "[", "0", "]", ";", "parent", ".", "insertBefore", "(", "wrapper...
wrap node with new tag. @param {Node} node @param {Node} tagName of wrapper @return {Node} - wrapper
[ "wrap", "node", "with", "new", "tag", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/dom.js#L393-L401
32,519
Cerealkillerway/materialNote
src/js/base/core/dom.js
function (node, preceding) { var next = preceding.nextSibling, parent = preceding.parentNode; if (next) { parent.insertBefore(node, next); } else { parent.appendChild(node); } return node; }
javascript
function (node, preceding) { var next = preceding.nextSibling, parent = preceding.parentNode; if (next) { parent.insertBefore(node, next); } else { parent.appendChild(node); } return node; }
[ "function", "(", "node", ",", "preceding", ")", "{", "var", "next", "=", "preceding", ".", "nextSibling", ",", "parent", "=", "preceding", ".", "parentNode", ";", "if", "(", "next", ")", "{", "parent", ".", "insertBefore", "(", "node", ",", "next", ")"...
insert node after preceding @param {Node} node @param {Node} preceding - predicate function
[ "insert", "node", "after", "preceding" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/dom.js#L409-L417
32,520
Cerealkillerway/materialNote
src/js/base/core/dom.js
function (node, aChild) { $.each(aChild, function (idx, child) { node.appendChild(child); }); return node; }
javascript
function (node, aChild) { $.each(aChild, function (idx, child) { node.appendChild(child); }); return node; }
[ "function", "(", "node", ",", "aChild", ")", "{", "$", ".", "each", "(", "aChild", ",", "function", "(", "idx", ",", "child", ")", "{", "node", ".", "appendChild", "(", "child", ")", ";", "}", ")", ";", "return", "node", ";", "}" ]
append elements. @param {Node} node @param {Collection} aChild
[ "append", "elements", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/dom.js#L425-L430
32,521
Cerealkillerway/materialNote
src/js/base/core/dom.js
function (point) { if (!isText(point.node)) { return false; } var ch = point.node.nodeValue.charAt(point.offset - 1); return ch && (ch !== ' ' && ch !== NBSP_CHAR); }
javascript
function (point) { if (!isText(point.node)) { return false; } var ch = point.node.nodeValue.charAt(point.offset - 1); return ch && (ch !== ' ' && ch !== NBSP_CHAR); }
[ "function", "(", "point", ")", "{", "if", "(", "!", "isText", "(", "point", ".", "node", ")", ")", "{", "return", "false", ";", "}", "var", "ch", "=", "point", ".", "node", ".", "nodeValue", ".", "charAt", "(", "point", ".", "offset", "-", "1", ...
returns whether point has character or not. @param {Point} point @return {Boolean}
[ "returns", "whether", "point", "has", "character", "or", "not", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/dom.js#L675-L682
32,522
Cerealkillerway/materialNote
src/js/base/editing/Table.js
setVirtualTablePosition
function setVirtualTablePosition(rowIndex, cellIndex, baseRow, baseCell, isRowSpan, isColSpan, isVirtualCell) { var objPosition = { 'baseRow': baseRow, 'baseCell': baseCell, 'isRowSpan': isRowSpan, 'isColSpan': isColSpan, 'isVir...
javascript
function setVirtualTablePosition(rowIndex, cellIndex, baseRow, baseCell, isRowSpan, isColSpan, isVirtualCell) { var objPosition = { 'baseRow': baseRow, 'baseCell': baseCell, 'isRowSpan': isRowSpan, 'isColSpan': isColSpan, 'isVir...
[ "function", "setVirtualTablePosition", "(", "rowIndex", ",", "cellIndex", ",", "baseRow", ",", "baseCell", ",", "isRowSpan", ",", "isColSpan", ",", "isVirtualCell", ")", "{", "var", "objPosition", "=", "{", "'baseRow'", ":", "baseRow", ",", "'baseCell'", ":", ...
Define virtual table position info object. @param {int} rowIndex Index position in line of virtual table. @param {int} cellIndex Index position in column of virtual table. @param {object} baseRow Row affected by this position. @param {object} baseCell Cell affected by this position. @param {bool} isSpan Inform if it i...
[ "Define", "virtual", "table", "position", "info", "object", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/editing/Table.js#L48-L60
32,523
Cerealkillerway/materialNote
src/js/base/editing/Table.js
getActionCell
function getActionCell(virtualTableCellObj, resultAction, virtualRowPosition, virtualColPosition) { return { 'baseCell': virtualTableCellObj.baseCell, 'action': resultAction, 'virtualTable': { 'rowIndex': virtualRowPosition, ...
javascript
function getActionCell(virtualTableCellObj, resultAction, virtualRowPosition, virtualColPosition) { return { 'baseCell': virtualTableCellObj.baseCell, 'action': resultAction, 'virtualTable': { 'rowIndex': virtualRowPosition, ...
[ "function", "getActionCell", "(", "virtualTableCellObj", ",", "resultAction", ",", "virtualRowPosition", ",", "virtualColPosition", ")", "{", "return", "{", "'baseCell'", ":", "virtualTableCellObj", ".", "baseCell", ",", "'action'", ":", "resultAction", ",", "'virtual...
Create action cell object. @param {object} virtualTableCellObj Object of specific position on virtual table. @param {enum} resultAction Action to be applied in that item.
[ "Create", "action", "cell", "object", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/editing/Table.js#L68-L77
32,524
Cerealkillerway/materialNote
src/js/base/editing/Table.js
recoverCellIndex
function recoverCellIndex(rowIndex, cellIndex) { if (!_virtualTable[rowIndex]) { return cellIndex; } if (!_virtualTable[rowIndex][cellIndex]) { return cellIndex; } var newCellIndex = cellIndex; while (_virtualTable[...
javascript
function recoverCellIndex(rowIndex, cellIndex) { if (!_virtualTable[rowIndex]) { return cellIndex; } if (!_virtualTable[rowIndex][cellIndex]) { return cellIndex; } var newCellIndex = cellIndex; while (_virtualTable[...
[ "function", "recoverCellIndex", "(", "rowIndex", ",", "cellIndex", ")", "{", "if", "(", "!", "_virtualTable", "[", "rowIndex", "]", ")", "{", "return", "cellIndex", ";", "}", "if", "(", "!", "_virtualTable", "[", "rowIndex", "]", "[", "cellIndex", "]", "...
Recover free index of row to append Cell. @param {int} rowIndex Index of row to find free space. @param {int} cellIndex Index of cell to find free space in table.
[ "Recover", "free", "index", "of", "row", "to", "append", "Cell", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/editing/Table.js#L85-L100
32,525
Cerealkillerway/materialNote
src/js/base/editing/Table.js
addCellInfoToVirtual
function addCellInfoToVirtual(row, cell) { var cellIndex = recoverCellIndex(row.rowIndex, cell.cellIndex); var cellHasColspan = (cell.colSpan > 1); var cellHasRowspan = (cell.rowSpan > 1); var isThisSelectedCell = (row.rowIndex === _startPoint.rowPos && cell.cellIndex ===...
javascript
function addCellInfoToVirtual(row, cell) { var cellIndex = recoverCellIndex(row.rowIndex, cell.cellIndex); var cellHasColspan = (cell.colSpan > 1); var cellHasRowspan = (cell.rowSpan > 1); var isThisSelectedCell = (row.rowIndex === _startPoint.rowPos && cell.cellIndex ===...
[ "function", "addCellInfoToVirtual", "(", "row", ",", "cell", ")", "{", "var", "cellIndex", "=", "recoverCellIndex", "(", "row", ".", "rowIndex", ",", "cell", ".", "cellIndex", ")", ";", "var", "cellHasColspan", "=", "(", "cell", ".", "colSpan", ">", "1", ...
Recover info about row and cell and add information to virtual table. @param {object} row Row to recover information. @param {object} cell Cell to recover information.
[ "Recover", "info", "about", "row", "and", "cell", "and", "add", "information", "to", "virtual", "table", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/editing/Table.js#L108-L134
32,526
Cerealkillerway/materialNote
src/js/base/editing/Table.js
adjustStartPoint
function adjustStartPoint(rowIndex, cellIndex, cell, isSelectedCell) { if (rowIndex === _startPoint.rowPos && _startPoint.colPos >= cell.cellIndex && cell.cellIndex <= cellIndex && !isSelectedCell) { _startPoint.colPos++; } }
javascript
function adjustStartPoint(rowIndex, cellIndex, cell, isSelectedCell) { if (rowIndex === _startPoint.rowPos && _startPoint.colPos >= cell.cellIndex && cell.cellIndex <= cellIndex && !isSelectedCell) { _startPoint.colPos++; } }
[ "function", "adjustStartPoint", "(", "rowIndex", ",", "cellIndex", ",", "cell", ",", "isSelectedCell", ")", "{", "if", "(", "rowIndex", "===", "_startPoint", ".", "rowPos", "&&", "_startPoint", ".", "colPos", ">=", "cell", ".", "cellIndex", "&&", "cell", "."...
Process validation and adjust of start point if needed @param {int} rowIndex @param {int} cellIndex @param {object} cell @param {bool} isSelectedCell
[ "Process", "validation", "and", "adjust", "of", "start", "point", "if", "needed" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/editing/Table.js#L144-L148
32,527
Cerealkillerway/materialNote
src/js/base/editing/Table.js
createVirtualTable
function createVirtualTable() { var rows = domTable.rows; for (var rowIndex = 0; rowIndex < rows.length; rowIndex++) { var cells = rows[rowIndex].cells; for (var cellIndex = 0; cellIndex < cells.length; cellIndex++) { addCellInfoToVirtual(rows[...
javascript
function createVirtualTable() { var rows = domTable.rows; for (var rowIndex = 0; rowIndex < rows.length; rowIndex++) { var cells = rows[rowIndex].cells; for (var cellIndex = 0; cellIndex < cells.length; cellIndex++) { addCellInfoToVirtual(rows[...
[ "function", "createVirtualTable", "(", ")", "{", "var", "rows", "=", "domTable", ".", "rows", ";", "for", "(", "var", "rowIndex", "=", "0", ";", "rowIndex", "<", "rows", ".", "length", ";", "rowIndex", "++", ")", "{", "var", "cells", "=", "rows", "["...
Create virtual table of cells with all cells, including span cells.
[ "Create", "virtual", "table", "of", "cells", "with", "all", "cells", "including", "span", "cells", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/editing/Table.js#L153-L161
32,528
Cerealkillerway/materialNote
grunts/grunt-build.js
function (compiled) { // 01. Embed version var version = grunt.config('pkg.version'); compiled = compiled.replace(/@VERSION/g, version); // 02. Embed Date var date = (new Date()).toISOString().replace(/:\d+\.\d+Z$/, 'Z'); compiled = compiled.replace(/@DATE/g, date); ...
javascript
function (compiled) { // 01. Embed version var version = grunt.config('pkg.version'); compiled = compiled.replace(/@VERSION/g, version); // 02. Embed Date var date = (new Date()).toISOString().replace(/:\d+\.\d+Z$/, 'Z'); compiled = compiled.replace(/@DATE/g, date); ...
[ "function", "(", "compiled", ")", "{", "// 01. Embed version", "var", "version", "=", "grunt", ".", "config", "(", "'pkg.version'", ")", ";", "compiled", "=", "compiled", ".", "replace", "(", "/", "@VERSION", "/", "g", ",", "version", ")", ";", "// 02. Em...
Handle final output from the optimizer
[ "Handle", "final", "output", "from", "the", "optimizer" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/grunts/grunt-build.js#L21-L31
32,529
Cerealkillerway/materialNote
grunts/grunt-build.js
function (name, path, contents) { contents = contents.replace(rDefineStart, ''); if (rDefineEndWithReturn.test(contents)) { contents = contents.replace(rDefineEndWithReturn, ''); } else { contents = contents.replace(rDefineEnd, ''); } return contents; }
javascript
function (name, path, contents) { contents = contents.replace(rDefineStart, ''); if (rDefineEndWithReturn.test(contents)) { contents = contents.replace(rDefineEndWithReturn, ''); } else { contents = contents.replace(rDefineEnd, ''); } return contents; }
[ "function", "(", "name", ",", "path", ",", "contents", ")", "{", "contents", "=", "contents", ".", "replace", "(", "rDefineStart", ",", "''", ")", ";", "if", "(", "rDefineEndWithReturn", ".", "test", "(", "contents", ")", ")", "{", "contents", "=", "co...
Strip all definitions generated by requirejs @param {String} name @param {String} path @param {String} contents The contents to be written (including their AMD wrappers)
[ "Strip", "all", "definitions", "generated", "by", "requirejs" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/grunts/grunt-build.js#L46-L55
32,530
Cerealkillerway/materialNote
src/js/base/core/list.js
function (array, pred) { for (var idx = 0, len = array.length; idx < len; idx ++) { var item = array[idx]; if (pred(item)) { return item; } } }
javascript
function (array, pred) { for (var idx = 0, len = array.length; idx < len; idx ++) { var item = array[idx]; if (pred(item)) { return item; } } }
[ "function", "(", "array", ",", "pred", ")", "{", "for", "(", "var", "idx", "=", "0", ",", "len", "=", "array", ".", "length", ";", "idx", "<", "len", ";", "idx", "++", ")", "{", "var", "item", "=", "array", "[", "idx", "]", ";", "if", "(", ...
returns item of array
[ "returns", "item", "of", "array" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/list.js#L50-L57
32,531
Cerealkillerway/materialNote
src/js/base/core/list.js
function (array, fn) { if (!array.length) { return []; } var aTail = tail(array); return aTail.reduce(function (memo, v) { var aLast = last(memo); if (fn(last(aLast), v)) { aLast[aLast.length] = v; } else { memo[memo.length] = [v]; } return m...
javascript
function (array, fn) { if (!array.length) { return []; } var aTail = tail(array); return aTail.reduce(function (memo, v) { var aLast = last(memo); if (fn(last(aLast), v)) { aLast[aLast.length] = v; } else { memo[memo.length] = [v]; } return m...
[ "function", "(", "array", ",", "fn", ")", "{", "if", "(", "!", "array", ".", "length", ")", "{", "return", "[", "]", ";", "}", "var", "aTail", "=", "tail", "(", "array", ")", ";", "return", "aTail", ".", "reduce", "(", "function", "(", "memo", ...
cluster elements by predicate function. @param {Array} array - array @param {Function} fn - predicate function for cluster rule @param {Array[]}
[ "cluster", "elements", "by", "predicate", "function", "." ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/src/js/base/core/list.js#L124-L136
32,532
Cerealkillerway/materialNote
Gruntfile.js
function (filepath) { var data = {}; try { data = grunt.file.readJSON(filepath); // The concatenated file won't pass onevar // But our modules can delete data.onever; } catch (e) { } return data; }
javascript
function (filepath) { var data = {}; try { data = grunt.file.readJSON(filepath); // The concatenated file won't pass onevar // But our modules can delete data.onever; } catch (e) { } return data; }
[ "function", "(", "filepath", ")", "{", "var", "data", "=", "{", "}", ";", "try", "{", "data", "=", "grunt", ".", "file", ".", "readJSON", "(", "filepath", ")", ";", "// The concatenated file won't pass onevar", "// But our modules can", "delete", "data", ".", ...
read optional JSON from filepath @param {String} filepath @return {Object}
[ "read", "optional", "JSON", "from", "filepath" ]
4912662152328df8220cc4063c612e2e9b53d665
https://github.com/Cerealkillerway/materialNote/blob/4912662152328df8220cc4063c612e2e9b53d665/Gruntfile.js#L9-L18
32,533
unindented/stats-webpack-plugin
index.js
StatsPlugin
function StatsPlugin (output, options, cache) { this.output = output this.options = options this.cache = cache }
javascript
function StatsPlugin (output, options, cache) { this.output = output this.options = options this.cache = cache }
[ "function", "StatsPlugin", "(", "output", ",", "options", ",", "cache", ")", "{", "this", ".", "output", "=", "output", "this", ".", "options", "=", "options", "this", ".", "cache", "=", "cache", "}" ]
Create a new StatsPlugin that causes webpack to generate a stats file as part of the emitted assets. @constructor @param {String} output Path to output file. @param {Object} options Options passed to the stats' `.toJson()`.
[ "Create", "a", "new", "StatsPlugin", "that", "causes", "webpack", "to", "generate", "a", "stats", "file", "as", "part", "of", "the", "emitted", "assets", "." ]
b3130e5b074056d9f114c06341a66b6ff7cc61ff
https://github.com/unindented/stats-webpack-plugin/blob/b3130e5b074056d9f114c06341a66b6ff7cc61ff/index.js#L11-L15
32,534
Pagawa/PgwSlideshow
pgwslideshow.js
function() { var listWidth = 0; // The plugin must be visible for a correct calculation pgwSlideshow.plugin.show(); pgwSlideshow.plugin.find('.ps-list > ul > li').show().each(function() { listWidth += $(this).width(); }); ...
javascript
function() { var listWidth = 0; // The plugin must be visible for a correct calculation pgwSlideshow.plugin.show(); pgwSlideshow.plugin.find('.ps-list > ul > li').show().each(function() { listWidth += $(this).width(); }); ...
[ "function", "(", ")", "{", "var", "listWidth", "=", "0", ";", "// The plugin must be visible for a correct calculation", "pgwSlideshow", ".", "plugin", ".", "show", "(", ")", ";", "pgwSlideshow", ".", "plugin", ".", "find", "(", "'.ps-list > ul > li'", ")", ".", ...
Set list width
[ "Set", "list", "width" ]
299c13f7ac4a1d5aff4cc9402bc476e040b3be9a
https://github.com/Pagawa/PgwSlideshow/blob/299c13f7ac4a1d5aff4cc9402bc476e040b3be9a/pgwslideshow.js#L116-L128
32,535
Pagawa/PgwSlideshow
pgwslideshow.js
function(element) { var elementContainer = pgwSlideshow.plugin.find('.ps-current > ul'); elementContainer.find('li').not('.elt_' + pgwSlideshow.currentSlide).not('.elt_' + element.id).each(function(){ if (typeof $(this).stop == 'function') { $(this).stop(); ...
javascript
function(element) { var elementContainer = pgwSlideshow.plugin.find('.ps-current > ul'); elementContainer.find('li').not('.elt_' + pgwSlideshow.currentSlide).not('.elt_' + element.id).each(function(){ if (typeof $(this).stop == 'function') { $(this).stop(); ...
[ "function", "(", "element", ")", "{", "var", "elementContainer", "=", "pgwSlideshow", ".", "plugin", ".", "find", "(", "'.ps-current > ul'", ")", ";", "elementContainer", ".", "find", "(", "'li'", ")", ".", "not", "(", "'.elt_'", "+", "pgwSlideshow", ".", ...
Fade an element
[ "Fade", "an", "element" ]
299c13f7ac4a1d5aff4cc9402bc476e040b3be9a
https://github.com/Pagawa/PgwSlideshow/blob/299c13f7ac4a1d5aff4cc9402bc476e040b3be9a/pgwslideshow.js#L385-L446
32,536
Pagawa/PgwSlideshow
pgwslideshow.js
function(element, direction) { var elementContainer = pgwSlideshow.plugin.find('.ps-current > ul'); if (typeof direction == 'undefined') { direction = 'left'; } if (pgwSlideshow.currentSlide == 0) { elementContainer.find('.elt_1').css({ ...
javascript
function(element, direction) { var elementContainer = pgwSlideshow.plugin.find('.ps-current > ul'); if (typeof direction == 'undefined') { direction = 'left'; } if (pgwSlideshow.currentSlide == 0) { elementContainer.find('.elt_1').css({ ...
[ "function", "(", "element", ",", "direction", ")", "{", "var", "elementContainer", "=", "pgwSlideshow", ".", "plugin", ".", "find", "(", "'.ps-current > ul'", ")", ";", "if", "(", "typeof", "direction", "==", "'undefined'", ")", "{", "direction", "=", "'left...
Slide an element
[ "Slide", "an", "element" ]
299c13f7ac4a1d5aff4cc9402bc476e040b3be9a
https://github.com/Pagawa/PgwSlideshow/blob/299c13f7ac4a1d5aff4cc9402bc476e040b3be9a/pgwslideshow.js#L449-L527
32,537
Pagawa/PgwSlideshow
pgwslideshow.js
function(elementId, apiController, direction) { if (elementId == pgwSlideshow.currentSlide) { return false; } var element = pgwSlideshow.data[elementId - 1]; if (typeof element == 'undefined') { throw new Error('pgwSlideshow - The elemen...
javascript
function(elementId, apiController, direction) { if (elementId == pgwSlideshow.currentSlide) { return false; } var element = pgwSlideshow.data[elementId - 1]; if (typeof element == 'undefined') { throw new Error('pgwSlideshow - The elemen...
[ "function", "(", "elementId", ",", "apiController", ",", "direction", ")", "{", "if", "(", "elementId", "==", "pgwSlideshow", ".", "currentSlide", ")", "{", "return", "false", ";", "}", "var", "element", "=", "pgwSlideshow", ".", "data", "[", "elementId", ...
Display current element
[ "Display", "current", "element" ]
299c13f7ac4a1d5aff4cc9402bc476e040b3be9a
https://github.com/Pagawa/PgwSlideshow/blob/299c13f7ac4a1d5aff4cc9402bc476e040b3be9a/pgwslideshow.js#L530-L571
32,538
Pagawa/PgwSlideshow
pgwslideshow.js
function() { var containerWidth = pgwSlideshow.plugin.find('.ps-list').width(); var listObject = pgwSlideshow.plugin.find('.ps-list > ul'); var listWidth = listObject.width(); var marginLeft = parseInt(listObject.css('margin-left')); var marginRight = parse...
javascript
function() { var containerWidth = pgwSlideshow.plugin.find('.ps-list').width(); var listObject = pgwSlideshow.plugin.find('.ps-list > ul'); var listWidth = listObject.width(); var marginLeft = parseInt(listObject.css('margin-left')); var marginRight = parse...
[ "function", "(", ")", "{", "var", "containerWidth", "=", "pgwSlideshow", ".", "plugin", ".", "find", "(", "'.ps-list'", ")", ".", "width", "(", ")", ";", "var", "listObject", "=", "pgwSlideshow", ".", "plugin", ".", "find", "(", "'.ps-list > ul'", ")", "...
Check the visibility of the selected item
[ "Check", "the", "visibility", "of", "the", "selected", "item" ]
299c13f7ac4a1d5aff4cc9402bc476e040b3be9a
https://github.com/Pagawa/PgwSlideshow/blob/299c13f7ac4a1d5aff4cc9402bc476e040b3be9a/pgwslideshow.js#L718-L743
32,539
nisaacson/pdf-text-extract
index.js
splitPagesPromise
function splitPagesPromise (content) { var pages = content.split(/\f/) if (!pages) { var ex = { message: 'pdf-text-extract failed', error: 'no text returned from the pdftotext command', filePath: this.filePath, stack: new Error().stack } throw ex } // so...
javascript
function splitPagesPromise (content) { var pages = content.split(/\f/) if (!pages) { var ex = { message: 'pdf-text-extract failed', error: 'no text returned from the pdftotext command', filePath: this.filePath, stack: new Error().stack } throw ex } // so...
[ "function", "splitPagesPromise", "(", "content", ")", "{", "var", "pages", "=", "content", ".", "split", "(", "/", "\\f", "/", ")", "if", "(", "!", "pages", ")", "{", "var", "ex", "=", "{", "message", ":", "'pdf-text-extract failed'", ",", "error", ":"...
Duplicated from function splitPages of pdfTextExtract
[ "Duplicated", "from", "function", "splitPages", "of", "pdfTextExtract" ]
d21ead42859aae859d3f20b79ebd5c801b21837d
https://github.com/nisaacson/pdf-text-extract/blob/d21ead42859aae859d3f20b79ebd5c801b21837d/index.js#L160-L177
32,540
nisaacson/pdf-text-extract
index.js
streamResultsPromise
function streamResultsPromise (command, args, options, cb) { var output = '' var stderr = '' var child = spawn(command, args, options) child.stdout.setEncoding('utf8') child.stderr.setEncoding('utf8') child.stdout.on('data', stdoutHandler) child.stderr.on('data', stderrHandler) child.on(...
javascript
function streamResultsPromise (command, args, options, cb) { var output = '' var stderr = '' var child = spawn(command, args, options) child.stdout.setEncoding('utf8') child.stderr.setEncoding('utf8') child.stdout.on('data', stdoutHandler) child.stderr.on('data', stderrHandler) child.on(...
[ "function", "streamResultsPromise", "(", "command", ",", "args", ",", "options", ",", "cb", ")", "{", "var", "output", "=", "''", "var", "stderr", "=", "''", "var", "child", "=", "spawn", "(", "command", ",", "args", ",", "options", ")", "child", ".", ...
Duplicated from function splitPages of streamResults
[ "Duplicated", "from", "function", "splitPages", "of", "streamResults" ]
d21ead42859aae859d3f20b79ebd5c801b21837d
https://github.com/nisaacson/pdf-text-extract/blob/d21ead42859aae859d3f20b79ebd5c801b21837d/index.js#L182-L207
32,541
brikteknologier/seraph-model
lib/write.js
function (graph, opts, params) { var self = this; var savedNodes = graph.allNodes.filter(function(node) { return node.props[self.db.options.id] != null && !(node.model.uniqueness && node.model.uniqueness.returnOld); }); if (!savedNodes.length) return ''; var statements = savedNode...
javascript
function (graph, opts, params) { var self = this; var savedNodes = graph.allNodes.filter(function(node) { return node.props[self.db.options.id] != null && !(node.model.uniqueness && node.model.uniqueness.returnOld); }); if (!savedNodes.length) return ''; var statements = savedNode...
[ "function", "(", "graph", ",", "opts", ",", "params", ")", "{", "var", "self", "=", "this", ";", "var", "savedNodes", "=", "graph", ".", "allNodes", ".", "filter", "(", "function", "(", "node", ")", "{", "return", "node", ".", "props", "[", "self", ...
get the START statement of a write query this will start with all the pre-existing nodes
[ "get", "the", "START", "statement", "of", "a", "write", "query", "this", "will", "start", "with", "all", "the", "pre", "-", "existing", "nodes" ]
d53da892f47155de883106e716fdc6767833306a
https://github.com/brikteknologier/seraph-model/blob/d53da892f47155de883106e716fdc6767833306a/lib/write.js#L80-L95
32,542
brikteknologier/seraph-model
lib/write.js
function (graph, opts, params) { var self = this; var newNodes = graph.allNodes.filter(function(node) { return node.props[self.db.options.id] == null && !(node.model.uniqueness && node.model.uniqueness.returnOld); }); if (!newNodes.length) return ''; var statements = newNodes.map(f...
javascript
function (graph, opts, params) { var self = this; var newNodes = graph.allNodes.filter(function(node) { return node.props[self.db.options.id] == null && !(node.model.uniqueness && node.model.uniqueness.returnOld); }); if (!newNodes.length) return ''; var statements = newNodes.map(f...
[ "function", "(", "graph", ",", "opts", ",", "params", ")", "{", "var", "self", "=", "this", ";", "var", "newNodes", "=", "graph", ".", "allNodes", ".", "filter", "(", "function", "(", "node", ")", "{", "return", "node", ".", "props", "[", "self", "...
get the CREATE statement of a write query this will create non-existant nodes
[ "get", "the", "CREATE", "statement", "of", "a", "write", "query", "this", "will", "create", "non", "-", "existant", "nodes" ]
d53da892f47155de883106e716fdc6767833306a
https://github.com/brikteknologier/seraph-model/blob/d53da892f47155de883106e716fdc6767833306a/lib/write.js#L139-L154
32,543
brikteknologier/seraph-model
lib/write.js
function (graph, opts, params) { var self = this; var updatedNodes = graph.allNodes; if (opts.restrictToComp) { updatedNodes = graph.allNodes.filter(function(node) { return node.comp && node.comp.name == opts.restrictToComp; }); } function assign(statements, varName, hash) { ...
javascript
function (graph, opts, params) { var self = this; var updatedNodes = graph.allNodes; if (opts.restrictToComp) { updatedNodes = graph.allNodes.filter(function(node) { return node.comp && node.comp.name == opts.restrictToComp; }); } function assign(statements, varName, hash) { ...
[ "function", "(", "graph", ",", "opts", ",", "params", ")", "{", "var", "self", "=", "this", ";", "var", "updatedNodes", "=", "graph", ".", "allNodes", ";", "if", "(", "opts", ".", "restrictToComp", ")", "{", "updatedNodes", "=", "graph", ".", "allNodes...
get the SET statement of a write query this will set the properties on all nodes
[ "get", "the", "SET", "statement", "of", "a", "write", "query", "this", "will", "set", "the", "properties", "on", "all", "nodes" ]
d53da892f47155de883106e716fdc6767833306a
https://github.com/brikteknologier/seraph-model/blob/d53da892f47155de883106e716fdc6767833306a/lib/write.js#L157-L194
32,544
brikteknologier/seraph-model
lib/write.js
function (graph, opts, params) { if (graph.children.length == 0) return ''; function getRels(node) { var rels = []; node.children.forEach(function(childNode) { rels.push('(' + node.name + ')-[__rel_' + childNode.name + ':' + childNode.comp.rel + ']->(' + childNode.name + ')'); rels....
javascript
function (graph, opts, params) { if (graph.children.length == 0) return ''; function getRels(node) { var rels = []; node.children.forEach(function(childNode) { rels.push('(' + node.name + ')-[__rel_' + childNode.name + ':' + childNode.comp.rel + ']->(' + childNode.name + ')'); rels....
[ "function", "(", "graph", ",", "opts", ",", "params", ")", "{", "if", "(", "graph", ".", "children", ".", "length", "==", "0", ")", "return", "''", ";", "function", "getRels", "(", "node", ")", "{", "var", "rels", "=", "[", "]", ";", "node", ".",...
get the CREATE UNIQUE statement of a write query this will create the required relationships
[ "get", "the", "CREATE", "UNIQUE", "statement", "of", "a", "write", "query", "this", "will", "create", "the", "required", "relationships" ]
d53da892f47155de883106e716fdc6767833306a
https://github.com/brikteknologier/seraph-model/blob/d53da892f47155de883106e716fdc6767833306a/lib/write.js#L197-L210
32,545
brikteknologier/seraph-model
lib/write.js
beforeCommit
function beforeCommit(object, callback) { var self = this; async.waterfall([ this.triggerTransformEvent.bind(this, 'prepare', object), this.triggerProgressionEvent.bind(this, 'validate'), this.triggerEvent.bind(this, 'beforeSave') ], function(err, object) { if (err) return callback(err); // r...
javascript
function beforeCommit(object, callback) { var self = this; async.waterfall([ this.triggerTransformEvent.bind(this, 'prepare', object), this.triggerProgressionEvent.bind(this, 'validate'), this.triggerEvent.bind(this, 'beforeSave') ], function(err, object) { if (err) return callback(err); // r...
[ "function", "beforeCommit", "(", "object", ",", "callback", ")", "{", "var", "self", "=", "this", ";", "async", ".", "waterfall", "(", "[", "this", ".", "triggerTransformEvent", ".", "bind", "(", "this", ",", "'prepare'", ",", "object", ")", ",", "this",...
prepare, validate, beforeSave
[ "prepare", "validate", "beforeSave" ]
d53da892f47155de883106e716fdc6767833306a
https://github.com/brikteknologier/seraph-model/blob/d53da892f47155de883106e716fdc6767833306a/lib/write.js#L241-L256
32,546
rfink/sequelize-redis-cache
lib/index.js
Cacher
function Cacher(seq, red) { if (!(this instanceof Cacher)) { return new Cacher(seq, red); } this.method = 'find'; this.options = {}; this.seconds = 0; this.cacheHit = false; this.cachePrefix = 'cacher'; this.sequelize = seq; this.redis = red; }
javascript
function Cacher(seq, red) { if (!(this instanceof Cacher)) { return new Cacher(seq, red); } this.method = 'find'; this.options = {}; this.seconds = 0; this.cacheHit = false; this.cachePrefix = 'cacher'; this.sequelize = seq; this.redis = red; }
[ "function", "Cacher", "(", "seq", ",", "red", ")", "{", "if", "(", "!", "(", "this", "instanceof", "Cacher", ")", ")", "{", "return", "new", "Cacher", "(", "seq", ",", "red", ")", ";", "}", "this", ".", "method", "=", "'find'", ";", "this", ".", ...
Constructor for cacher
[ "Constructor", "for", "cacher" ]
9b1af1b6f2f235b0567e41c1c2eccb553e85ce8d
https://github.com/rfink/sequelize-redis-cache/blob/9b1af1b6f2f235b0567e41c1c2eccb553e85ce8d/lib/index.js#L12-L23
32,547
rfink/sequelize-redis-cache
lib/index.js
jsonReplacer
function jsonReplacer(key, value) { if (value && (value.DAO || value.sequelize)) { return value.name || ''; } return value; }
javascript
function jsonReplacer(key, value) { if (value && (value.DAO || value.sequelize)) { return value.name || ''; } return value; }
[ "function", "jsonReplacer", "(", "key", ",", "value", ")", "{", "if", "(", "value", "&&", "(", "value", ".", "DAO", "||", "value", ".", "sequelize", ")", ")", "{", "return", "value", ".", "name", "||", "''", ";", "}", "return", "value", ";", "}" ]
Duct tape to check if this is a sequelize DAOFactory
[ "Duct", "tape", "to", "check", "if", "this", "is", "a", "sequelize", "DAOFactory" ]
9b1af1b6f2f235b0567e41c1c2eccb553e85ce8d
https://github.com/rfink/sequelize-redis-cache/blob/9b1af1b6f2f235b0567e41c1c2eccb553e85ce8d/lib/index.js#L251-L256
32,548
rfink/sequelize-redis-cache
lib/index.js
addMethod
function addMethod(key) { Cacher.prototype[key] = function() { if (!this.md) { return Promise.reject(new Error('Model not set')); } this.method = key; return this.run.apply(this, arguments); }; }
javascript
function addMethod(key) { Cacher.prototype[key] = function() { if (!this.md) { return Promise.reject(new Error('Model not set')); } this.method = key; return this.run.apply(this, arguments); }; }
[ "function", "addMethod", "(", "key", ")", "{", "Cacher", ".", "prototype", "[", "key", "]", "=", "function", "(", ")", "{", "if", "(", "!", "this", ".", "md", ")", "{", "return", "Promise", ".", "reject", "(", "new", "Error", "(", "'Model not set'", ...
Add a retrieval method
[ "Add", "a", "retrieval", "method" ]
9b1af1b6f2f235b0567e41c1c2eccb553e85ce8d
https://github.com/rfink/sequelize-redis-cache/blob/9b1af1b6f2f235b0567e41c1c2eccb553e85ce8d/lib/index.js#L261-L269
32,549
B-3PO/angular-material-event-calendar
dist/angular-material-event-calendar.js
getPlace
function getPlace() { var place = 0; while (takenPlaces.indexOf(place) !== -1) { place++; } takenPlaces.push(place); return place; }
javascript
function getPlace() { var place = 0; while (takenPlaces.indexOf(place) !== -1) { place++; } takenPlaces.push(place); return place; }
[ "function", "getPlace", "(", ")", "{", "var", "place", "=", "0", ";", "while", "(", "takenPlaces", ".", "indexOf", "(", "place", ")", "!==", "-", "1", ")", "{", "place", "++", ";", "}", "takenPlaces", ".", "push", "(", "place", ")", ";", "return", ...
find lowest place not taken
[ "find", "lowest", "place", "not", "taken" ]
dca1bac684105a612a0e1a6020d4ac72c77b6552
https://github.com/B-3PO/angular-material-event-calendar/blob/dca1bac684105a612a0e1a6020d4ac72c77b6552/dist/angular-material-event-calendar.js#L636-L643
32,550
B-3PO/angular-material-event-calendar
dist/angular-material-event-calendar.js
hideCreateLinkOnEventItemHover
function hideCreateLinkOnEventItemHover() { element.on('mouseenter', function () { element.on('mousemove', checkForEventItemRAF); }); element.on('mouseleave', function () { element.off('mousemove', checkForEventItemRAF); element.removeClass('md-event-hover'); }); ...
javascript
function hideCreateLinkOnEventItemHover() { element.on('mouseenter', function () { element.on('mousemove', checkForEventItemRAF); }); element.on('mouseleave', function () { element.off('mousemove', checkForEventItemRAF); element.removeClass('md-event-hover'); }); ...
[ "function", "hideCreateLinkOnEventItemHover", "(", ")", "{", "element", ".", "on", "(", "'mouseenter'", ",", "function", "(", ")", "{", "element", ".", "on", "(", "'mousemove'", ",", "checkForEventItemRAF", ")", ";", "}", ")", ";", "element", ".", "on", "(...
When user mouses over an existing event, add a class of md-event-hover to the month element, so that the create link is hidden from view.
[ "When", "user", "mouses", "over", "an", "existing", "event", "add", "a", "class", "of", "md", "-", "event", "-", "hover", "to", "the", "month", "element", "so", "that", "the", "create", "link", "is", "hidden", "from", "view", "." ]
dca1bac684105a612a0e1a6020d4ac72c77b6552
https://github.com/B-3PO/angular-material-event-calendar/blob/dca1bac684105a612a0e1a6020d4ac72c77b6552/dist/angular-material-event-calendar.js#L765-L786
32,551
pulviscriptor/agario-client
account.js
Account
function Account(name) { //TODO doc vars this.name = name; //debug name this.token = null; //token after requestFBToken() this.token_expire = 0; //timestamp after requestFBToken() this.token_provider = 1; //provider ID after requester this.c_user = null; //coo...
javascript
function Account(name) { //TODO doc vars this.name = name; //debug name this.token = null; //token after requestFBToken() this.token_expire = 0; //timestamp after requestFBToken() this.token_provider = 1; //provider ID after requester this.c_user = null; //coo...
[ "function", "Account", "(", "name", ")", "{", "//TODO doc vars\r", "this", ".", "name", "=", "name", ";", "//debug name\r", "this", ".", "token", "=", "null", ";", "//token after requestFBToken()\r", "this", ".", "token_expire", "=", "0", ";", "//timestamp after...
hardcoded in client
[ "hardcoded", "in", "client" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/account.js#L7-L20
32,552
pulviscriptor/agario-client
agario-client.js
function(client, packet) { var x = packet.readFloat32LE(); var y = packet.readFloat32LE(); var zoom = packet.readFloat32LE(); if(client.debug >= 4) client.log('spectate FOV update: x=' + x + ' y=' + y + ' zoom=' + zoom); client....
javascript
function(client, packet) { var x = packet.readFloat32LE(); var y = packet.readFloat32LE(); var zoom = packet.readFloat32LE(); if(client.debug >= 4) client.log('spectate FOV update: x=' + x + ' y=' + y + ' zoom=' + zoom); client....
[ "function", "(", "client", ",", "packet", ")", "{", "var", "x", "=", "packet", ".", "readFloat32LE", "(", ")", ";", "var", "y", "=", "packet", ".", "readFloat32LE", "(", ")", ";", "var", "zoom", "=", "packet", ".", "readFloat32LE", "(", ")", ";", "...
update spectating coordinates in "spectate" mode
[ "update", "spectating", "coordinates", "in", "spectate", "mode" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L328-L337
32,553
pulviscriptor/agario-client
agario-client.js
function (client, packet) { var line_x = packet.readSInt16LE(); var line_y = packet.readSInt16LE(); if (client.debug >= 4) client.log('debug line drawn from x=' + line_x + ' y=' + line_y); client.emitEvent('debugLine', line_x, line_y); }
javascript
function (client, packet) { var line_x = packet.readSInt16LE(); var line_y = packet.readSInt16LE(); if (client.debug >= 4) client.log('debug line drawn from x=' + line_x + ' y=' + line_y); client.emitEvent('debugLine', line_x, line_y); }
[ "function", "(", "client", ",", "packet", ")", "{", "var", "line_x", "=", "packet", ".", "readSInt16LE", "(", ")", ";", "var", "line_y", "=", "packet", ".", "readSInt16LE", "(", ")", ";", "if", "(", "client", ".", "debug", ">=", "4", ")", "client", ...
debug line drawn from the player to the specified point
[ "debug", "line", "drawn", "from", "the", "player", "to", "the", "specified", "point" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L349-L356
32,554
pulviscriptor/agario-client
agario-client.js
function(client, packet) { var highlights = []; var names = []; var count = packet.readUInt32LE(); for(var i=0;i<count;i++) { var highlight = packet.readUInt32LE(); var name = ''; while(1) { v...
javascript
function(client, packet) { var highlights = []; var names = []; var count = packet.readUInt32LE(); for(var i=0;i<count;i++) { var highlight = packet.readUInt32LE(); var name = ''; while(1) { v...
[ "function", "(", "client", ",", "packet", ")", "{", "var", "highlights", "=", "[", "]", ";", "var", "names", "=", "[", "]", ";", "var", "count", "=", "packet", ".", "readUInt32LE", "(", ")", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<",...
leaderboard update in FFA mode
[ "leaderboard", "update", "in", "FFA", "mode" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L381-L414
32,555
pulviscriptor/agario-client
agario-client.js
function(client, packet) { var teams_count = packet.readUInt32LE(); var teams_scores = []; for (var i=0;i<teams_count;++i) { teams_scores.push(packet.readFloat32LE()); } if(JSON.stringify(client.teams_scores) == JSON.stringify(teams_...
javascript
function(client, packet) { var teams_count = packet.readUInt32LE(); var teams_scores = []; for (var i=0;i<teams_count;++i) { teams_scores.push(packet.readFloat32LE()); } if(JSON.stringify(client.teams_scores) == JSON.stringify(teams_...
[ "function", "(", "client", ",", "packet", ")", "{", "var", "teams_count", "=", "packet", ".", "readUInt32LE", "(", ")", ";", "var", "teams_scores", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "teams_count", ";", "++", "i", ...
teams scored update in teams mode
[ "teams", "scored", "update", "in", "teams", "mode" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L417-L434
32,556
pulviscriptor/agario-client
agario-client.js
function(client, packet) { var min_x = packet.readFloat64LE(); var min_y = packet.readFloat64LE(); var max_x = packet.readFloat64LE(); var max_y = packet.readFloat64LE(); if(client.debug >= 2) client.log('map size: ' + [min_x, min_y, ma...
javascript
function(client, packet) { var min_x = packet.readFloat64LE(); var min_y = packet.readFloat64LE(); var max_x = packet.readFloat64LE(); var max_y = packet.readFloat64LE(); if(client.debug >= 2) client.log('map size: ' + [min_x, min_y, ma...
[ "function", "(", "client", ",", "packet", ")", "{", "var", "min_x", "=", "packet", ".", "readFloat64LE", "(", ")", ";", "var", "min_y", "=", "packet", ".", "readFloat64LE", "(", ")", ";", "var", "max_x", "=", "packet", ".", "readFloat64LE", "(", ")", ...
map size load
[ "map", "size", "load" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L437-L447
32,557
pulviscriptor/agario-client
agario-client.js
function(name) { if(this.debug >= 3) this.log('spawn() called, name=' + name); if(!this.ws || this.ws.readyState !== WebSocket.OPEN) { if(this.debug >= 1) this.log('[warning] spawn() was called when connection was not established, packet will be dropped'); ...
javascript
function(name) { if(this.debug >= 3) this.log('spawn() called, name=' + name); if(!this.ws || this.ws.readyState !== WebSocket.OPEN) { if(this.debug >= 1) this.log('[warning] spawn() was called when connection was not established, packet will be dropped'); ...
[ "function", "(", "name", ")", "{", "if", "(", "this", ".", "debug", ">=", "3", ")", "this", ".", "log", "(", "'spawn() called, name='", "+", "name", ")", ";", "if", "(", "!", "this", ".", "ws", "||", "this", ".", "ws", ".", "readyState", "!==", "...
functions that you can call to control your balls spawn ball
[ "functions", "that", "you", "can", "call", "to", "control", "your", "balls", "spawn", "ball" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L538-L581
32,558
pulviscriptor/agario-client
agario-client.js
function() { if(!this.ws || this.ws.readyState !== WebSocket.OPEN) { if(this.debug >= 1) this.log('[warning] spectate() was called when connection was not established, packet will be dropped'); return false; } var buf = new Buffer([1]); th...
javascript
function() { if(!this.ws || this.ws.readyState !== WebSocket.OPEN) { if(this.debug >= 1) this.log('[warning] spectate() was called when connection was not established, packet will be dropped'); return false; } var buf = new Buffer([1]); th...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "ws", "||", "this", ".", "ws", ".", "readyState", "!==", "WebSocket", ".", "OPEN", ")", "{", "if", "(", "this", ".", "debug", ">=", "1", ")", "this", ".", "log", "(", "'[warning] spectate() wa...
activate spectate mode
[ "activate", "spectate", "mode" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/agario-client.js#L584-L595
32,559
pulviscriptor/agario-client
packet.js
Packet
function Packet(e) { if(e instanceof Buffer) { this.data = e; this.length = this.data.length; }else if((typeof Buffer) != 'undefined' && e.data instanceof Buffer) { this.data = e.data; this.length = this.data.length; }else{ this.data = new DataView(e.dat...
javascript
function Packet(e) { if(e instanceof Buffer) { this.data = e; this.length = this.data.length; }else if((typeof Buffer) != 'undefined' && e.data instanceof Buffer) { this.data = e.data; this.length = this.data.length; }else{ this.data = new DataView(e.dat...
[ "function", "Packet", "(", "e", ")", "{", "if", "(", "e", "instanceof", "Buffer", ")", "{", "this", ".", "data", "=", "e", ";", "this", ".", "length", "=", "this", ".", "data", ".", "length", ";", "}", "else", "if", "(", "(", "typeof", "Buffer", ...
this file is for internal use with packets
[ "this", "file", "is", "for", "internal", "use", "with", "packets" ]
34949a146977ca680294f84fa9a1c7254d097b19
https://github.com/pulviscriptor/agario-client/blob/34949a146977ca680294f84fa9a1c7254d097b19/packet.js#L3-L16
32,560
awendland/angular-json-tree
dist/angular-json-tree.js
forKeys
function forKeys(obj, f) { for (var key in obj) { if (obj.hasOwnProperty(key) && typeof obj[key] !== 'function') { if (f(key, obj[key])) { break; } } } }
javascript
function forKeys(obj, f) { for (var key in obj) { if (obj.hasOwnProperty(key) && typeof obj[key] !== 'function') { if (f(key, obj[key])) { break; } } } }
[ "function", "forKeys", "(", "obj", ",", "f", ")", "{", "for", "(", "var", "key", "in", "obj", ")", "{", "if", "(", "obj", ".", "hasOwnProperty", "(", "key", ")", "&&", "typeof", "obj", "[", "key", "]", "!==", "'function'", ")", "{", "if", "(", ...
Iterate over an objects keyset
[ "Iterate", "over", "an", "objects", "keyset" ]
13383021005554a3770db67fe8cd733a4ed097e1
https://github.com/awendland/angular-json-tree/blob/13383021005554a3770db67fe8cd733a4ed097e1/dist/angular-json-tree.js#L65-L73
32,561
ev3dev/ev3dev-lang
autogen/autogen-core.js
processFile
function processFile(autogenContext, commentInfo, callback) { fs.readFile(path.resolve(__dirname, "..", autogenContext.filePath), function (readError, sourceFileContentsBuffer) { if (readError) { callback(autogenContext.filePath, readError); return; } processNextAuto...
javascript
function processFile(autogenContext, commentInfo, callback) { fs.readFile(path.resolve(__dirname, "..", autogenContext.filePath), function (readError, sourceFileContentsBuffer) { if (readError) { callback(autogenContext.filePath, readError); return; } processNextAuto...
[ "function", "processFile", "(", "autogenContext", ",", "commentInfo", ",", "callback", ")", "{", "fs", ".", "readFile", "(", "path", ".", "resolve", "(", "__dirname", ",", "\"..\"", ",", "autogenContext", ".", "filePath", ")", ",", "function", "(", "readErro...
Processes the contents of the specified file, and writes the result back to the same location
[ "Processes", "the", "contents", "of", "the", "specified", "file", "and", "writes", "the", "result", "back", "to", "the", "same", "location" ]
0169750bf9aeefac423c38929287b4ad9ef7abd4
https://github.com/ev3dev/ev3dev-lang/blob/0169750bf9aeefac423c38929287b4ad9ef7abd4/autogen/autogen-core.js#L16-L33
32,562
ev3dev/ev3dev-lang
autogen/autogen-core.js
processNextAutogenBlock
function processNextAutogenBlock(autogenContext, allData, commentInfo, pos, callback) { //Update the position of the next block. If there isn't one, call the callback and break the recursion. pos = utils.regexIndexOf(allData, commentInfo.start, pos); if (pos == -1) { callback(allData); ret...
javascript
function processNextAutogenBlock(autogenContext, allData, commentInfo, pos, callback) { //Update the position of the next block. If there isn't one, call the callback and break the recursion. pos = utils.regexIndexOf(allData, commentInfo.start, pos); if (pos == -1) { callback(allData); ret...
[ "function", "processNextAutogenBlock", "(", "autogenContext", ",", "allData", ",", "commentInfo", ",", "pos", ",", "callback", ")", "{", "//Update the position of the next block. If there isn't one, call the callback and break the recursion.", "pos", "=", "utils", ".", "regexIn...
Recursively updates the autogen blocks
[ "Recursively", "updates", "the", "autogen", "blocks" ]
0169750bf9aeefac423c38929287b4ad9ef7abd4
https://github.com/ev3dev/ev3dev-lang/blob/0169750bf9aeefac423c38929287b4ad9ef7abd4/autogen/autogen-core.js#L36-L109
32,563
ev3dev/ev3dev-lang
autogen/config.js
function (input) { function camelCaseSingle(input) { return String(input).toLowerCase().replace(/[-|\s](.)/g, function (match, group1) { return group1.toUpperCase(); }); } if(typeof input == 'string') return camelCaseSingle(input); else ...
javascript
function (input) { function camelCaseSingle(input) { return String(input).toLowerCase().replace(/[-|\s](.)/g, function (match, group1) { return group1.toUpperCase(); }); } if(typeof input == 'string') return camelCaseSingle(input); else ...
[ "function", "(", "input", ")", "{", "function", "camelCaseSingle", "(", "input", ")", "{", "return", "String", "(", "input", ")", ".", "toLowerCase", "(", ")", ".", "replace", "(", "/", "[-|\\s](.)", "/", "g", ",", "function", "(", "match", ",", "group...
camel-cases the input string. If the parameter is an array, applies to all items.
[ "camel", "-", "cases", "the", "input", "string", ".", "If", "the", "parameter", "is", "an", "array", "applies", "to", "all", "items", "." ]
0169750bf9aeefac423c38929287b4ad9ef7abd4
https://github.com/ev3dev/ev3dev-lang/blob/0169750bf9aeefac423c38929287b4ad9ef7abd4/autogen/config.js#L22-L33
32,564
ev3dev/ev3dev-lang
autogen/config.js
function (object, property) { return utils.getProp(object, Array.prototype.slice.call(arguments, 1).join(".")); }
javascript
function (object, property) { return utils.getProp(object, Array.prototype.slice.call(arguments, 1).join(".")); }
[ "function", "(", "object", ",", "property", ")", "{", "return", "utils", ".", "getProp", "(", "object", ",", "Array", ".", "prototype", ".", "slice", ".", "call", "(", "arguments", ",", "1", ")", ".", "join", "(", "\".\"", ")", ")", ";", "}" ]
gets a property from an object
[ "gets", "a", "property", "from", "an", "object" ]
0169750bf9aeefac423c38929287b4ad9ef7abd4
https://github.com/ev3dev/ev3dev-lang/blob/0169750bf9aeefac423c38929287b4ad9ef7abd4/autogen/config.js#L47-L49
32,565
ibm-functions/composer
conductor.js
synthesize
function synthesize ({ name, composition, ast, version: composer, annotations = [] }) { const code = `// generated by composer v${composer} and conductor v${version}\n\nconst composition = ${JSON.stringify(composition, null, 4)}\n\n// do not edit below this point\n\n` + minify(`const main=(${main})(composition)`,...
javascript
function synthesize ({ name, composition, ast, version: composer, annotations = [] }) { const code = `// generated by composer v${composer} and conductor v${version}\n\nconst composition = ${JSON.stringify(composition, null, 4)}\n\n// do not edit below this point\n\n` + minify(`const main=(${main})(composition)`,...
[ "function", "synthesize", "(", "{", "name", ",", "composition", ",", "ast", ",", "version", ":", "composer", ",", "annotations", "=", "[", "]", "}", ")", "{", "const", "code", "=", "`", "${", "composer", "}", "${", "version", "}", "\\n", "\\n", "${",...
synthesize conductor action code from composition
[ "synthesize", "conductor", "action", "code", "from", "composition" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/conductor.js#L32-L37
32,566
ibm-functions/composer
conductor.js
inspect
function inspect (p) { if (!isObject(p.params)) p.params = { value: p.params } if (p.params.error !== undefined) { p.params = { error: p.params.error } // discard all fields but the error field p.s.state = -1 // abort unless there is a handler in the stack while (p.s.stack.length > 0 && !p.s.s...
javascript
function inspect (p) { if (!isObject(p.params)) p.params = { value: p.params } if (p.params.error !== undefined) { p.params = { error: p.params.error } // discard all fields but the error field p.s.state = -1 // abort unless there is a handler in the stack while (p.s.stack.length > 0 && !p.s.s...
[ "function", "inspect", "(", "p", ")", "{", "if", "(", "!", "isObject", "(", "p", ".", "params", ")", ")", "p", ".", "params", "=", "{", "value", ":", "p", ".", "params", "}", "if", "(", "p", ".", "params", ".", "error", "!==", "undefined", ")",...
wrap params if not a dictionary, branch to error handler if error
[ "wrap", "params", "if", "not", "a", "dictionary", "branch", "to", "error", "handler", "if", "error" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/conductor.js#L234-L243
32,567
ibm-functions/composer
conductor.js
run
function run (f, p) { // handle let/mask pairs const view = [] let n = 0 for (let frame of p.s.stack) { if (frame.let === null) { n++ } else if (frame.let !== undefined) { if (n === 0) { view.push(frame) } else { n-- } } } //...
javascript
function run (f, p) { // handle let/mask pairs const view = [] let n = 0 for (let frame of p.s.stack) { if (frame.let === null) { n++ } else if (frame.let !== undefined) { if (n === 0) { view.push(frame) } else { n-- } } } //...
[ "function", "run", "(", "f", ",", "p", ")", "{", "// handle let/mask pairs", "const", "view", "=", "[", "]", "let", "n", "=", "0", "for", "(", "let", "frame", "of", "p", ".", "s", ".", "stack", ")", "{", "if", "(", "frame", ".", "let", "===", "...
run function f on current stack
[ "run", "function", "f", "on", "current", "stack" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/conductor.js#L246-L280
32,568
ibm-functions/composer
conductor.js
set
function set (symbol, value) { const element = view.find(element => element.let !== undefined && element.let[symbol] !== undefined) if (element !== undefined) element.let[symbol] = JSON.parse(JSON.stringify(value)) }
javascript
function set (symbol, value) { const element = view.find(element => element.let !== undefined && element.let[symbol] !== undefined) if (element !== undefined) element.let[symbol] = JSON.parse(JSON.stringify(value)) }
[ "function", "set", "(", "symbol", ",", "value", ")", "{", "const", "element", "=", "view", ".", "find", "(", "element", "=>", "element", ".", "let", "!==", "undefined", "&&", "element", ".", "let", "[", "symbol", "]", "!==", "undefined", ")", "if", "...
update value of topmost matching symbol on stack if any
[ "update", "value", "of", "topmost", "matching", "symbol", "on", "stack", "if", "any" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/conductor.js#L263-L266
32,569
ibm-functions/composer
composer.js
visit
function visit (composition, f) { composition = Object.assign({}, composition) // copy const combinator = composition['.combinator']() if (combinator.components) { composition.components = composition.components.map(f) } for (let arg of combinator.args || []) { if (arg.type === undefined && compositio...
javascript
function visit (composition, f) { composition = Object.assign({}, composition) // copy const combinator = composition['.combinator']() if (combinator.components) { composition.components = composition.components.map(f) } for (let arg of combinator.args || []) { if (arg.type === undefined && compositio...
[ "function", "visit", "(", "composition", ",", "f", ")", "{", "composition", "=", "Object", ".", "assign", "(", "{", "}", ",", "composition", ")", "// copy", "const", "combinator", "=", "composition", "[", "'.combinator'", "]", "(", ")", "if", "(", "combi...
apply f to all fields of type composition
[ "apply", "f", "to", "all", "fields", "of", "type", "composition" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/composer.js#L121-L133
32,570
ibm-functions/composer
composer.js
label
function label (composition) { const label = path => (composition, name, array) => { const p = path + (name !== undefined ? (array === undefined ? `.${name}` : `[${name}]`) : '') composition = visit(composition, label(p)) // copy composition.path = p return composition } return label('')(compositi...
javascript
function label (composition) { const label = path => (composition, name, array) => { const p = path + (name !== undefined ? (array === undefined ? `.${name}` : `[${name}]`) : '') composition = visit(composition, label(p)) // copy composition.path = p return composition } return label('')(compositi...
[ "function", "label", "(", "composition", ")", "{", "const", "label", "=", "path", "=>", "(", "composition", ",", "name", ",", "array", ")", "=>", "{", "const", "p", "=", "path", "+", "(", "name", "!==", "undefined", "?", "(", "array", "===", "undefin...
recursively label combinators with the json path
[ "recursively", "label", "combinators", "with", "the", "json", "path" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/composer.js#L136-L144
32,571
ibm-functions/composer
composer.js
declare
function declare (combinators, prefix) { if (arguments.length > 2) throw new ComposerError('Too many arguments in "declare"') if (!isObject(combinators)) throw new ComposerError('Invalid argument "combinators" in "declare"', combinators) if (prefix !== undefined && typeof prefix !== 'string') throw new ComposerEr...
javascript
function declare (combinators, prefix) { if (arguments.length > 2) throw new ComposerError('Too many arguments in "declare"') if (!isObject(combinators)) throw new ComposerError('Invalid argument "combinators" in "declare"', combinators) if (prefix !== undefined && typeof prefix !== 'string') throw new ComposerEr...
[ "function", "declare", "(", "combinators", ",", "prefix", ")", "{", "if", "(", "arguments", ".", "length", ">", "2", ")", "throw", "new", "ComposerError", "(", "'Too many arguments in \"declare\"'", ")", "if", "(", "!", "isObject", "(", "combinators", ")", "...
derive combinator methods from combinator table check argument count and map argument positions to argument names delegate to Composition constructor for the rest of the validation
[ "derive", "combinator", "methods", "from", "combinator", "table", "check", "argument", "count", "and", "map", "argument", "positions", "to", "argument", "names", "delegate", "to", "Composition", "constructor", "for", "the", "rest", "of", "the", "validation" ]
94fe7415270a6718dddc5f535f38364589a70f4f
https://github.com/ibm-functions/composer/blob/94fe7415270a6718dddc5f535f38364589a70f4f/composer.js#L149-L179
32,572
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(e) { for (var i=0, ii=touches.length; i<ii; ++i) { if (touches[i].pointerId == e.pointerId) { touches.splice(i, 1); break; } } }
javascript
function(e) { for (var i=0, ii=touches.length; i<ii; ++i) { if (touches[i].pointerId == e.pointerId) { touches.splice(i, 1); break; } } }
[ "function", "(", "e", ")", "{", "for", "(", "var", "i", "=", "0", ",", "ii", "=", "touches", ".", "length", ";", "i", "<", "ii", ";", "++", "i", ")", "{", "if", "(", "touches", "[", "i", "]", ".", "pointerId", "==", "e", ".", "pointerId", "...
Need to also listen for end events to keep the _msTouches list accurate
[ "Need", "to", "also", "listen", "for", "end", "events", "to", "keep", "the", "_msTouches", "list", "accurate" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L6032-L6039
32,573
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(points, firstPoint, lastPoint, tolerance){ var maxDistance = 0; var indexFarthest = 0; for (var index = firstPoint, distance; index < lastPoint; index++) { distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[ind...
javascript
function(points, firstPoint, lastPoint, tolerance){ var maxDistance = 0; var indexFarthest = 0; for (var index = firstPoint, distance; index < lastPoint; index++) { distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[ind...
[ "function", "(", "points", ",", "firstPoint", ",", "lastPoint", ",", "tolerance", ")", "{", "var", "maxDistance", "=", "0", ";", "var", "indexFarthest", "=", "0", ";", "for", "(", "var", "index", "=", "firstPoint", ",", "distance", ";", "index", "<", "...
Private function doing the Douglas-Peucker reduction
[ "Private", "function", "doing", "the", "Douglas", "-", "Peucker", "reduction" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L21840-L21858
32,574
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function() { var tileWidth = this.extent.getWidth() / this.map.getResolution(); var tileHeight = this.extent.getHeight() / this.map.getResolution(); this.tileSize = new OpenLayers.Size(tileWidth, tileHeight); }
javascript
function() { var tileWidth = this.extent.getWidth() / this.map.getResolution(); var tileHeight = this.extent.getHeight() / this.map.getResolution(); this.tileSize = new OpenLayers.Size(tileWidth, tileHeight); }
[ "function", "(", ")", "{", "var", "tileWidth", "=", "this", ".", "extent", ".", "getWidth", "(", ")", "/", "this", ".", "map", ".", "getResolution", "(", ")", ";", "var", "tileHeight", "=", "this", ".", "extent", ".", "getHeight", "(", ")", "/", "t...
Set the tile size based on the map size.
[ "Set", "the", "tile", "size", "based", "on", "the", "map", "size", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L34702-L34706
32,575
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(x, y) { OpenLayers.Geometry.Point.prototype.move.apply(this, arguments); this._rotationHandle && this._rotationHandle.geometry.move(x, y); this._handle.geometry.move(x, y); }
javascript
function(x, y) { OpenLayers.Geometry.Point.prototype.move.apply(this, arguments); this._rotationHandle && this._rotationHandle.geometry.move(x, y); this._handle.geometry.move(x, y); }
[ "function", "(", "x", ",", "y", ")", "{", "OpenLayers", ".", "Geometry", ".", "Point", ".", "prototype", ".", "move", ".", "apply", "(", "this", ",", "arguments", ")", ";", "this", ".", "_rotationHandle", "&&", "this", ".", "_rotationHandle", ".", "geo...
Overrides for vertex move, resize and rotate - make sure that handle and rotationHandle geometries are also moved, resized and rotated.
[ "Overrides", "for", "vertex", "move", "resize", "and", "rotate", "-", "make", "sure", "that", "handle", "and", "rotationHandle", "geometries", "are", "also", "moved", "resized", "and", "rotated", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L61723-L61727
32,576
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(x, y){ var oldX = this.x, oldY = this.y; OpenLayers.Geometry.Point.prototype.move.call(this, x, y); if(control._moving) { return; } var evt = control.dragControl.handlers.drag.evt; var constrain = (evt && evt.shiftKey) ? 45...
javascript
function(x, y){ var oldX = this.x, oldY = this.y; OpenLayers.Geometry.Point.prototype.move.call(this, x, y); if(control._moving) { return; } var evt = control.dragControl.handlers.drag.evt; var constrain = (evt && evt.shiftKey) ? 45...
[ "function", "(", "x", ",", "y", ")", "{", "var", "oldX", "=", "this", ".", "x", ",", "oldY", "=", "this", ".", "y", ";", "OpenLayers", ".", "Geometry", ".", "Point", ".", "prototype", ".", "move", ".", "call", "(", "this", ",", "x", ",", "y", ...
Override for rotation handle move - make sure that the box and other handles are updated, and finally transform the feature.
[ "Override", "for", "rotation", "handle", "move", "-", "make", "sure", "that", "the", "box", "and", "other", "handles", "are", "updated", "and", "finally", "transform", "the", "feature", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L61797-L61825
32,577
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(pixel) { if(this.feature === control.feature) { this.feature = control.box; } OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this, arguments); }
javascript
function(pixel) { if(this.feature === control.feature) { this.feature = control.box; } OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this, arguments); }
[ "function", "(", "pixel", ")", "{", "if", "(", "this", ".", "feature", "===", "control", ".", "feature", ")", "{", "this", ".", "feature", "=", "control", ".", "box", ";", "}", "OpenLayers", ".", "Control", ".", "DragFeature", ".", "prototype", ".", ...
avoid moving the feature itself - move the box instead
[ "avoid", "moving", "the", "feature", "itself", "-", "move", "the", "box", "instead" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L61867-L61873
32,578
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(feature, pixel) { if(feature === control.box) { control.transformFeature({center: control.center}); } }
javascript
function(feature, pixel) { if(feature === control.box) { control.transformFeature({center: control.center}); } }
[ "function", "(", "feature", ",", "pixel", ")", "{", "if", "(", "feature", "===", "control", ".", "box", ")", "{", "control", ".", "transformFeature", "(", "{", "center", ":", "control", ".", "center", "}", ")", ";", "}", "}" ]
transform while dragging
[ "transform", "while", "dragging" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L61875-L61879
32,579
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(feature, pixel) { var eligible = !control.geometryTypes || OpenLayers.Util.indexOf(control.geometryTypes, feature.geometry.CLASS_NAME) !== -1; var i = OpenLayers.Util.indexOf(control.handles, feature); i += OpenLayers.U...
javascript
function(feature, pixel) { var eligible = !control.geometryTypes || OpenLayers.Util.indexOf(control.geometryTypes, feature.geometry.CLASS_NAME) !== -1; var i = OpenLayers.Util.indexOf(control.handles, feature); i += OpenLayers.U...
[ "function", "(", "feature", ",", "pixel", ")", "{", "var", "eligible", "=", "!", "control", ".", "geometryTypes", "||", "OpenLayers", ".", "Util", ".", "indexOf", "(", "control", ".", "geometryTypes", ",", "feature", ".", "geometry", ".", "CLASS_NAME", ")"...
set a new feature
[ "set", "a", "new", "feature" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L61881-L61892
32,580
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { var coords = OpenLayers.String.trim(str).split(this.regExes.spaces); return new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(coords[0], coords[1]) ); }
javascript
function(str) { var coords = OpenLayers.String.trim(str).split(this.regExes.spaces); return new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(coords[0], coords[1]) ); }
[ "function", "(", "str", ")", "{", "var", "coords", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str", ")", ".", "split", "(", "this", ".", "regExes", ".", "spaces", ")", ";", "return", "new", "OpenLayers", ".", "Feature", ".", "Vector", "(", ...
Return point feature given a point WKT fragment. @param {String} str A WKT fragment representing the point @returns {OpenLayers.Feature.Vector} A point feature @private
[ "Return", "point", "feature", "given", "a", "point", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L64983-L64988
32,581
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { var point; var points = OpenLayers.String.trim(str).split(','); var components = []; for(var i=0, len=points.length; i<len; ++i) { point = points[i].replace(this.regExes.trimParens, '$1'); components.push(this.parse.point.ap...
javascript
function(str) { var point; var points = OpenLayers.String.trim(str).split(','); var components = []; for(var i=0, len=points.length; i<len; ++i) { point = points[i].replace(this.regExes.trimParens, '$1'); components.push(this.parse.point.ap...
[ "function", "(", "str", ")", "{", "var", "point", ";", "var", "points", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str", ")", ".", "split", "(", "','", ")", ";", "var", "components", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0...
Return a multipoint feature given a multipoint WKT fragment. @param {String} str A WKT fragment representing the multipoint @returns {OpenLayers.Feature.Vector} A multipoint feature @private
[ "Return", "a", "multipoint", "feature", "given", "a", "multipoint", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L64996-L65007
32,582
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { var points = OpenLayers.String.trim(str).split(','); var components = []; for(var i=0, len=points.length; i<len; ++i) { components.push(this.parse.point.apply(this, [points[i]]).geometry); } return new OpenLayers.Feature.Vector(...
javascript
function(str) { var points = OpenLayers.String.trim(str).split(','); var components = []; for(var i=0, len=points.length; i<len; ++i) { components.push(this.parse.point.apply(this, [points[i]]).geometry); } return new OpenLayers.Feature.Vector(...
[ "function", "(", "str", ")", "{", "var", "points", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str", ")", ".", "split", "(", "','", ")", ";", "var", "components", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ",", "len", "=", ...
Return a linestring feature given a linestring WKT fragment. @param {String} str A WKT fragment representing the linestring @returns {OpenLayers.Feature.Vector} A linestring feature @private
[ "Return", "a", "linestring", "feature", "given", "a", "linestring", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L65015-L65024
32,583
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { var line; var lines = OpenLayers.String.trim(str).split(this.regExes.parenComma); var components = []; for(var i=0, len=lines.length; i<len; ++i) { line = lines[i].replace(this.regExes.trimParens, '$1'); components.push(this...
javascript
function(str) { var line; var lines = OpenLayers.String.trim(str).split(this.regExes.parenComma); var components = []; for(var i=0, len=lines.length; i<len; ++i) { line = lines[i].replace(this.regExes.trimParens, '$1'); components.push(this...
[ "function", "(", "str", ")", "{", "var", "line", ";", "var", "lines", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str", ")", ".", "split", "(", "this", ".", "regExes", ".", "parenComma", ")", ";", "var", "components", "=", "[", "]", ";", ...
Return a multilinestring feature given a multilinestring WKT fragment. @param {String} str A WKT fragment representing the multilinestring @returns {OpenLayers.Feature.Vector} A multilinestring feature @private
[ "Return", "a", "multilinestring", "feature", "given", "a", "multilinestring", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L65032-L65043
32,584
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { var ring, linestring, linearring; var rings = OpenLayers.String.trim(str).split(this.regExes.parenComma); var components = []; for(var i=0, len=rings.length; i<len; ++i) { ring = rings[i].replace(this.regExes.trimParens, '$1'); ...
javascript
function(str) { var ring, linestring, linearring; var rings = OpenLayers.String.trim(str).split(this.regExes.parenComma); var components = []; for(var i=0, len=rings.length; i<len; ++i) { ring = rings[i].replace(this.regExes.trimParens, '$1'); ...
[ "function", "(", "str", ")", "{", "var", "ring", ",", "linestring", ",", "linearring", ";", "var", "rings", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str", ")", ".", "split", "(", "this", ".", "regExes", ".", "parenComma", ")", ";", "var",...
Return a polygon feature given a polygon WKT fragment. @param {String} str A WKT fragment representing the polygon @returns {OpenLayers.Feature.Vector} A polygon feature @private
[ "Return", "a", "polygon", "feature", "given", "a", "polygon", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L65051-L65064
32,585
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { var polygon; var polygons = OpenLayers.String.trim(str).split(this.regExes.doubleParenComma); var components = []; for(var i=0, len=polygons.length; i<len; ++i) { polygon = polygons[i].replace(this.regExes.trimParens, '$1'); ...
javascript
function(str) { var polygon; var polygons = OpenLayers.String.trim(str).split(this.regExes.doubleParenComma); var components = []; for(var i=0, len=polygons.length; i<len; ++i) { polygon = polygons[i].replace(this.regExes.trimParens, '$1'); ...
[ "function", "(", "str", ")", "{", "var", "polygon", ";", "var", "polygons", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str", ")", ".", "split", "(", "this", ".", "regExes", ".", "doubleParenComma", ")", ";", "var", "components", "=", "[", "...
Return a multipolygon feature given a multipolygon WKT fragment. @param {String} str A WKT fragment representing the multipolygon @returns {OpenLayers.Feature.Vector} A multipolygon feature @private
[ "Return", "a", "multipolygon", "feature", "given", "a", "multipolygon", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L65072-L65083
32,586
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(str) { // separate components of the collection with | str = str.replace(/,\s*([A-Za-z])/g, '|$1'); var wktArray = OpenLayers.String.trim(str).split('|'); var components = []; for(var i=0, len=wktArray.length; i<len; ++i) { components....
javascript
function(str) { // separate components of the collection with | str = str.replace(/,\s*([A-Za-z])/g, '|$1'); var wktArray = OpenLayers.String.trim(str).split('|'); var components = []; for(var i=0, len=wktArray.length; i<len; ++i) { components....
[ "function", "(", "str", ")", "{", "// separate components of the collection with |", "str", "=", "str", ".", "replace", "(", "/", ",\\s*([A-Za-z])", "/", "g", ",", "'|$1'", ")", ";", "var", "wktArray", "=", "OpenLayers", ".", "String", ".", "trim", "(", "str...
Return an array of features given a geometrycollection WKT fragment. @param {String} str A WKT fragment representing the geometrycollection @returns {Array} An array of OpenLayers.Feature.Vector @private
[ "Return", "an", "array", "of", "features", "given", "a", "geometrycollection", "WKT", "fragment", "." ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L65091-L65100
32,587
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(node, obj) { var name = node.localName || node.nodeName.split(":").pop(); if (!(OpenLayers.Util.isArray(obj[name]))) { obj[name] = []; } var dc_element = {}; var attrs = node.attributes; for(var ...
javascript
function(node, obj) { var name = node.localName || node.nodeName.split(":").pop(); if (!(OpenLayers.Util.isArray(obj[name]))) { obj[name] = []; } var dc_element = {}; var attrs = node.attributes; for(var ...
[ "function", "(", "node", ",", "obj", ")", "{", "var", "name", "=", "node", ".", "localName", "||", "node", ".", "nodeName", ".", "split", "(", "\":\"", ")", ".", "pop", "(", ")", ";", "if", "(", "!", "(", "OpenLayers", ".", "Util", ".", "isArray"...
audience, contributor, coverage, creator, date, description, format, identifier, language, provenance, publisher, relation, rights, rightsHolder, source, subject, title, type, URI
[ "audience", "contributor", "coverage", "creator", "date", "description", "format", "identifier", "language", "provenance", "publisher", "relation", "rights", "rightsHolder", "source", "subject", "title", "type", "URI" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L66096-L66110
32,588
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(node, obj) { var name = node.localName || node.nodeName.split(":").pop(); if (!(OpenLayers.Util.isArray(obj[name]))) { obj[name] = []; } obj[name].push(this.getChildValue(node)); }
javascript
function(node, obj) { var name = node.localName || node.nodeName.split(":").pop(); if (!(OpenLayers.Util.isArray(obj[name]))) { obj[name] = []; } obj[name].push(this.getChildValue(node)); }
[ "function", "(", "node", ",", "obj", ")", "{", "var", "name", "=", "node", ".", "localName", "||", "node", ".", "nodeName", ".", "split", "(", "\":\"", ")", ".", "pop", "(", ")", ";", "if", "(", "!", "(", "OpenLayers", ".", "Util", ".", "isArray"...
abstract, modified, spatial
[ "abstract", "modified", "spatial" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L66114-L66120
32,589
Tamersoul/magic-wand-js
jsfiddle/OpenLayers.debug.js
function(theDiv, options) { var topRico = theDiv.parentNode.childNodes[0]; //theDiv would be theDiv.parentNode.childNodes[1] var bottomRico = theDiv.parentNode.childNodes[2]; theDiv.parentNode.removeChild(topRico); theDiv.parentNode.removeChild(bottomRico); thi...
javascript
function(theDiv, options) { var topRico = theDiv.parentNode.childNodes[0]; //theDiv would be theDiv.parentNode.childNodes[1] var bottomRico = theDiv.parentNode.childNodes[2]; theDiv.parentNode.removeChild(topRico); theDiv.parentNode.removeChild(bottomRico); thi...
[ "function", "(", "theDiv", ",", "options", ")", "{", "var", "topRico", "=", "theDiv", ".", "parentNode", ".", "childNodes", "[", "0", "]", ";", "//theDiv would be theDiv.parentNode.childNodes[1]", "var", "bottomRico", "=", "theDiv", ".", "parentNode", ".", "chil...
this function takes care of redoing the rico cornering you can't just call updateRicoCorners() again and pass it a new options string. you have to first remove the divs that rico puts on top and below the content div. @param {DOM} theDiv - A child of the outer <div> that was supplied to the `round` method. @param {O...
[ "this", "function", "takes", "care", "of", "redoing", "the", "rico", "cornering" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/jsfiddle/OpenLayers.debug.js#L78894-L78904
32,590
Tamersoul/magic-wand-js
js/ol-magic-wand.js
function (image, old) { var data1 = old.data, data2 = image.data, w1 = old.width, w2 = image.width, px1 = old.globalOffset.x, py1 = old.globalOffset.y, px2 = image.globalOffset.x, py2 = image.globalOffset.y, b1 = old...
javascript
function (image, old) { var data1 = old.data, data2 = image.data, w1 = old.width, w2 = image.width, px1 = old.globalOffset.x, py1 = old.globalOffset.y, px2 = image.globalOffset.x, py2 = image.globalOffset.y, b1 = old...
[ "function", "(", "image", ",", "old", ")", "{", "var", "data1", "=", "old", ".", "data", ",", "data2", "=", "image", ".", "data", ",", "w1", "=", "old", ".", "width", ",", "w2", "=", "image", ".", "width", ",", "px1", "=", "old", ".", "globalOf...
return concatenation of image and old masks
[ "return", "concatenation", "of", "image", "and", "old", "masks" ]
39d50ec17bfc060f2d360537a26a9420dd8970b6
https://github.com/Tamersoul/magic-wand-js/blob/39d50ec17bfc060f2d360537a26a9420dd8970b6/js/ol-magic-wand.js#L1474-L1534
32,591
esosedi/regions
src/utils/setupGeometry.js
setupGeometry
function setupGeometry(regionsData, options) { options = options || {}; var regions = regionsData.regions, dataset = [], postFilter = options.postFilter || (regionsData.meta && regionsData.meta.postFilter ? new Function("region", regionsData.meta.postFilter) : 0), scheme = op...
javascript
function setupGeometry(regionsData, options) { options = options || {}; var regions = regionsData.regions, dataset = [], postFilter = options.postFilter || (regionsData.meta && regionsData.meta.postFilter ? new Function("region", regionsData.meta.postFilter) : 0), scheme = op...
[ "function", "setupGeometry", "(", "regionsData", ",", "options", ")", "{", "options", "=", "options", "||", "{", "}", ";", "var", "regions", "=", "regionsData", ".", "regions", ",", "dataset", "=", "[", "]", ",", "postFilter", "=", "options", ".", "postF...
main decode function @param regionsData @param options @returns {Array}
[ "main", "decode", "function" ]
d23acc7c1ee687b6111750b0ea26d1aa565f87a8
https://github.com/esosedi/regions/blob/d23acc7c1ee687b6111750b0ea26d1aa565f87a8/src/utils/setupGeometry.js#L11-L82
32,592
esosedi/regions
src/utils/decoder.js
decodeByteVector
function decodeByteVector(x, N) { var point = 0; for (var i = 0; i < N; ++i) { point |= x.charCodeAt(i) << (i * 8); } return point; }
javascript
function decodeByteVector(x, N) { var point = 0; for (var i = 0; i < N; ++i) { point |= x.charCodeAt(i) << (i * 8); } return point; }
[ "function", "decodeByteVector", "(", "x", ",", "N", ")", "{", "var", "point", "=", "0", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "N", ";", "++", "i", ")", "{", "point", "|=", "x", ".", "charCodeAt", "(", "i", ")", "<<", "(", "i...
target resolution 65k, real 4k coordinateDecode partof Yandex.Maps.API
[ "target", "resolution", "65k", "real", "4k", "coordinateDecode", "partof", "Yandex", ".", "Maps", ".", "API" ]
d23acc7c1ee687b6111750b0ea26d1aa565f87a8
https://github.com/esosedi/regions/blob/d23acc7c1ee687b6111750b0ea26d1aa565f87a8/src/utils/decoder.js#L9-L15
32,593
esosedi/regions
src/utils/region.js
wrapRegion
function wrapRegion(rid, data) { var meta = data.regions[rid], prop = meta.property || {}; return new RegionObject(rid, meta, prop, data); }
javascript
function wrapRegion(rid, data) { var meta = data.regions[rid], prop = meta.property || {}; return new RegionObject(rid, meta, prop, data); }
[ "function", "wrapRegion", "(", "rid", ",", "data", ")", "{", "var", "meta", "=", "data", ".", "regions", "[", "rid", "]", ",", "prop", "=", "meta", ".", "property", "||", "{", "}", ";", "return", "new", "RegionObject", "(", "rid", ",", "meta", ",",...
wraps region for filter functions @param rid @param data @returns {RegionObject}
[ "wraps", "region", "for", "filter", "functions" ]
d23acc7c1ee687b6111750b0ea26d1aa565f87a8
https://github.com/esosedi/regions/blob/d23acc7c1ee687b6111750b0ea26d1aa565f87a8/src/utils/region.js#L90-L94
32,594
esosedi/regions
src/utils/load_native.js
load
function load(path, callback, errorCallback) { try { var xhr = new XMLHttpRequest(); xhr.open("GET", path, true); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { if (xhr.status === 200 || xhr.status === 304) { try { var response = JSON.parse(xhr.respon...
javascript
function load(path, callback, errorCallback) { try { var xhr = new XMLHttpRequest(); xhr.open("GET", path, true); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { if (xhr.status === 200 || xhr.status === 304) { try { var response = JSON.parse(xhr.respon...
[ "function", "load", "(", "path", ",", "callback", ",", "errorCallback", ")", "{", "try", "{", "var", "xhr", "=", "new", "XMLHttpRequest", "(", ")", ";", "xhr", ".", "open", "(", "\"GET\"", ",", "path", ",", "true", ")", ";", "xhr", ".", "onreadystate...
Vanilla Ajax data transfer @param {String} path @param {Function} callback @param {Function} errorCallback
[ "Vanilla", "Ajax", "data", "transfer" ]
d23acc7c1ee687b6111750b0ea26d1aa565f87a8
https://github.com/esosedi/regions/blob/d23acc7c1ee687b6111750b0ea26d1aa565f87a8/src/utils/load_native.js#L7-L31
32,595
Siyfion/angular-typeahead
angular-typeahead.js
getDatumValue
function getDatumValue(datum) { for (var i in datasets) { var dataset = datasets[i]; var displayKey = dataset.displayKey || 'value'; var value = (angular.isFunction(displayKey) ? displayKey(datum) : datum[displayKey]) || ''; return value; } }
javascript
function getDatumValue(datum) { for (var i in datasets) { var dataset = datasets[i]; var displayKey = dataset.displayKey || 'value'; var value = (angular.isFunction(displayKey) ? displayKey(datum) : datum[displayKey]) || ''; return value; } }
[ "function", "getDatumValue", "(", "datum", ")", "{", "for", "(", "var", "i", "in", "datasets", ")", "{", "var", "dataset", "=", "datasets", "[", "i", "]", ";", "var", "displayKey", "=", "dataset", ".", "displayKey", "||", "'value'", ";", "var", "value"...
Returns the string to be displayed given some datum
[ "Returns", "the", "string", "to", "be", "displayed", "given", "some", "datum" ]
742a609d1898e972652b9141a9011b0347faa5fd
https://github.com/Siyfion/angular-typeahead/blob/742a609d1898e972652b9141a9011b0347faa5fd/angular-typeahead.js#L110-L117
32,596
evothings/cordova-eddystone
js/eddystone-plugin.js
parseFrameUID
function parseFrameUID(device, data, win, fail) { if(data[0] != 0x00) return false; // The UID frame has 18 bytes + 2 bytes reserved for future use // https://github.com/google/eddystone/tree/master/eddystone-uid // Check that we got at least 18 bytes. if(data.byteLength < 18) { fail("UID frame: invalid byteLe...
javascript
function parseFrameUID(device, data, win, fail) { if(data[0] != 0x00) return false; // The UID frame has 18 bytes + 2 bytes reserved for future use // https://github.com/google/eddystone/tree/master/eddystone-uid // Check that we got at least 18 bytes. if(data.byteLength < 18) { fail("UID frame: invalid byteLe...
[ "function", "parseFrameUID", "(", "device", ",", "data", ",", "win", ",", "fail", ")", "{", "if", "(", "data", "[", "0", "]", "!=", "0x00", ")", "return", "false", ";", "// The UID frame has 18 bytes + 2 bytes reserved for future use", "// https://github.com/google/...
Return true on frame type recognition, false otherwise.
[ "Return", "true", "on", "frame", "type", "recognition", "false", "otherwise", "." ]
2a24a4e24004a2392b9f1c494c775b7d713f1bf2
https://github.com/evothings/cordova-eddystone/blob/2a24a4e24004a2392b9f1c494c775b7d713f1bf2/js/eddystone-plugin.js#L2322-L2342
32,597
swarajban/npm-cache
cacheDependencyManagers/npmConfig.js
function () { var shrinkWrapPath = path.resolve(process.cwd(), 'npm-shrinkwrap.json'); if (fs.existsSync(shrinkWrapPath)) { logger.logInfo('[npm] using npm-shrinkwrap.json instead of package.json'); return shrinkWrapPath; } if (getNpmMajorVersion() >= 5) { var packageLockPath = path.resolve(proce...
javascript
function () { var shrinkWrapPath = path.resolve(process.cwd(), 'npm-shrinkwrap.json'); if (fs.existsSync(shrinkWrapPath)) { logger.logInfo('[npm] using npm-shrinkwrap.json instead of package.json'); return shrinkWrapPath; } if (getNpmMajorVersion() >= 5) { var packageLockPath = path.resolve(proce...
[ "function", "(", ")", "{", "var", "shrinkWrapPath", "=", "path", ".", "resolve", "(", "process", ".", "cwd", "(", ")", ",", "'npm-shrinkwrap.json'", ")", ";", "if", "(", "fs", ".", "existsSync", "(", "shrinkWrapPath", ")", ")", "{", "logger", ".", "log...
Returns path to configuration file for npm. Uses - npm-shrinkwrap.json if it exists; otherwise, - package-lock.json if it exists and npm >= 5; otherwise, - defaults to package.json
[ "Returns", "path", "to", "configuration", "file", "for", "npm", ".", "Uses", "-", "npm", "-", "shrinkwrap", ".", "json", "if", "it", "exists", ";", "otherwise", "-", "package", "-", "lock", ".", "json", "if", "it", "exists", "and", "npm", ">", "=", "...
de60eb445f3b7c0c62106f7cc2f98cabcfd9fd2c
https://github.com/swarajban/npm-cache/blob/de60eb445f3b7c0c62106f7cc2f98cabcfd9fd2c/cacheDependencyManagers/npmConfig.js#L21-L38
32,598
swarajban/npm-cache
cacheDependencyManagers/composerConfig.js
function () { var composerLockPath = path.resolve(process.cwd(), 'composer.lock'); var composerJsonPath = path.resolve(process.cwd(), 'composer.json'); if (isUsingComposerLock === null) { if (fs.existsSync(composerLockPath)) { logger.logInfo('[composer] using composer.lock instead of composer.json'); ...
javascript
function () { var composerLockPath = path.resolve(process.cwd(), 'composer.lock'); var composerJsonPath = path.resolve(process.cwd(), 'composer.json'); if (isUsingComposerLock === null) { if (fs.existsSync(composerLockPath)) { logger.logInfo('[composer] using composer.lock instead of composer.json'); ...
[ "function", "(", ")", "{", "var", "composerLockPath", "=", "path", ".", "resolve", "(", "process", ".", "cwd", "(", ")", ",", "'composer.lock'", ")", ";", "var", "composerJsonPath", "=", "path", ".", "resolve", "(", "process", ".", "cwd", "(", ")", ","...
Returns path to configuration file for composer. Uses composer.lock if it exists; otherwise, defaults to composer.json
[ "Returns", "path", "to", "configuration", "file", "for", "composer", ".", "Uses", "composer", ".", "lock", "if", "it", "exists", ";", "otherwise", "defaults", "to", "composer", ".", "json" ]
de60eb445f3b7c0c62106f7cc2f98cabcfd9fd2c
https://github.com/swarajban/npm-cache/blob/de60eb445f3b7c0c62106f7cc2f98cabcfd9fd2c/cacheDependencyManagers/composerConfig.js#L13-L27
32,599
swarajban/npm-cache
cacheDependencyManagers/composerConfig.js
function () { var composerInstallDirectory = 'vendor'; var exists = null; try { exists = fs.statSync(getComposerConfigPath()); } catch (e) {} if (exists !== null) { var composerConfig = JSON.parse(fs.readFileSync(getComposerConfigPath())); if ('config' in composerConfig && 'vendor-dir' in compos...
javascript
function () { var composerInstallDirectory = 'vendor'; var exists = null; try { exists = fs.statSync(getComposerConfigPath()); } catch (e) {} if (exists !== null) { var composerConfig = JSON.parse(fs.readFileSync(getComposerConfigPath())); if ('config' in composerConfig && 'vendor-dir' in compos...
[ "function", "(", ")", "{", "var", "composerInstallDirectory", "=", "'vendor'", ";", "var", "exists", "=", "null", ";", "try", "{", "exists", "=", "fs", ".", "statSync", "(", "getComposerConfigPath", "(", ")", ")", ";", "}", "catch", "(", "e", ")", "{",...
Composer.json can specify a custom vendor directory Let's get it if we can!
[ "Composer", ".", "json", "can", "specify", "a", "custom", "vendor", "directory", "Let", "s", "get", "it", "if", "we", "can!" ]
de60eb445f3b7c0c62106f7cc2f98cabcfd9fd2c
https://github.com/swarajban/npm-cache/blob/de60eb445f3b7c0c62106f7cc2f98cabcfd9fd2c/cacheDependencyManagers/composerConfig.js#L31-L46