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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
40,600 | lorenwest/monitor-dashboard | lib/js/PageView.js | function(id) {
var t = this;
// Is there a tour running already?
if (t.tourView) {
t.tourView.stop();
}
// Load the Tour and start it
var tour = new UI.Tour({id:id});
tour.fetch(function(err){
if (err) {
alert("Error: Cannot open tour id: " + id);
... | javascript | function(id) {
var t = this;
// Is there a tour running already?
if (t.tourView) {
t.tourView.stop();
}
// Load the Tour and start it
var tour = new UI.Tour({id:id});
tour.fetch(function(err){
if (err) {
alert("Error: Cannot open tour id: " + id);
... | [
"function",
"(",
"id",
")",
"{",
"var",
"t",
"=",
"this",
";",
"// Is there a tour running already?",
"if",
"(",
"t",
".",
"tourView",
")",
"{",
"t",
".",
"tourView",
".",
"stop",
"(",
")",
";",
"}",
"// Load the Tour and start it",
"var",
"tour",
"=",
"... | Run the tour specified by id | [
"Run",
"the",
"tour",
"specified",
"by",
"id"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/PageView.js#L505-L533 | |
40,601 | lorenwest/monitor-dashboard | lib/js/PageView.js | function() {
var t = this,
isEditMode = t.$el.hasClass('edit-mode'),
text = isEditMode ? 'Lock Components' : 'Edit Components',
icon = isEditMode ? 'lock' : 'edit';
t.$('.nm-pvm-lock').text(text);
t.$('.nm-pvm-edit i').attr('class', 'icon-' + icon);
} | javascript | function() {
var t = this,
isEditMode = t.$el.hasClass('edit-mode'),
text = isEditMode ? 'Lock Components' : 'Edit Components',
icon = isEditMode ? 'lock' : 'edit';
t.$('.nm-pvm-lock').text(text);
t.$('.nm-pvm-edit i').attr('class', 'icon-' + icon);
} | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"this",
",",
"isEditMode",
"=",
"t",
".",
"$el",
".",
"hasClass",
"(",
"'edit-mode'",
")",
",",
"text",
"=",
"isEditMode",
"?",
"'Lock Components'",
":",
"'Edit Components'",
",",
"icon",
"=",
"isEditMode",
"?"... | This sets the edit menu text and icon | [
"This",
"sets",
"the",
"edit",
"menu",
"text",
"and",
"icon"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/PageView.js#L542-L549 | |
40,602 | lorenwest/monitor-dashboard | lib/js/PageView.js | function() {
var t = this;
// Show if loaded
if (aboutTemplate) {
return t.showDialog('#nm-pv-about');
}
UI.loadTemplate('', 'About', function(error, template) {
if (error) {return;}
t.$el.append(template.apply(t));
t.$('.modal a').attr({target: '_blank'})... | javascript | function() {
var t = this;
// Show if loaded
if (aboutTemplate) {
return t.showDialog('#nm-pv-about');
}
UI.loadTemplate('', 'About', function(error, template) {
if (error) {return;}
t.$el.append(template.apply(t));
t.$('.modal a').attr({target: '_blank'})... | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"this",
";",
"// Show if loaded",
"if",
"(",
"aboutTemplate",
")",
"{",
"return",
"t",
".",
"showDialog",
"(",
"'#nm-pv-about'",
")",
";",
"}",
"UI",
".",
"loadTemplate",
"(",
"''",
",",
"'About'",
",",
"func... | This shows the about page | [
"This",
"shows",
"the",
"about",
"page"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/PageView.js#L552-L568 | |
40,603 | lorenwest/monitor-dashboard | lib/js/PageView.js | function() {
var t = this;
UI.hideToolTips();
t.leftJustify();
t.centerPage();
t.model.save(function(error){
if (error) {
console.error("Page save error:", error);
}
});
t.unlockPage();
t.setDirty(false);
} | javascript | function() {
var t = this;
UI.hideToolTips();
t.leftJustify();
t.centerPage();
t.model.save(function(error){
if (error) {
console.error("Page save error:", error);
}
});
t.unlockPage();
t.setDirty(false);
} | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"this",
";",
"UI",
".",
"hideToolTips",
"(",
")",
";",
"t",
".",
"leftJustify",
"(",
")",
";",
"t",
".",
"centerPage",
"(",
")",
";",
"t",
".",
"model",
".",
"save",
"(",
"function",
"(",
"error",
")"... | Persist the page to the backend | [
"Persist",
"the",
"page",
"to",
"the",
"backend"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/PageView.js#L571-L583 | |
40,604 | lorenwest/monitor-dashboard | lib/js/JsonView.js | function() {
var t = this;
t.$el.html('');
// Output the heading if specified
if (t.options.heading) {
$(t.template.heading({value:t.options.heading})).appendTo(t.$el);
}
// If a non-object, just print it
t.json = t.isBackbone ? t.model.toJSON() : t.model;
if (t... | javascript | function() {
var t = this;
t.$el.html('');
// Output the heading if specified
if (t.options.heading) {
$(t.template.heading({value:t.options.heading})).appendTo(t.$el);
}
// If a non-object, just print it
t.json = t.isBackbone ? t.model.toJSON() : t.model;
if (t... | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"this",
";",
"t",
".",
"$el",
".",
"html",
"(",
"''",
")",
";",
"// Output the heading if specified",
"if",
"(",
"t",
".",
"options",
".",
"heading",
")",
"{",
"$",
"(",
"t",
".",
"template",
".",
"headin... | Render new HTML | [
"Render",
"new",
"HTML"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/JsonView.js#L56-L118 | |
40,605 | lorenwest/monitor-dashboard | lib/js/JsonView.js | function(elemName) {
var t = this;
if (t.isBackbone) {
return t.model instanceof Backbone.Collection ? t.model.at(elemName) : t.model.get(elemName);
}
return t.model[elemName];
} | javascript | function(elemName) {
var t = this;
if (t.isBackbone) {
return t.model instanceof Backbone.Collection ? t.model.at(elemName) : t.model.get(elemName);
}
return t.model[elemName];
} | [
"function",
"(",
"elemName",
")",
"{",
"var",
"t",
"=",
"this",
";",
"if",
"(",
"t",
".",
"isBackbone",
")",
"{",
"return",
"t",
".",
"model",
"instanceof",
"Backbone",
".",
"Collection",
"?",
"t",
".",
"model",
".",
"at",
"(",
"elemName",
")",
":"... | Get the value of the element with the specified name | [
"Get",
"the",
"value",
"of",
"the",
"element",
"with",
"the",
"specified",
"name"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/JsonView.js#L152-L158 | |
40,606 | lorenwest/monitor-dashboard | lib/js/JsonView.js | function(elem) {
var t = this,
strValue;
// Catch recursive stringify
try {strValue = JSON.stringify(elem.value);}
catch (e) {strValue = "{object}";}
// Set if the value changed
if (strValue !== elem.strValue) {
var priorStrValue = elem.strValue;
elem.strV... | javascript | function(elem) {
var t = this,
strValue;
// Catch recursive stringify
try {strValue = JSON.stringify(elem.value);}
catch (e) {strValue = "{object}";}
// Set if the value changed
if (strValue !== elem.strValue) {
var priorStrValue = elem.strValue;
elem.strV... | [
"function",
"(",
"elem",
")",
"{",
"var",
"t",
"=",
"this",
",",
"strValue",
";",
"// Catch recursive stringify",
"try",
"{",
"strValue",
"=",
"JSON",
".",
"stringify",
"(",
"elem",
".",
"value",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"strValue",
... | Set the DOM element value to the JSON.stringify format | [
"Set",
"the",
"DOM",
"element",
"value",
"to",
"the",
"JSON",
".",
"stringify",
"format"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/JsonView.js#L161-L190 | |
40,607 | lorenwest/monitor-dashboard | lib/js/TourView.js | function() {
// Compute the amount of play left to go
t.playLeft = t.playEnd - Date.now();
// Done playing
if (t.playLeft <= 0) {
clearInterval(t.timer);
t.next();
}
// Set the progress bar width
t.setProgress();
} | javascript | function() {
// Compute the amount of play left to go
t.playLeft = t.playEnd - Date.now();
// Done playing
if (t.playLeft <= 0) {
clearInterval(t.timer);
t.next();
}
// Set the progress bar width
t.setProgress();
} | [
"function",
"(",
")",
"{",
"// Compute the amount of play left to go",
"t",
".",
"playLeft",
"=",
"t",
".",
"playEnd",
"-",
"Date",
".",
"now",
"(",
")",
";",
"// Done playing",
"if",
"(",
"t",
".",
"playLeft",
"<=",
"0",
")",
"{",
"clearInterval",
"(",
... | Run at each animation interval | [
"Run",
"at",
"each",
"animation",
"interval"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/TourView.js#L157-L169 | |
40,608 | lorenwest/monitor-dashboard | lib/js/TourView.js | function(e) {
var t = this,
target = $(e.currentTarget),
index = target.attr('data-index');
// Save the index. If a tour has many instances of the
// same page, it needs to know which instance.
localStorage.tourPageIndex = index;
// Navigate to the page
UI.page... | javascript | function(e) {
var t = this,
target = $(e.currentTarget),
index = target.attr('data-index');
// Save the index. If a tour has many instances of the
// same page, it needs to know which instance.
localStorage.tourPageIndex = index;
// Navigate to the page
UI.page... | [
"function",
"(",
"e",
")",
"{",
"var",
"t",
"=",
"this",
",",
"target",
"=",
"$",
"(",
"e",
".",
"currentTarget",
")",
",",
"index",
"=",
"target",
".",
"attr",
"(",
"'data-index'",
")",
";",
"// Save the index. If a tour has many instances of the",
"// sam... | Select a page | [
"Select",
"a",
"page"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/TourView.js#L213-L224 | |
40,609 | lorenwest/monitor-dashboard | lib/template/app/lib/view/SampleView.js | function(options) {
var t = this;
t.options = options;
t.monitor = options.monitor;
// Call this to set the initial height/width to something
// other than the size of the inner view elements.
options.component.setDefaultSize({
width: 400,
height: 300
});
... | javascript | function(options) {
var t = this;
t.options = options;
t.monitor = options.monitor;
// Call this to set the initial height/width to something
// other than the size of the inner view elements.
options.component.setDefaultSize({
width: 400,
height: 300
});
... | [
"function",
"(",
"options",
")",
"{",
"var",
"t",
"=",
"this",
";",
"t",
".",
"options",
"=",
"options",
";",
"t",
".",
"monitor",
"=",
"options",
".",
"monitor",
";",
"// Call this to set the initial height/width to something",
"// other than the size of the inner ... | Add your view to the categories listed in these tags Called by the Backbone.View constructor | [
"Add",
"your",
"view",
"to",
"the",
"categories",
"listed",
"in",
"these",
"tags",
"Called",
"by",
"the",
"Backbone",
".",
"View",
"constructor"
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/template/app/lib/view/SampleView.js#L37-L63 | |
40,610 | lorenwest/monitor-dashboard | lib/template/app/lib/view/SampleView.js | function() {
var t = this;
// Append a monitor picker
t.monitorPicker = new UI.MonitorPicker({
el: t.$el,
hideProbe: true, // Set false for the user to select the probe class
model: t.options.monitor
});
t.monitorPicker.render();
} | javascript | function() {
var t = this;
// Append a monitor picker
t.monitorPicker = new UI.MonitorPicker({
el: t.$el,
hideProbe: true, // Set false for the user to select the probe class
model: t.options.monitor
});
t.monitorPicker.render();
} | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"this",
";",
"// Append a monitor picker",
"t",
".",
"monitorPicker",
"=",
"new",
"UI",
".",
"MonitorPicker",
"(",
"{",
"el",
":",
"t",
".",
"$el",
",",
"hideProbe",
":",
"true",
",",
"// Set false for the user t... | This is called when the settings page is opened. The options element of this view is set to the above options prior to calling render, so it doesn't have to be set in an initialize method. | [
"This",
"is",
"called",
"when",
"the",
"settings",
"page",
"is",
"opened",
".",
"The",
"options",
"element",
"of",
"this",
"view",
"is",
"set",
"to",
"the",
"above",
"options",
"prior",
"to",
"calling",
"render",
"so",
"it",
"doesn",
"t",
"have",
"to",
... | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/template/app/lib/view/SampleView.js#L107-L117 | |
40,611 | lorenwest/monitor-dashboard | lib/js/NetworkMap.js | function() {
var t = this,
map = {},
router = Monitor.getRouter(),
hostName = Monitor.getRouter().getHostName(),
appName = Monitor.Config.Monitor.appName,
appInstance = process.env.NODE_APP_INSTANCE;
// Add this process to the map
map[hostName] = {};
... | javascript | function() {
var t = this,
map = {},
router = Monitor.getRouter(),
hostName = Monitor.getRouter().getHostName(),
appName = Monitor.Config.Monitor.appName,
appInstance = process.env.NODE_APP_INSTANCE;
// Add this process to the map
map[hostName] = {};
... | [
"function",
"(",
")",
"{",
"var",
"t",
"=",
"this",
",",
"map",
"=",
"{",
"}",
",",
"router",
"=",
"Monitor",
".",
"getRouter",
"(",
")",
",",
"hostName",
"=",
"Monitor",
".",
"getRouter",
"(",
")",
".",
"getHostName",
"(",
")",
",",
"appName",
"... | This builds a new site map, and sets it into the map property if it is different from the current map. | [
"This",
"builds",
"a",
"new",
"site",
"map",
"and",
"sets",
"it",
"into",
"the",
"map",
"property",
"if",
"it",
"is",
"different",
"from",
"the",
"current",
"map",
"."
] | a990e03d07096515744332ae0761441f8534369c | https://github.com/lorenwest/monitor-dashboard/blob/a990e03d07096515744332ae0761441f8534369c/lib/js/NetworkMap.js#L77-L135 | |
40,612 | flint-bot/flint | lib/flint.js | Flint | function Flint(options) {
EventEmitter.call(this);
this.id = options.id || u.genUUID64();
/**
* Options Object
*
* @memberof Flint
* @instance
* @namespace options
* @property {string} token - Spark Token.
* @property {string} webhookUrl - URL that is used for SPark API to send callbacks.
... | javascript | function Flint(options) {
EventEmitter.call(this);
this.id = options.id || u.genUUID64();
/**
* Options Object
*
* @memberof Flint
* @instance
* @namespace options
* @property {string} token - Spark Token.
* @property {string} webhookUrl - URL that is used for SPark API to send callbacks.
... | [
"function",
"Flint",
"(",
"options",
")",
"{",
"EventEmitter",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"id",
"=",
"options",
".",
"id",
"||",
"u",
".",
"genUUID64",
"(",
")",
";",
"/**\n * Options Object\n *\n * @memberof Flint\n * @instance\n ... | Creates an instance of Flint.
@constructor Flint
@param {Object} options - Configuration object containing Flint settings.
@property {string} id - Flint UUID
@property {boolean} active - Flint active state
@property {boolean} intialized - Flint fully initialized
@property {boolean} isBotAccount - Is Flint attached to ... | [
"Creates",
"an",
"instance",
"of",
"Flint",
"."
] | 718923a17e794e28328aed1a2b24d75748b81fbc | https://github.com/flint-bot/flint/blob/718923a17e794e28328aed1a2b24d75748b81fbc/lib/flint.js#L40-L113 |
40,613 | flint-bot/flint | lib/flint.js | runActions | function runActions(matched, bot, trigger, id) {
// process preference logic
if(matched.length > 1) {
matched = _.sortBy(matched, match => match.preference);
var prefLow = matched[0].preference;
var prefHigh = matched[matched.length - 1].preference;
i... | javascript | function runActions(matched, bot, trigger, id) {
// process preference logic
if(matched.length > 1) {
matched = _.sortBy(matched, match => match.preference);
var prefLow = matched[0].preference;
var prefHigh = matched[matched.length - 1].preference;
i... | [
"function",
"runActions",
"(",
"matched",
",",
"bot",
",",
"trigger",
",",
"id",
")",
"{",
"// process preference logic",
"if",
"(",
"matched",
".",
"length",
">",
"1",
")",
"{",
"matched",
"=",
"_",
".",
"sortBy",
"(",
"matched",
",",
"match",
"=>",
"... | function to run the action | [
"function",
"to",
"run",
"the",
"action"
] | 718923a17e794e28328aed1a2b24d75748b81fbc | https://github.com/flint-bot/flint/blob/718923a17e794e28328aed1a2b24d75748b81fbc/lib/flint.js#L1432-L1477 |
40,614 | flint-bot/flint | lib/bot.js | markdownFormat | function markdownFormat(str) {
// if string...
if(str && typeof str === 'string') {
// process characters that do not render visibly in markdown
str = str.replace(/\<(?!@)/g, '<');
str = str.split('').reverse().join('').replace(/\>(?!.*@\<)/g, ';tg&').split('').reverse().join('');
return str;
... | javascript | function markdownFormat(str) {
// if string...
if(str && typeof str === 'string') {
// process characters that do not render visibly in markdown
str = str.replace(/\<(?!@)/g, '<');
str = str.split('').reverse().join('').replace(/\>(?!.*@\<)/g, ';tg&').split('').reverse().join('');
return str;
... | [
"function",
"markdownFormat",
"(",
"str",
")",
"{",
"// if string...",
"if",
"(",
"str",
"&&",
"typeof",
"str",
"===",
"'string'",
")",
"{",
"// process characters that do not render visibly in markdown",
"str",
"=",
"str",
".",
"replace",
"(",
"/",
"\\<(?!@)",
"/... | format makrdown type | [
"format",
"makrdown",
"type"
] | 718923a17e794e28328aed1a2b24d75748b81fbc | https://github.com/flint-bot/flint/blob/718923a17e794e28328aed1a2b24d75748b81fbc/lib/bot.js#L17-L32 |
40,615 | flint-bot/flint | lib/bot.js | Bot | function Bot(flint) {
EventEmitter.call(this);
this.id = u.genUUID64();
this.flint = flint;
this.options = flint.options;
this.debug = function(message) {
message = util.format.apply(null, Array.prototype.slice.call(arguments));
if(typeof flint.debugger === 'function') {
flint.debugger(messa... | javascript | function Bot(flint) {
EventEmitter.call(this);
this.id = u.genUUID64();
this.flint = flint;
this.options = flint.options;
this.debug = function(message) {
message = util.format.apply(null, Array.prototype.slice.call(arguments));
if(typeof flint.debugger === 'function') {
flint.debugger(messa... | [
"function",
"Bot",
"(",
"flint",
")",
"{",
"EventEmitter",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"id",
"=",
"u",
".",
"genUUID64",
"(",
")",
";",
"this",
".",
"flint",
"=",
"flint",
";",
"this",
".",
"options",
"=",
"flint",
".",
"opti... | Creates a Bot instance that is then attached to a Spark Room.
@constructor
@param {Object} flint - The flint object this Bot spawns under.
@property {string} id - Bot UUID
@property {boolean} active - Bot active state
@property {object} person - Bot Person Object
@property {string} email - Bot email
@property {object}... | [
"Creates",
"a",
"Bot",
"instance",
"that",
"is",
"then",
"attached",
"to",
"a",
"Spark",
"Room",
"."
] | 718923a17e794e28328aed1a2b24d75748b81fbc | https://github.com/flint-bot/flint/blob/718923a17e794e28328aed1a2b24d75748b81fbc/lib/bot.js#L59-L101 |
40,616 | flint-bot/flint | storage/redis_old.js | initRedis | function initRedis() {
return when.promise((resolve, reject) => {
redis.get(name, (err, res) => {
if(err) {
memStore = {};
} else if(res) {
memStore = JSON.parse(res);
} else {
memStore = {};
}
resolve(true);
});
});
} | javascript | function initRedis() {
return when.promise((resolve, reject) => {
redis.get(name, (err, res) => {
if(err) {
memStore = {};
} else if(res) {
memStore = JSON.parse(res);
} else {
memStore = {};
}
resolve(true);
});
});
} | [
"function",
"initRedis",
"(",
")",
"{",
"return",
"when",
".",
"promise",
"(",
"(",
"resolve",
",",
"reject",
")",
"=>",
"{",
"redis",
".",
"get",
"(",
"name",
",",
"(",
"err",
",",
"res",
")",
"=>",
"{",
"if",
"(",
"err",
")",
"{",
"memStore",
... | load memStore state from redis | [
"load",
"memStore",
"state",
"from",
"redis"
] | 718923a17e794e28328aed1a2b24d75748b81fbc | https://github.com/flint-bot/flint/blob/718923a17e794e28328aed1a2b24d75748b81fbc/storage/redis_old.js#L17-L30 |
40,617 | flint-bot/flint | storage/redis_old.js | syncRedis | function syncRedis() {
// if memStore has changed...
if(JSON.stringify(memCache) !== JSON.stringify(memStore)) {
return when.promise((resolve, reject) => {
var serializedStore = JSON.stringify(memStore);
redis.set(name, serializedStore, err => {
if(err) {
reject(err);... | javascript | function syncRedis() {
// if memStore has changed...
if(JSON.stringify(memCache) !== JSON.stringify(memStore)) {
return when.promise((resolve, reject) => {
var serializedStore = JSON.stringify(memStore);
redis.set(name, serializedStore, err => {
if(err) {
reject(err);... | [
"function",
"syncRedis",
"(",
")",
"{",
"// if memStore has changed...",
"if",
"(",
"JSON",
".",
"stringify",
"(",
"memCache",
")",
"!==",
"JSON",
".",
"stringify",
"(",
"memStore",
")",
")",
"{",
"return",
"when",
".",
"promise",
"(",
"(",
"resolve",
",",... | start periodicly sync of memStore state to redis | [
"start",
"periodicly",
"sync",
"of",
"memStore",
"state",
"to",
"redis"
] | 718923a17e794e28328aed1a2b24d75748b81fbc | https://github.com/flint-bot/flint/blob/718923a17e794e28328aed1a2b24d75748b81fbc/storage/redis_old.js#L33-L67 |
40,618 | dominhhai/koa-log4js | koa-logger.js | getKoaLogger | function getKoaLogger (logger4js, options) {
if (typeof options === 'object') {
options = options || {}
} else if (options) {
options = { format: options }
} else {
options = {}
}
let thislogger = logger4js
let level = levels.getLevel(options.level, levels.INFO)
let fmt = options.format || DE... | javascript | function getKoaLogger (logger4js, options) {
if (typeof options === 'object') {
options = options || {}
} else if (options) {
options = { format: options }
} else {
options = {}
}
let thislogger = logger4js
let level = levels.getLevel(options.level, levels.INFO)
let fmt = options.format || DE... | [
"function",
"getKoaLogger",
"(",
"logger4js",
",",
"options",
")",
"{",
"if",
"(",
"typeof",
"options",
"===",
"'object'",
")",
"{",
"options",
"=",
"options",
"||",
"{",
"}",
"}",
"else",
"if",
"(",
"options",
")",
"{",
"options",
"=",
"{",
"format",
... | Log requests with the given `options` or a `format` string.
Use for Koa v1
Options:
- `format` Format string, see below for tokens
- `level` A log4js levels instance. Supports also 'auto'
Tokens:
- `:req[header]` ex: `:req[Accept]`
- `:res[header]` ex: `:res[Content-Length]`
- `:http-version`
- `:res... | [
"Log",
"requests",
"with",
"the",
"given",
"options",
"or",
"a",
"format",
"string",
".",
"Use",
"for",
"Koa",
"v1"
] | c129c9e7d1145553ecbf14938022aac7998a0710 | https://github.com/dominhhai/koa-log4js/blob/c129c9e7d1145553ecbf14938022aac7998a0710/koa-logger.js#L36-L111 |
40,619 | dominhhai/koa-log4js | koa-logger.js | format | function format (str, tokens) {
for (let i = 0; i < tokens.length; i++) {
str = str.replace(tokens[i].token, tokens[i].replacement)
}
return str
} | javascript | function format (str, tokens) {
for (let i = 0; i < tokens.length; i++) {
str = str.replace(tokens[i].token, tokens[i].replacement)
}
return str
} | [
"function",
"format",
"(",
"str",
",",
"tokens",
")",
"{",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"tokens",
".",
"length",
";",
"i",
"++",
")",
"{",
"str",
"=",
"str",
".",
"replace",
"(",
"tokens",
"[",
"i",
"]",
".",
"token",
",",... | Return formatted log line.
@param {String} str
@param {IncomingMessage} req
@param {ServerResponse} res
@return {String}
@api private | [
"Return",
"formatted",
"log",
"line",
"."
] | c129c9e7d1145553ecbf14938022aac7998a0710 | https://github.com/dominhhai/koa-log4js/blob/c129c9e7d1145553ecbf14938022aac7998a0710/koa-logger.js#L198-L203 |
40,620 | dominhhai/koa-log4js | koa-logger.js | createNoLogCondition | function createNoLogCondition (nolog) {
let regexp = null
if (nolog) {
if (nolog instanceof RegExp) {
regexp = nolog
}
if (typeof nolog === 'string') {
regexp = new RegExp(nolog)
}
if (Array.isArray(nolog)) {
let regexpsAsStrings = nolog.map((o) => (o.source ? o.source : o))
... | javascript | function createNoLogCondition (nolog) {
let regexp = null
if (nolog) {
if (nolog instanceof RegExp) {
regexp = nolog
}
if (typeof nolog === 'string') {
regexp = new RegExp(nolog)
}
if (Array.isArray(nolog)) {
let regexpsAsStrings = nolog.map((o) => (o.source ? o.source : o))
... | [
"function",
"createNoLogCondition",
"(",
"nolog",
")",
"{",
"let",
"regexp",
"=",
"null",
"if",
"(",
"nolog",
")",
"{",
"if",
"(",
"nolog",
"instanceof",
"RegExp",
")",
"{",
"regexp",
"=",
"nolog",
"}",
"if",
"(",
"typeof",
"nolog",
"===",
"'string'",
... | Return RegExp Object about nolog
@param {String} nolog
@return {RegExp}
@api private
syntax
1. String
1.1 "\\.gif"
NOT LOGGING http://example.com/hoge.gif and http://example.com/hoge.gif?fuga
LOGGING http://example.com/hoge.agif
1.2 in "\\.gif|\\.jpg$"
NOT LOGGING http://example.com/hoge.gif and
http://example.com/h... | [
"Return",
"RegExp",
"Object",
"about",
"nolog"
] | c129c9e7d1145553ecbf14938022aac7998a0710 | https://github.com/dominhhai/koa-log4js/blob/c129c9e7d1145553ecbf14938022aac7998a0710/koa-logger.js#L232-L250 |
40,621 | BioPhoton/angular1-star-rating | chore/gulp/helper.js | log | function log(msg, color) {
if (typeof(msg) === 'object') {
for (var item in msg) {
if (msg.hasOwnProperty(item)) {
if(color && color in $.util.colors) {
$.util.log($.util.colors[color](msg[item]));
}
... | javascript | function log(msg, color) {
if (typeof(msg) === 'object') {
for (var item in msg) {
if (msg.hasOwnProperty(item)) {
if(color && color in $.util.colors) {
$.util.log($.util.colors[color](msg[item]));
}
... | [
"function",
"log",
"(",
"msg",
",",
"color",
")",
"{",
"if",
"(",
"typeof",
"(",
"msg",
")",
"===",
"'object'",
")",
"{",
"for",
"(",
"var",
"item",
"in",
"msg",
")",
"{",
"if",
"(",
"msg",
".",
"hasOwnProperty",
"(",
"item",
")",
")",
"{",
"if... | Log a message or series of messages using chalk's green color.
Can pass in a string, object or array. | [
"Log",
"a",
"message",
"or",
"series",
"of",
"messages",
"using",
"chalk",
"s",
"green",
"color",
".",
"Can",
"pass",
"in",
"a",
"string",
"object",
"or",
"array",
"."
] | dfff7d9a399f59ad0b8dd8a8309360d4930664a4 | https://github.com/BioPhoton/angular1-star-rating/blob/dfff7d9a399f59ad0b8dd8a8309360d4930664a4/chore/gulp/helper.js#L73-L86 |
40,622 | BioPhoton/angular1-star-rating | chore/gulp/helper.js | clean | function clean(path, done) {
log('Cleaning: ' + $.util.colors.green(path));
return del(path, done);
} | javascript | function clean(path, done) {
log('Cleaning: ' + $.util.colors.green(path));
return del(path, done);
} | [
"function",
"clean",
"(",
"path",
",",
"done",
")",
"{",
"log",
"(",
"'Cleaning: '",
"+",
"$",
".",
"util",
".",
"colors",
".",
"green",
"(",
"path",
")",
")",
";",
"return",
"del",
"(",
"path",
",",
"done",
")",
";",
"}"
] | Delete all files in a given path
@param {Array} path - array of paths to delete
@param {Function} done - callback when complete | [
"Delete",
"all",
"files",
"in",
"a",
"given",
"path"
] | dfff7d9a399f59ad0b8dd8a8309360d4930664a4 | https://github.com/BioPhoton/angular1-star-rating/blob/dfff7d9a399f59ad0b8dd8a8309360d4930664a4/chore/gulp/helper.js#L117-L120 |
40,623 | BioPhoton/angular1-star-rating | chore/gulp/helper.js | bytediffFormatter | function bytediffFormatter(data) {
var difference = (data.savings > 0) ? ' smaller.' : ' larger.';
return data.fileName + ' went from '
+ (data.startSize / 1000).toFixed(2) + ' kB to '
+ (data.endSize / 1000).toFixed(2) + ' kB and is '
+ formatPercent(1 - data.percent... | javascript | function bytediffFormatter(data) {
var difference = (data.savings > 0) ? ' smaller.' : ' larger.';
return data.fileName + ' went from '
+ (data.startSize / 1000).toFixed(2) + ' kB to '
+ (data.endSize / 1000).toFixed(2) + ' kB and is '
+ formatPercent(1 - data.percent... | [
"function",
"bytediffFormatter",
"(",
"data",
")",
"{",
"var",
"difference",
"=",
"(",
"data",
".",
"savings",
">",
"0",
")",
"?",
"' smaller.'",
":",
"' larger.'",
";",
"return",
"data",
".",
"fileName",
"+",
"' went from '",
"+",
"(",
"data",
".",
"sta... | Formatter for bytediff to display the size changes after processing
@param {Object} data - byte data
@return {String} Difference in bytes, formatted | [
"Formatter",
"for",
"bytediff",
"to",
"display",
"the",
"size",
"changes",
"after",
"processing"
] | dfff7d9a399f59ad0b8dd8a8309360d4930664a4 | https://github.com/BioPhoton/angular1-star-rating/blob/dfff7d9a399f59ad0b8dd8a8309360d4930664a4/chore/gulp/helper.js#L144-L150 |
40,624 | devanandb/webpack-mix | src/config.js | function() {
let options = {};
tap(Mix.paths.root('.babelrc'), babelrc => {
if (File.exists(babelrc)) {
options = JSON.parse(File.find(babelrc).read());
}
});
if (this.babelConfig) {
options = webpackMe... | javascript | function() {
let options = {};
tap(Mix.paths.root('.babelrc'), babelrc => {
if (File.exists(babelrc)) {
options = JSON.parse(File.find(babelrc).read());
}
});
if (this.babelConfig) {
options = webpackMe... | [
"function",
"(",
")",
"{",
"let",
"options",
"=",
"{",
"}",
";",
"tap",
"(",
"Mix",
".",
"paths",
".",
"root",
"(",
"'.babelrc'",
")",
",",
"babelrc",
"=>",
"{",
"if",
"(",
"File",
".",
"exists",
"(",
"babelrc",
")",
")",
"{",
"options",
"=",
"... | The default Babel configuration.
@type {Object} | [
"The",
"default",
"Babel",
"configuration",
"."
] | 0f61f71cf302acfcfb9f2e42004404f95eefbef4 | https://github.com/devanandb/webpack-mix/blob/0f61f71cf302acfcfb9f2e42004404f95eefbef4/src/config.js#L139-L180 | |
40,625 | devanandb/webpack-mix | src/webpackPlugins/MixDefinitionsPlugin.js | MixDefinitionsPlugin | function MixDefinitionsPlugin(envPath) {
expand(
dotenv.config({
path: envPath || Mix.paths.root('.env')
})
);
} | javascript | function MixDefinitionsPlugin(envPath) {
expand(
dotenv.config({
path: envPath || Mix.paths.root('.env')
})
);
} | [
"function",
"MixDefinitionsPlugin",
"(",
"envPath",
")",
"{",
"expand",
"(",
"dotenv",
".",
"config",
"(",
"{",
"path",
":",
"envPath",
"||",
"Mix",
".",
"paths",
".",
"root",
"(",
"'.env'",
")",
"}",
")",
")",
";",
"}"
] | Create a new plugin instance.
@param {string} envPath | [
"Create",
"a",
"new",
"plugin",
"instance",
"."
] | 0f61f71cf302acfcfb9f2e42004404f95eefbef4 | https://github.com/devanandb/webpack-mix/blob/0f61f71cf302acfcfb9f2e42004404f95eefbef4/src/webpackPlugins/MixDefinitionsPlugin.js#L10-L16 |
40,626 | ghybs/leaflet-defaulticon-compatibility | src/Icon.Default.compatibility.js | function (name) {
// @option imagePath: String
// `Icon.Default` will try to auto-detect the location of
// the blue icon images. If you are placing these images in a
// non-standard way, set this option to point to the right
// path, before any marker is added to a map.
// Caution: do not use this option w... | javascript | function (name) {
// @option imagePath: String
// `Icon.Default` will try to auto-detect the location of
// the blue icon images. If you are placing these images in a
// non-standard way, set this option to point to the right
// path, before any marker is added to a map.
// Caution: do not use this option w... | [
"function",
"(",
"name",
")",
"{",
"// @option imagePath: String",
"// `Icon.Default` will try to auto-detect the location of",
"// the blue icon images. If you are placing these images in a",
"// non-standard way, set this option to point to the right",
"// path, before any marker is added to a m... | Override to make sure options are retrieved from CSS. | [
"Override",
"to",
"make",
"sure",
"options",
"are",
"retrieved",
"from",
"CSS",
"."
] | 23ebe7654149e1b41c9904a62a6a93822896852e | https://github.com/ghybs/leaflet-defaulticon-compatibility/blob/23ebe7654149e1b41c9904a62a6a93822896852e/src/Icon.Default.compatibility.js#L28-L46 | |
40,627 | ghybs/leaflet-defaulticon-compatibility | src/Icon.Default.compatibility.js | function (imagePath) {
this._setOptions('icon', _detectIconOptions, imagePath);
this._setOptions('shadow', _detectIconOptions, imagePath);
this._setOptions('popup', _detectDivOverlayOptions);
this._setOptions('tooltip', _detectDivOverlayOptions);
this._needsInit = false;
} | javascript | function (imagePath) {
this._setOptions('icon', _detectIconOptions, imagePath);
this._setOptions('shadow', _detectIconOptions, imagePath);
this._setOptions('popup', _detectDivOverlayOptions);
this._setOptions('tooltip', _detectDivOverlayOptions);
this._needsInit = false;
} | [
"function",
"(",
"imagePath",
")",
"{",
"this",
".",
"_setOptions",
"(",
"'icon'",
",",
"_detectIconOptions",
",",
"imagePath",
")",
";",
"this",
".",
"_setOptions",
"(",
"'shadow'",
",",
"_detectIconOptions",
",",
"imagePath",
")",
";",
"this",
".",
"_setOp... | Initialize all necessary options for this instance. | [
"Initialize",
"all",
"necessary",
"options",
"for",
"this",
"instance",
"."
] | 23ebe7654149e1b41c9904a62a6a93822896852e | https://github.com/ghybs/leaflet-defaulticon-compatibility/blob/23ebe7654149e1b41c9904a62a6a93822896852e/src/Icon.Default.compatibility.js#L49-L55 | |
40,628 | ghybs/leaflet-defaulticon-compatibility | src/Icon.Default.compatibility.js | function (name, detectorFn, imagePath) {
var options = this.options,
prefix = options.classNamePrefix,
optionValues = detectorFn(prefix + name, imagePath);
for (var optionName in optionValues) {
options[name + optionName] = options[name + optionName] || optionValues[optionName];
}
} | javascript | function (name, detectorFn, imagePath) {
var options = this.options,
prefix = options.classNamePrefix,
optionValues = detectorFn(prefix + name, imagePath);
for (var optionName in optionValues) {
options[name + optionName] = options[name + optionName] || optionValues[optionName];
}
} | [
"function",
"(",
"name",
",",
"detectorFn",
",",
"imagePath",
")",
"{",
"var",
"options",
"=",
"this",
".",
"options",
",",
"prefix",
"=",
"options",
".",
"classNamePrefix",
",",
"optionValues",
"=",
"detectorFn",
"(",
"prefix",
"+",
"name",
",",
"imagePat... | Retrieve values from CSS and assign to this instance options. | [
"Retrieve",
"values",
"from",
"CSS",
"and",
"assign",
"to",
"this",
"instance",
"options",
"."
] | 23ebe7654149e1b41c9904a62a6a93822896852e | https://github.com/ghybs/leaflet-defaulticon-compatibility/blob/23ebe7654149e1b41c9904a62a6a93822896852e/src/Icon.Default.compatibility.js#L58-L66 | |
40,629 | ghybs/leaflet-defaulticon-compatibility | src/Icon.Default.compatibility.js | _getStyle | function _getStyle(el, style) {
return L.DomUtil.getStyle(el, style) || L.DomUtil.getStyle(el, _kebabToCamelCase(style));
} | javascript | function _getStyle(el, style) {
return L.DomUtil.getStyle(el, style) || L.DomUtil.getStyle(el, _kebabToCamelCase(style));
} | [
"function",
"_getStyle",
"(",
"el",
",",
"style",
")",
"{",
"return",
"L",
".",
"DomUtil",
".",
"getStyle",
"(",
"el",
",",
"style",
")",
"||",
"L",
".",
"DomUtil",
".",
"getStyle",
"(",
"el",
",",
"_kebabToCamelCase",
"(",
"style",
")",
")",
";",
... | Factorize style reading fallback for IE8. | [
"Factorize",
"style",
"reading",
"fallback",
"for",
"IE8",
"."
] | 23ebe7654149e1b41c9904a62a6a93822896852e | https://github.com/ghybs/leaflet-defaulticon-compatibility/blob/23ebe7654149e1b41c9904a62a6a93822896852e/src/Icon.Default.compatibility.js#L134-L136 |
40,630 | gocanto/lazy-vue | src/js/image.js | fadeIn | function fadeIn(el)
{
el.style.opacity = 0;
el.style.display = "block";
(function fadeIn() {
let val = parseFloat(el.style.opacity);
if (! ((val += .1) > 1)) {
el.style.opacity = val;
setTimeout(fadeIn, 40);
}
})();
} | javascript | function fadeIn(el)
{
el.style.opacity = 0;
el.style.display = "block";
(function fadeIn() {
let val = parseFloat(el.style.opacity);
if (! ((val += .1) > 1)) {
el.style.opacity = val;
setTimeout(fadeIn, 40);
}
})();
} | [
"function",
"fadeIn",
"(",
"el",
")",
"{",
"el",
".",
"style",
".",
"opacity",
"=",
"0",
";",
"el",
".",
"style",
".",
"display",
"=",
"\"block\"",
";",
"(",
"function",
"fadeIn",
"(",
")",
"{",
"let",
"val",
"=",
"parseFloat",
"(",
"el",
".",
"s... | Apply a fade in effect to a given element.
@param {Object} el
@return {Void} | [
"Apply",
"a",
"fade",
"in",
"effect",
"to",
"a",
"given",
"element",
"."
] | c2113455c6a662ad627f52357958b1a0997ddcb3 | https://github.com/gocanto/lazy-vue/blob/c2113455c6a662ad627f52357958b1a0997ddcb3/src/js/image.js#L27-L39 |
40,631 | linkedin/Fiber | src/fiber.js | copy | function copy(from, to) {
var name;
for (name in from) {
if (from.hasOwnProperty(name)) {
to[name] = from[name];
}
}
} | javascript | function copy(from, to) {
var name;
for (name in from) {
if (from.hasOwnProperty(name)) {
to[name] = from[name];
}
}
} | [
"function",
"copy",
"(",
"from",
",",
"to",
")",
"{",
"var",
"name",
";",
"for",
"(",
"name",
"in",
"from",
")",
"{",
"if",
"(",
"from",
".",
"hasOwnProperty",
"(",
"name",
")",
")",
"{",
"to",
"[",
"name",
"]",
"=",
"from",
"[",
"name",
"]",
... | Helper function to copy properties from one object to the other. | [
"Helper",
"function",
"to",
"copy",
"properties",
"from",
"one",
"object",
"to",
"the",
"other",
"."
] | e930b220a95246357b4929b37a6a5e9e6679843f | https://github.com/linkedin/Fiber/blob/e930b220a95246357b4929b37a6a5e9e6679843f/src/fiber.js#L54-L61 |
40,632 | Foxandxss/koa-unless | index.js | matchesCustom | function matchesCustom(ctx, opts) {
if (opts.custom) {
return opts.custom.call(ctx);
}
return false;
} | javascript | function matchesCustom(ctx, opts) {
if (opts.custom) {
return opts.custom.call(ctx);
}
return false;
} | [
"function",
"matchesCustom",
"(",
"ctx",
",",
"opts",
")",
"{",
"if",
"(",
"opts",
".",
"custom",
")",
"{",
"return",
"opts",
".",
"custom",
".",
"call",
"(",
"ctx",
")",
";",
"}",
"return",
"false",
";",
"}"
] | Returns boolean indicating whether the custom function returns true.
@param ctx - Koa context
@param opts - unless configuration
@returns {boolean} | [
"Returns",
"boolean",
"indicating",
"whether",
"the",
"custom",
"function",
"returns",
"true",
"."
] | d692252c06b5f2572fe70187722b9be0dba2014f | https://github.com/Foxandxss/koa-unless/blob/d692252c06b5f2572fe70187722b9be0dba2014f/index.js#L38-L43 |
40,633 | Foxandxss/koa-unless | index.js | matchesPath | function matchesPath(requestedUrl, opts) {
var paths = !opts.path || Array.isArray(opts.path) ?
opts.path : [opts.path];
if (paths) {
return paths.some(function(p) {
return (typeof p === 'string' && p === requestedUrl.pathname) ||
(p instanceof RegExp && !! p.exec(requestedUrl.pathname));
... | javascript | function matchesPath(requestedUrl, opts) {
var paths = !opts.path || Array.isArray(opts.path) ?
opts.path : [opts.path];
if (paths) {
return paths.some(function(p) {
return (typeof p === 'string' && p === requestedUrl.pathname) ||
(p instanceof RegExp && !! p.exec(requestedUrl.pathname));
... | [
"function",
"matchesPath",
"(",
"requestedUrl",
",",
"opts",
")",
"{",
"var",
"paths",
"=",
"!",
"opts",
".",
"path",
"||",
"Array",
".",
"isArray",
"(",
"opts",
".",
"path",
")",
"?",
"opts",
".",
"path",
":",
"[",
"opts",
".",
"path",
"]",
";",
... | Returns boolean indicating whether the requestUrl matches against the paths configured.
@param requestedUrl - url requested by user
@param opts - unless configuration
@returns {boolean} | [
"Returns",
"boolean",
"indicating",
"whether",
"the",
"requestUrl",
"matches",
"against",
"the",
"paths",
"configured",
"."
] | d692252c06b5f2572fe70187722b9be0dba2014f | https://github.com/Foxandxss/koa-unless/blob/d692252c06b5f2572fe70187722b9be0dba2014f/index.js#L52-L64 |
40,634 | Foxandxss/koa-unless | index.js | matchesExtension | function matchesExtension(requestedUrl, opts) {
var exts = !opts.ext || Array.isArray(opts.ext) ?
opts.ext : [opts.ext];
if (exts) {
return exts.some(function(ext) {
return requestedUrl.pathname.substr(ext.length * -1) === ext;
});
}
} | javascript | function matchesExtension(requestedUrl, opts) {
var exts = !opts.ext || Array.isArray(opts.ext) ?
opts.ext : [opts.ext];
if (exts) {
return exts.some(function(ext) {
return requestedUrl.pathname.substr(ext.length * -1) === ext;
});
}
} | [
"function",
"matchesExtension",
"(",
"requestedUrl",
",",
"opts",
")",
"{",
"var",
"exts",
"=",
"!",
"opts",
".",
"ext",
"||",
"Array",
".",
"isArray",
"(",
"opts",
".",
"ext",
")",
"?",
"opts",
".",
"ext",
":",
"[",
"opts",
".",
"ext",
"]",
";",
... | Returns boolean indicating whether the requestUrl ends with the configured extensions.
@param requestedUrl - url requested by user
@param opts - unless configuration
@returns {boolean} | [
"Returns",
"boolean",
"indicating",
"whether",
"the",
"requestUrl",
"ends",
"with",
"the",
"configured",
"extensions",
"."
] | d692252c06b5f2572fe70187722b9be0dba2014f | https://github.com/Foxandxss/koa-unless/blob/d692252c06b5f2572fe70187722b9be0dba2014f/index.js#L73-L82 |
40,635 | Foxandxss/koa-unless | index.js | matchesMethod | function matchesMethod(method, opts) {
var methods = !opts.method || Array.isArray(opts.method) ?
opts.method : [opts.method];
if (methods) {
return !!~methods.indexOf(method);
}
} | javascript | function matchesMethod(method, opts) {
var methods = !opts.method || Array.isArray(opts.method) ?
opts.method : [opts.method];
if (methods) {
return !!~methods.indexOf(method);
}
} | [
"function",
"matchesMethod",
"(",
"method",
",",
"opts",
")",
"{",
"var",
"methods",
"=",
"!",
"opts",
".",
"method",
"||",
"Array",
".",
"isArray",
"(",
"opts",
".",
"method",
")",
"?",
"opts",
".",
"method",
":",
"[",
"opts",
".",
"method",
"]",
... | Returns boolean indicating whether the request method matches the configured methods.
@param requestedUrl - url requested by user
@param opts - unless configuration
@returns {boolean} | [
"Returns",
"boolean",
"indicating",
"whether",
"the",
"request",
"method",
"matches",
"the",
"configured",
"methods",
"."
] | d692252c06b5f2572fe70187722b9be0dba2014f | https://github.com/Foxandxss/koa-unless/blob/d692252c06b5f2572fe70187722b9be0dba2014f/index.js#L91-L98 |
40,636 | Skellington-Closet/slack-mock | examples/slack-app/controller.js | startRtm | function startRtm (token) {
api.rtm.start(token, (err, bot) => {
if (err) {
return console.log(err)
}
bot.on(/hello/, (bot, message) => {
bot.reply(message, 'GO CUBS')
})
bot.on(/howdy/, (bot, message) => {
bot.reply(message, 'GO TRIBE')
})
})
} | javascript | function startRtm (token) {
api.rtm.start(token, (err, bot) => {
if (err) {
return console.log(err)
}
bot.on(/hello/, (bot, message) => {
bot.reply(message, 'GO CUBS')
})
bot.on(/howdy/, (bot, message) => {
bot.reply(message, 'GO TRIBE')
})
})
} | [
"function",
"startRtm",
"(",
"token",
")",
"{",
"api",
".",
"rtm",
".",
"start",
"(",
"token",
",",
"(",
"err",
",",
"bot",
")",
"=>",
"{",
"if",
"(",
"err",
")",
"{",
"return",
"console",
".",
"log",
"(",
"err",
")",
"}",
"bot",
".",
"on",
"... | starts the rtm connection | [
"starts",
"the",
"rtm",
"connection"
] | 7bf3eb5073a8a2c071ece360a7b8729390a37024 | https://github.com/Skellington-Closet/slack-mock/blob/7bf3eb5073a8a2c071ece360a7b8729390a37024/examples/slack-app/controller.js#L64-L78 |
40,637 | Skellington-Closet/slack-mock | src/mocker/rtm.js | sendToClient | function sendToClient (message, client) {
return new Promise((resolve, reject) => {
try {
client.send(JSON.stringify(message), (e) => {
if (e) {
logger.error(`could not send rtm message to client`, e)
return reject(e)
}
})
} catch (e) {
logger.error(`could... | javascript | function sendToClient (message, client) {
return new Promise((resolve, reject) => {
try {
client.send(JSON.stringify(message), (e) => {
if (e) {
logger.error(`could not send rtm message to client`, e)
return reject(e)
}
})
} catch (e) {
logger.error(`could... | [
"function",
"sendToClient",
"(",
"message",
",",
"client",
")",
"{",
"return",
"new",
"Promise",
"(",
"(",
"resolve",
",",
"reject",
")",
"=>",
"{",
"try",
"{",
"client",
".",
"send",
"(",
"JSON",
".",
"stringify",
"(",
"message",
")",
",",
"(",
"e",... | sends the given message to the given client | [
"sends",
"the",
"given",
"message",
"to",
"the",
"given",
"client"
] | 7bf3eb5073a8a2c071ece360a7b8729390a37024 | https://github.com/Skellington-Closet/slack-mock/blob/7bf3eb5073a8a2c071ece360a7b8729390a37024/src/mocker/rtm.js#L66-L82 |
40,638 | CSS-Tricks/AnythingZoomer | demo/page.js | scrollableElement | function scrollableElement(els) {
for (var i = 0, argLength = arguments.length; i <argLength; i++) {
var el = arguments[i],
$scrollElement = $(el);
if ($scrollElement.scrollTop()> 0) {
return el;
} else {
$scrollElement.scrollTop(1);
var isScrollable = $scrollElement.scrollTop()> 0;
$scrollElement.... | javascript | function scrollableElement(els) {
for (var i = 0, argLength = arguments.length; i <argLength; i++) {
var el = arguments[i],
$scrollElement = $(el);
if ($scrollElement.scrollTop()> 0) {
return el;
} else {
$scrollElement.scrollTop(1);
var isScrollable = $scrollElement.scrollTop()> 0;
$scrollElement.... | [
"function",
"scrollableElement",
"(",
"els",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"argLength",
"=",
"arguments",
".",
"length",
";",
"i",
"<",
"argLength",
";",
"i",
"++",
")",
"{",
"var",
"el",
"=",
"arguments",
"[",
"i",
"]",
",",
"... | use the first element that is "scrollable" | [
"use",
"the",
"first",
"element",
"that",
"is",
"scrollable"
] | 5028f2ed79d5af7c4d66c0c63ef8325a6ba049c1 | https://github.com/CSS-Tricks/AnythingZoomer/blob/5028f2ed79d5af7c4d66c0c63ef8325a6ba049c1/demo/page.js#L43-L59 |
40,639 | arthurvaverko/ngx-highlight | dist/vendor.bundle.js | instantiationError | function instantiationError(injector, originalException, originalStack, key) {
return injectionError(injector, key, function () {
var /** @type {?} */ first = stringify(this.keys[0].token);
return getOriginalError(this).message + ": Error during instantiation of " + first + "!" + constructResolvingP... | javascript | function instantiationError(injector, originalException, originalStack, key) {
return injectionError(injector, key, function () {
var /** @type {?} */ first = stringify(this.keys[0].token);
return getOriginalError(this).message + ": Error during instantiation of " + first + "!" + constructResolvingP... | [
"function",
"instantiationError",
"(",
"injector",
",",
"originalException",
",",
"originalStack",
",",
"key",
")",
"{",
"return",
"injectionError",
"(",
"injector",
",",
"key",
",",
"function",
"(",
")",
"{",
"var",
"/** @type {?} */",
"first",
"=",
"stringify"... | Thrown when a constructing type returns with an Error.
The `InstantiationError` class contains the original error plus the dependency graph which caused
this object to be instantiated.
### Example ([live demo](http://plnkr.co/edit/7aWYdcqTQsP0eNqEdUAf?p=preview))
```typescript
class A {
constructor() {
throw new Err... | [
"Thrown",
"when",
"a",
"constructing",
"type",
"returns",
"with",
"an",
"Error",
"."
] | 4e98e58e0d718a093cfe4d31ac03a21b3d1e1405 | https://github.com/arthurvaverko/ngx-highlight/blob/4e98e58e0d718a093cfe4d31ac03a21b3d1e1405/dist/vendor.bundle.js#L1541-L1546 |
40,640 | arthurvaverko/ngx-highlight | dist/vendor.bundle.js | templateVisitAll | function templateVisitAll(visitor, asts, context) {
if (context === void 0) { context = null; }
var /** @type {?} */ result = [];
var /** @type {?} */ visit = visitor.visit ?
function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :
function (ast) { return ast.v... | javascript | function templateVisitAll(visitor, asts, context) {
if (context === void 0) { context = null; }
var /** @type {?} */ result = [];
var /** @type {?} */ visit = visitor.visit ?
function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :
function (ast) { return ast.v... | [
"function",
"templateVisitAll",
"(",
"visitor",
",",
"asts",
",",
"context",
")",
"{",
"if",
"(",
"context",
"===",
"void",
"0",
")",
"{",
"context",
"=",
"null",
";",
"}",
"var",
"/** @type {?} */",
"result",
"=",
"[",
"]",
";",
"var",
"/** @type {?} */... | Visit every node in a list of {\@link TemplateAst}s with the given {\@link TemplateAstVisitor}.
@param {?} visitor
@param {?} asts
@param {?=} context
@return {?} | [
"Visit",
"every",
"node",
"in",
"a",
"list",
"of",
"{",
"\\"
] | 4e98e58e0d718a093cfe4d31ac03a21b3d1e1405 | https://github.com/arthurvaverko/ngx-highlight/blob/4e98e58e0d718a093cfe4d31ac03a21b3d1e1405/dist/vendor.bundle.js#L24668-L24681 |
40,641 | seeden/mongoose-hrbac | src/index.js | can | function can(rbac, action, resource, cb) {
// check existance of permission
rbac.getPermission(action, resource, (err, permission) => {
if (err) {
return cb(err);
}
if (!permission) {
return cb(null, false);
}
// check user additional permissions
if (indexOf(this.permissions, p... | javascript | function can(rbac, action, resource, cb) {
// check existance of permission
rbac.getPermission(action, resource, (err, permission) => {
if (err) {
return cb(err);
}
if (!permission) {
return cb(null, false);
}
// check user additional permissions
if (indexOf(this.permissions, p... | [
"function",
"can",
"(",
"rbac",
",",
"action",
",",
"resource",
",",
"cb",
")",
"{",
"// check existance of permission",
"rbac",
".",
"getPermission",
"(",
"action",
",",
"resource",
",",
"(",
"err",
",",
"permission",
")",
"=>",
"{",
"if",
"(",
"err",
"... | Check if user has assigned a specific permission
@param {RBAC} rbac Instance of RBAC
@param {String} action Name of action
@param {String} resource Name of resource
@return {Boolean} | [
"Check",
"if",
"user",
"has",
"assigned",
"a",
"specific",
"permission"
] | 4239f40635d3fead299b8721acfdb7145bc2f9e2 | https://github.com/seeden/mongoose-hrbac/blob/4239f40635d3fead299b8721acfdb7145bc2f9e2/src/index.js#L27-L52 |
40,642 | seeden/mongoose-hrbac | src/index.js | addPermission | function addPermission(rbac, action, resource, cb) {
rbac.getPermission(action, resource, (err, permission) => {
if (err) {
return cb(err);
}
if (!permission) {
return cb(new Error('Permission not exists'));
}
if (indexOf(this.permissions, permission.name) !== -1) {
return cb(n... | javascript | function addPermission(rbac, action, resource, cb) {
rbac.getPermission(action, resource, (err, permission) => {
if (err) {
return cb(err);
}
if (!permission) {
return cb(new Error('Permission not exists'));
}
if (indexOf(this.permissions, permission.name) !== -1) {
return cb(n... | [
"function",
"addPermission",
"(",
"rbac",
",",
"action",
",",
"resource",
",",
"cb",
")",
"{",
"rbac",
".",
"getPermission",
"(",
"action",
",",
"resource",
",",
"(",
"err",
",",
"permission",
")",
"=>",
"{",
"if",
"(",
"err",
")",
"{",
"return",
"cb... | Assign additional permissions to the user
@param {String|Array} permissions Array of permissions or string representing of permission
@param {Function} cb Callback | [
"Assign",
"additional",
"permissions",
"to",
"the",
"user"
] | 4239f40635d3fead299b8721acfdb7145bc2f9e2 | https://github.com/seeden/mongoose-hrbac/blob/4239f40635d3fead299b8721acfdb7145bc2f9e2/src/index.js#L59-L88 |
40,643 | seeden/mongoose-hrbac | src/index.js | hasRole | function hasRole(rbac, role, cb) {
if (!this.role) {
cb(null, false);
return this;
}
// check existance of permission
rbac.hasRole(this.role, role, cb);
return this;
} | javascript | function hasRole(rbac, role, cb) {
if (!this.role) {
cb(null, false);
return this;
}
// check existance of permission
rbac.hasRole(this.role, role, cb);
return this;
} | [
"function",
"hasRole",
"(",
"rbac",
",",
"role",
",",
"cb",
")",
"{",
"if",
"(",
"!",
"this",
".",
"role",
")",
"{",
"cb",
"(",
"null",
",",
"false",
")",
";",
"return",
"this",
";",
"}",
"// check existance of permission",
"rbac",
".",
"hasRole",
"(... | Check if user has assigned a specific role
@param {RBAC} rbac Instance of RBAC
@param {String} name Name of role
@return {Boolean} [description] | [
"Check",
"if",
"user",
"has",
"assigned",
"a",
"specific",
"role"
] | 4239f40635d3fead299b8721acfdb7145bc2f9e2 | https://github.com/seeden/mongoose-hrbac/blob/4239f40635d3fead299b8721acfdb7145bc2f9e2/src/index.js#L142-L151 |
40,644 | liorwohl/html5-simple-date-input-polyfill | html5-simple-date-input-polyfill.js | addcalendarExtenderToDateInputs | function addcalendarExtenderToDateInputs () {
//get and loop all the input[type=date]s in the page that dont have "haveCal" class yet
var dateInputs = document.querySelectorAll('input[type=date]:not(.haveCal)');
[].forEach.call(dateInputs, function (dateInput) {
//call calendarExtender function on the input
... | javascript | function addcalendarExtenderToDateInputs () {
//get and loop all the input[type=date]s in the page that dont have "haveCal" class yet
var dateInputs = document.querySelectorAll('input[type=date]:not(.haveCal)');
[].forEach.call(dateInputs, function (dateInput) {
//call calendarExtender function on the input
... | [
"function",
"addcalendarExtenderToDateInputs",
"(",
")",
"{",
"//get and loop all the input[type=date]s in the page that dont have \"haveCal\" class yet",
"var",
"dateInputs",
"=",
"document",
".",
"querySelectorAll",
"(",
"'input[type=date]:not(.haveCal)'",
")",
";",
"[",
"]",
"... | will add the calendarExtender to all inputs in the page | [
"will",
"add",
"the",
"calendarExtender",
"to",
"all",
"inputs",
"in",
"the",
"page"
] | 8882f82c9eb1ef3bff1fdc41a7fb3bb4730c0abe | https://github.com/liorwohl/html5-simple-date-input-polyfill/blob/8882f82c9eb1ef3bff1fdc41a7fb3bb4730c0abe/html5-simple-date-input-polyfill.js#L222-L231 |
40,645 | SamVerschueren/mongoose-seeder | index.js | function(data, done) {
try {
// Retrieve all the dependencies
_.forEach(data._dependencies || {}, function(value, key) {
if(this.sandbox[key] !== undefined) {
// Do nothing if the dependency is already defined
... | javascript | function(data, done) {
try {
// Retrieve all the dependencies
_.forEach(data._dependencies || {}, function(value, key) {
if(this.sandbox[key] !== undefined) {
// Do nothing if the dependency is already defined
... | [
"function",
"(",
"data",
",",
"done",
")",
"{",
"try",
"{",
"// Retrieve all the dependencies",
"_",
".",
"forEach",
"(",
"data",
".",
"_dependencies",
"||",
"{",
"}",
",",
"function",
"(",
"value",
",",
"key",
")",
"{",
"if",
"(",
"this",
".",
"sandbo... | The internal method for seeding the database.
@param {Object} data The data that should be seeded.
@param {Function} done The method that should be called when the seeding is done | [
"The",
"internal",
"method",
"for",
"seeding",
"the",
"database",
"."
] | ea08d510228a76e5eafa08e1f94cbe8cf0a6614d | https://github.com/SamVerschueren/mongoose-seeder/blob/ea08d510228a76e5eafa08e1f94cbe8cf0a6614d/index.js#L37-L121 | |
40,646 | SamVerschueren/mongoose-seeder | index.js | function(ref) {
var keys = ref.split('.'),
key = keys.shift(),
result = _this.result[key];
if(!result) {
// If the result does not exist, return an empty
throw new TypeError('Could not read property \'' + key + '\' from undefined')... | javascript | function(ref) {
var keys = ref.split('.'),
key = keys.shift(),
result = _this.result[key];
if(!result) {
// If the result does not exist, return an empty
throw new TypeError('Could not read property \'' + key + '\' from undefined')... | [
"function",
"(",
"ref",
")",
"{",
"var",
"keys",
"=",
"ref",
".",
"split",
"(",
"'.'",
")",
",",
"key",
"=",
"keys",
".",
"shift",
"(",
")",
",",
"result",
"=",
"_this",
".",
"result",
"[",
"key",
"]",
";",
"if",
"(",
"!",
"result",
")",
"{",... | This method searches for the _id associated with the object represented
by the reference provided.
@param {String} ref The string representation of the reference.
@return {String} The reference to the object. | [
"This",
"method",
"searches",
"for",
"the",
"_id",
"associated",
"with",
"the",
"object",
"represented",
"by",
"the",
"reference",
"provided",
"."
] | ea08d510228a76e5eafa08e1f94cbe8cf0a6614d | https://github.com/SamVerschueren/mongoose-seeder/blob/ea08d510228a76e5eafa08e1f94cbe8cf0a6614d/index.js#L187-L214 | |
40,647 | SamVerschueren/mongoose-seeder | index.js | function(data, options, callback) {
if(_.isFunction(options)) {
// Set the correct callback function
callback = options;
options = {};
}
// Create a deferred object for the promise
var def = Q.defer();
// If no... | javascript | function(data, options, callback) {
if(_.isFunction(options)) {
// Set the correct callback function
callback = options;
options = {};
}
// Create a deferred object for the promise
var def = Q.defer();
// If no... | [
"function",
"(",
"data",
",",
"options",
",",
"callback",
")",
"{",
"if",
"(",
"_",
".",
"isFunction",
"(",
"options",
")",
")",
"{",
"// Set the correct callback function",
"callback",
"=",
"options",
";",
"options",
"=",
"{",
"}",
";",
"}",
"// Create a ... | Start seeding the database.
@param {Object} data The data object that should be inserted in the database.
@param {Object} options The options object to provide extras.
@param {Function} callback The method that should be called when the seeding is done. | [
"Start",
"seeding",
"the",
"database",
"."
] | ea08d510228a76e5eafa08e1f94cbe8cf0a6614d | https://github.com/SamVerschueren/mongoose-seeder/blob/ea08d510228a76e5eafa08e1f94cbe8cf0a6614d/index.js#L225-L291 | |
40,648 | SamVerschueren/mongoose-seeder | index.js | done | function done(err, result) {
if(err) {
def.reject(err);
callback(err);
return;
}
def.resolve(result);
callback(undefined, result);
} | javascript | function done(err, result) {
if(err) {
def.reject(err);
callback(err);
return;
}
def.resolve(result);
callback(undefined, result);
} | [
"function",
"done",
"(",
"err",
",",
"result",
")",
"{",
"if",
"(",
"err",
")",
"{",
"def",
".",
"reject",
"(",
"err",
")",
";",
"callback",
"(",
"err",
")",
";",
"return",
";",
"}",
"def",
".",
"resolve",
"(",
"result",
")",
";",
"callback",
"... | This method will be invoked when the seeding is completed or when something
went wrong. This method will then call the callback and rejects or resolves
the promise object. This way, users of the library can use both.
@param {*} err [description]
@param {Object} result [description] | [
"This",
"method",
"will",
"be",
"invoked",
"when",
"the",
"seeding",
"is",
"completed",
"or",
"when",
"something",
"went",
"wrong",
".",
"This",
"method",
"will",
"then",
"call",
"the",
"callback",
"and",
"rejects",
"or",
"resolves",
"the",
"promise",
"objec... | ea08d510228a76e5eafa08e1f94cbe8cf0a6614d | https://github.com/SamVerschueren/mongoose-seeder/blob/ea08d510228a76e5eafa08e1f94cbe8cf0a6614d/index.js#L278-L287 |
40,649 | github/webpack-config-github | webpack.config.js | proxyConfig | function proxyConfig(path) {
const config = {}
const {endpointsExtension} = tryGetGraphQLProjectConfig()
if (endpointsExtension) {
const graphqlEndpoint = endpointsExtension.getEndpoint()
const {url: target, headers} = graphqlEndpoint
const changeOrigin = true
const pathRewrite = {}
pathRew... | javascript | function proxyConfig(path) {
const config = {}
const {endpointsExtension} = tryGetGraphQLProjectConfig()
if (endpointsExtension) {
const graphqlEndpoint = endpointsExtension.getEndpoint()
const {url: target, headers} = graphqlEndpoint
const changeOrigin = true
const pathRewrite = {}
pathRew... | [
"function",
"proxyConfig",
"(",
"path",
")",
"{",
"const",
"config",
"=",
"{",
"}",
"const",
"{",
"endpointsExtension",
"}",
"=",
"tryGetGraphQLProjectConfig",
"(",
")",
"if",
"(",
"endpointsExtension",
")",
"{",
"const",
"graphqlEndpoint",
"=",
"endpointsExtens... | Get webpack proxy configuration as per .graphqlconfig. | [
"Get",
"webpack",
"proxy",
"configuration",
"as",
"per",
".",
"graphqlconfig",
"."
] | cd56f9465db31ef6c0c2c07077ee2c3d25f97554 | https://github.com/github/webpack-config-github/blob/cd56f9465db31ef6c0c2c07077ee2c3d25f97554/webpack.config.js#L315-L332 |
40,650 | assemble/buttons | templates/helpers/helper-prettify.js | function(source, options) {
try {
return prettify(source, options);
} catch (e) {
console.error(e);
console.warn('HTML beautification failed.');
}
} | javascript | function(source, options) {
try {
return prettify(source, options);
} catch (e) {
console.error(e);
console.warn('HTML beautification failed.');
}
} | [
"function",
"(",
"source",
",",
"options",
")",
"{",
"try",
"{",
"return",
"prettify",
"(",
"source",
",",
"options",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"console",
".",
"error",
"(",
"e",
")",
";",
"console",
".",
"warn",
"(",
"'HTML beaut... | Format HTML with js-beautify, pass in options.
@param {String} source [The un-prettified HTML.]
@param {Object} options [Object of options passed to js-beautify.]
@returns {String} [Stunning HTML.] | [
"Format",
"HTML",
"with",
"js",
"-",
"beautify",
"pass",
"in",
"options",
"."
] | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/templates/helpers/helper-prettify.js#L56-L63 | |
40,651 | assemble/buttons | _demo/assets/js/list-scroll.js | refresh | function refresh() {
if( active ) {
requestAnimFrame( refresh );
for( var i = 0, len = lists.length; i < len; i++ ) {
lists[i].update();
}
}
} | javascript | function refresh() {
if( active ) {
requestAnimFrame( refresh );
for( var i = 0, len = lists.length; i < len; i++ ) {
lists[i].update();
}
}
} | [
"function",
"refresh",
"(",
")",
"{",
"if",
"(",
"active",
")",
"{",
"requestAnimFrame",
"(",
"refresh",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"lists",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"lists... | Updates all currently bound lists. | [
"Updates",
"all",
"currently",
"bound",
"lists",
"."
] | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/_demo/assets/js/list-scroll.js#L27-L35 |
40,652 | assemble/buttons | _demo/assets/js/list-scroll.js | add | function add( element, options ) {
// Only allow ul/ol
if( !element.nodeName || /^(ul|li)$/i.test( element.nodeName ) === false ) {
return false;
}
// Delete duplicates (but continue and re-bind this list to get the
// latest properties and list items)
else if( contains( element ) ) {
... | javascript | function add( element, options ) {
// Only allow ul/ol
if( !element.nodeName || /^(ul|li)$/i.test( element.nodeName ) === false ) {
return false;
}
// Delete duplicates (but continue and re-bind this list to get the
// latest properties and list items)
else if( contains( element ) ) {
... | [
"function",
"add",
"(",
"element",
",",
"options",
")",
"{",
"// Only allow ul/ol",
"if",
"(",
"!",
"element",
".",
"nodeName",
"||",
"/",
"^(ul|li)$",
"/",
"i",
".",
"test",
"(",
"element",
".",
"nodeName",
")",
"===",
"false",
")",
"{",
"return",
"fa... | Starts monitoring a list and applies classes to each of
its contained elements based on its position relative to
the list's viewport.
@param {HTMLElement} element
@param {Object} options Additional arguments;
- live; Flags if the DOM should be repeatedly checked for changes
repeatedly. Useful if the list contents is c... | [
"Starts",
"monitoring",
"a",
"list",
"and",
"applies",
"classes",
"to",
"each",
"of",
"its",
"contained",
"elements",
"based",
"on",
"its",
"position",
"relative",
"to",
"the",
"list",
"s",
"viewport",
"."
] | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/_demo/assets/js/list-scroll.js#L48-L79 |
40,653 | assemble/buttons | _demo/assets/js/list-scroll.js | remove | function remove( element ) {
for( var i = 0; i < lists.length; i++ ) {
var list = lists[i];
if( list.element == element ) {
list.destroy();
lists.splice( i, 1 );
i--;
}
}
// Stopped refreshing if the last list was removed
if( lists.length === 0 ) {
activ... | javascript | function remove( element ) {
for( var i = 0; i < lists.length; i++ ) {
var list = lists[i];
if( list.element == element ) {
list.destroy();
lists.splice( i, 1 );
i--;
}
}
// Stopped refreshing if the last list was removed
if( lists.length === 0 ) {
activ... | [
"function",
"remove",
"(",
"element",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"lists",
".",
"length",
";",
"i",
"++",
")",
"{",
"var",
"list",
"=",
"lists",
"[",
"i",
"]",
";",
"if",
"(",
"list",
".",
"element",
"==",
"elem... | Stops monitoring a list element and removes any classes
that were applied to its list items.
@param {HTMLElement} element | [
"Stops",
"monitoring",
"a",
"list",
"element",
"and",
"removes",
"any",
"classes",
"that",
"were",
"applied",
"to",
"its",
"list",
"items",
"."
] | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/_demo/assets/js/list-scroll.js#L87-L102 |
40,654 | assemble/buttons | _demo/assets/js/list-scroll.js | contains | function contains( element ) {
for( var i = 0, len = lists.length; i < len; i++ ) {
if( lists[i].element == element ) {
return true;
}
}
return false;
} | javascript | function contains( element ) {
for( var i = 0, len = lists.length; i < len; i++ ) {
if( lists[i].element == element ) {
return true;
}
}
return false;
} | [
"function",
"contains",
"(",
"element",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"lists",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"if",
"(",
"lists",
"[",
"i",
"]",
".",
"element",
"==",
"element",
"... | Checks if the specified element has already been bound. | [
"Checks",
"if",
"the",
"specified",
"element",
"has",
"already",
"been",
"bound",
"."
] | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/_demo/assets/js/list-scroll.js#L107-L114 |
40,655 | assemble/buttons | _demo/assets/js/list-scroll.js | batch | function batch( target, method, options ) {
var i, len;
// Selector
if( typeof target === 'string' ) {
var targets = document.querySelectorAll( target );
for( i = 0, len = targets.length; i < len; i++ ) {
method.call( null, targets[i], options );
}
}
// Array (jQuery)
... | javascript | function batch( target, method, options ) {
var i, len;
// Selector
if( typeof target === 'string' ) {
var targets = document.querySelectorAll( target );
for( i = 0, len = targets.length; i < len; i++ ) {
method.call( null, targets[i], options );
}
}
// Array (jQuery)
... | [
"function",
"batch",
"(",
"target",
",",
"method",
",",
"options",
")",
"{",
"var",
"i",
",",
"len",
";",
"// Selector",
"if",
"(",
"typeof",
"target",
"===",
"'string'",
")",
"{",
"var",
"targets",
"=",
"document",
".",
"querySelectorAll",
"(",
"target"... | Calls 'method' for each DOM element discovered in
'target'.
@param target String selector / array of UL elements /
jQuery object / single UL element
@param method A function to call for each element target | [
"Calls",
"method",
"for",
"each",
"DOM",
"element",
"discovered",
"in",
"target",
"."
] | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/_demo/assets/js/list-scroll.js#L124-L148 |
40,656 | assemble/buttons | _demo/assets/js/list-scroll.js | TouchList | function TouchList( element ) {
this.element = element;
this.element.style.overflow = 'hidden';
this.top = {
value: 0,
natural: 0
};
this.touch = {
value: 0,
offset: 0,
start: 0,
previous: 0,
lastMove: Date.now(),
accellerateTimeout: -1,
isAcce... | javascript | function TouchList( element ) {
this.element = element;
this.element.style.overflow = 'hidden';
this.top = {
value: 0,
natural: 0
};
this.touch = {
value: 0,
offset: 0,
start: 0,
previous: 0,
lastMove: Date.now(),
accellerateTimeout: -1,
isAcce... | [
"function",
"TouchList",
"(",
"element",
")",
"{",
"this",
".",
"element",
"=",
"element",
";",
"this",
".",
"element",
".",
"style",
".",
"overflow",
"=",
"'hidden'",
";",
"this",
".",
"top",
"=",
"{",
"value",
":",
"0",
",",
"natural",
":",
"0",
... | A list specifically for touch devices. Simulates the style
of scrolling you'd see on a touch device but does not rely
on webkit-overflow-scrolling since that makes it impossible
to read the up-to-date scroll position. | [
"A",
"list",
"specifically",
"for",
"touch",
"devices",
".",
"Simulates",
"the",
"style",
"of",
"scrolling",
"you",
"d",
"see",
"on",
"a",
"touch",
"device",
"but",
"does",
"not",
"rely",
"on",
"webkit",
"-",
"overflow",
"-",
"scrolling",
"since",
"that",
... | 7b02517713aa316ae7e9d7c23b46a66cde6c7834 | https://github.com/assemble/buttons/blob/7b02517713aa316ae7e9d7c23b46a66cde6c7834/_demo/assets/js/list-scroll.js#L252-L273 |
40,657 | calmh/yardstick | bin/yardstick.js | displayMetrics | function displayMetrics(file) {
var prefix = '';
var code = fs.readFileSync(file, 'utf-8');
// We remove any shebang at the start of the file since that isn't valid
// Javascript and will trip up the parser.
code = code.replace(/^#!.*\n/, '');
var metrics = complexity(code);
// Walk the... | javascript | function displayMetrics(file) {
var prefix = '';
var code = fs.readFileSync(file, 'utf-8');
// We remove any shebang at the start of the file since that isn't valid
// Javascript and will trip up the parser.
code = code.replace(/^#!.*\n/, '');
var metrics = complexity(code);
// Walk the... | [
"function",
"displayMetrics",
"(",
"file",
")",
"{",
"var",
"prefix",
"=",
"''",
";",
"var",
"code",
"=",
"fs",
".",
"readFileSync",
"(",
"file",
",",
"'utf-8'",
")",
";",
"// We remove any shebang at the start of the file since that isn't valid",
"// Javascript and w... | Analyze a file and add it's metrics to the table. | [
"Analyze",
"a",
"file",
"and",
"add",
"it",
"s",
"metrics",
"to",
"the",
"table",
"."
] | 3d3a8c94532c523a3b8b935bacb1fa444dcd8b3c | https://github.com/calmh/yardstick/blob/3d3a8c94532c523a3b8b935bacb1fa444dcd8b3c/bin/yardstick.js#L22-L53 |
40,658 | calmh/yardstick | bin/yardstick.js | walk | function walk(data, name) {
// Fade out anonymous functions.
if (name.indexOf('anon@') === 0) {
name = name.grey;
}
rows.push([ prefix + name, data.ecc, data.arity, data.codeLines, data.commentLines, Math.round(100 * data.commentLines / data.codeLines) ]);
// Add t... | javascript | function walk(data, name) {
// Fade out anonymous functions.
if (name.indexOf('anon@') === 0) {
name = name.grey;
}
rows.push([ prefix + name, data.ecc, data.arity, data.codeLines, data.commentLines, Math.round(100 * data.commentLines / data.codeLines) ]);
// Add t... | [
"function",
"walk",
"(",
"data",
",",
"name",
")",
"{",
"// Fade out anonymous functions.",
"if",
"(",
"name",
".",
"indexOf",
"(",
"'anon@'",
")",
"===",
"0",
")",
"{",
"name",
"=",
"name",
".",
"grey",
";",
"}",
"rows",
".",
"push",
"(",
"[",
"pref... | Walk the metrics structure and add each member to the table rows. | [
"Walk",
"the",
"metrics",
"structure",
"and",
"add",
"each",
"member",
"to",
"the",
"table",
"rows",
"."
] | 3d3a8c94532c523a3b8b935bacb1fa444dcd8b3c | https://github.com/calmh/yardstick/blob/3d3a8c94532c523a3b8b935bacb1fa444dcd8b3c/bin/yardstick.js#L36-L51 |
40,659 | homerjam/angular-scroll-magic | bower_components/gsap/src/uncompressed/TweenMax.js | function(v) {
var t = this.t, //refers to the element's style property
filters = t.filter || _getStyle(this.data, "filter") || "",
val = (this.s + this.c * v) | 0,
skip;
if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacit... | javascript | function(v) {
var t = this.t, //refers to the element's style property
filters = t.filter || _getStyle(this.data, "filter") || "",
val = (this.s + this.c * v) | 0,
skip;
if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacit... | [
"function",
"(",
"v",
")",
"{",
"var",
"t",
"=",
"this",
".",
"t",
",",
"//refers to the element's style property",
"filters",
"=",
"t",
".",
"filter",
"||",
"_getStyle",
"(",
"this",
".",
"data",
",",
"\"filter\"",
")",
"||",
"\"\"",
",",
"val",
"=",
... | opacity-related | [
"opacity",
"-",
"related"
] | 82b2a1d14497fa74d060be53b0e042f1c496351b | https://github.com/homerjam/angular-scroll-magic/blob/82b2a1d14497fa74d060be53b0e042f1c496351b/bower_components/gsap/src/uncompressed/TweenMax.js#L4488-L4514 | |
40,660 | hashchange/jquery.documentsize | dist/jquery.documentsize.js | isVisualViewport | function isVisualViewport ( name ) {
var viewport = isString( name ) && name.toLowerCase();
if ( name && !viewport ) throw new Error( "Invalid viewport option: " + name );
if ( viewport && viewport !== "visual" && viewport !== "layout" ) throw new Error( "Invalid viewport name: " + name );
... | javascript | function isVisualViewport ( name ) {
var viewport = isString( name ) && name.toLowerCase();
if ( name && !viewport ) throw new Error( "Invalid viewport option: " + name );
if ( viewport && viewport !== "visual" && viewport !== "layout" ) throw new Error( "Invalid viewport name: " + name );
... | [
"function",
"isVisualViewport",
"(",
"name",
")",
"{",
"var",
"viewport",
"=",
"isString",
"(",
"name",
")",
"&&",
"name",
".",
"toLowerCase",
"(",
")",
";",
"if",
"(",
"name",
"&&",
"!",
"viewport",
")",
"throw",
"new",
"Error",
"(",
"\"Invalid viewport... | Checks if the argument is the name of the visual viewport. The check is case-insensitive.
Expects a string. Tolerates falsy values, returning false then (argument is not naming the visual viewport).
Throws an error for everything else. Also throws an error if the viewport name is a string but not recognized
(typo aler... | [
"Checks",
"if",
"the",
"argument",
"is",
"the",
"name",
"of",
"the",
"visual",
"viewport",
".",
"The",
"check",
"is",
"case",
"-",
"insensitive",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/dist/jquery.documentsize.js#L340-L347 |
40,661 | hashchange/jquery.documentsize | dist/jquery.documentsize.js | restoreGlobalDocument | function restoreGlobalDocument ( previousState ) {
if ( previousState.documentElement.modified ) document.documentElement.style.overflowX = previousState.documentElement.styleOverflowX;
if ( previousState.body.modified ) document.body.style.overflowX = previousState.body.styleOverflowX;
} | javascript | function restoreGlobalDocument ( previousState ) {
if ( previousState.documentElement.modified ) document.documentElement.style.overflowX = previousState.documentElement.styleOverflowX;
if ( previousState.body.modified ) document.body.style.overflowX = previousState.body.styleOverflowX;
} | [
"function",
"restoreGlobalDocument",
"(",
"previousState",
")",
"{",
"if",
"(",
"previousState",
".",
"documentElement",
".",
"modified",
")",
"document",
".",
"documentElement",
".",
"style",
".",
"overflowX",
"=",
"previousState",
".",
"documentElement",
".",
"s... | Restores the body and documentElement styles to their initial state, which is passed in as an argument. Works
with the global document.
Used only if iframe creation or access has failed for some reason.
@param {Object} previousState the initial state, as returned by prepareGlobalDocument() | [
"Restores",
"the",
"body",
"and",
"documentElement",
"styles",
"to",
"their",
"initial",
"state",
"which",
"is",
"passed",
"in",
"as",
"an",
"argument",
".",
"Works",
"with",
"the",
"global",
"document",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/dist/jquery.documentsize.js#L560-L565 |
40,662 | hashchange/jquery.documentsize | dist/jquery.documentsize.js | guessDocumentSize | function guessDocumentSize( dimension, _document ) {
var ddE = _document.documentElement;
return Math.max(
ddE.body[ "scroll" + dimension ], _document[ "scroll" + dimension ],
ddE.body[ "offset" + dimension ], _document[ "offset" + dimension ],
_document[ "client" + ... | javascript | function guessDocumentSize( dimension, _document ) {
var ddE = _document.documentElement;
return Math.max(
ddE.body[ "scroll" + dimension ], _document[ "scroll" + dimension ],
ddE.body[ "offset" + dimension ], _document[ "offset" + dimension ],
_document[ "client" + ... | [
"function",
"guessDocumentSize",
"(",
"dimension",
",",
"_document",
")",
"{",
"var",
"ddE",
"=",
"_document",
".",
"documentElement",
";",
"return",
"Math",
".",
"max",
"(",
"ddE",
".",
"body",
"[",
"\"scroll\"",
"+",
"dimension",
"]",
",",
"_document",
"... | Returns a best guess for the window width or height. Used as a fallback for unsupported browsers which are too
broken to even run the feature test.
The conventional jQuery method of guessing the document size is used here: every conceivable value is queried and
the largest one is picked.
@param {string} dimension ... | [
"Returns",
"a",
"best",
"guess",
"for",
"the",
"window",
"width",
"or",
"height",
".",
"Used",
"as",
"a",
"fallback",
"for",
"unsupported",
"browsers",
"which",
"are",
"too",
"broken",
"to",
"even",
"run",
"the",
"feature",
"test",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/dist/jquery.documentsize.js#L577-L585 |
40,663 | hashchange/jquery.documentsize | dist/jquery.documentsize.js | getWindowInnerSize | function getWindowInnerSize ( dimension, _window ) {
var size = ( _window || window ).visualViewport ?
( _window || window ).visualViewport[ dimension.toLowerCase() ] :
( _window || window )[ "inner" + dimension];
// Check for fractions. Exclude undefined return... | javascript | function getWindowInnerSize ( dimension, _window ) {
var size = ( _window || window ).visualViewport ?
( _window || window ).visualViewport[ dimension.toLowerCase() ] :
( _window || window )[ "inner" + dimension];
// Check for fractions. Exclude undefined return... | [
"function",
"getWindowInnerSize",
"(",
"dimension",
",",
"_window",
")",
"{",
"var",
"size",
"=",
"(",
"_window",
"||",
"window",
")",
".",
"visualViewport",
"?",
"(",
"_window",
"||",
"window",
")",
".",
"visualViewport",
"[",
"dimension",
".",
"toLowerCase... | Returns window.visualViewport.width if available, or window.innerWidth otherwise, for width. Likewise, it
returns window.visualViewport.height or window.innerHeight for height. The dimension argument determines whether
width or height is returned.
Along the way, the return value is examined to see if the browser suppo... | [
"Returns",
"window",
".",
"visualViewport",
".",
"width",
"if",
"available",
"or",
"window",
".",
"innerWidth",
"otherwise",
"for",
"width",
".",
"Likewise",
"it",
"returns",
"window",
".",
"visualViewport",
".",
"height",
"or",
"window",
".",
"innerHeight",
"... | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/dist/jquery.documentsize.js#L634-L642 |
40,664 | hashchange/jquery.documentsize | dist/jquery.documentsize.js | getIEVersion | function getIEVersion () {
var userAgent, userAgentTestRx;
if ( ieVersion === undefined ) {
ieVersion = false;
userAgent = navigator && navigator.userAgent;
if ( navigator && navigator.appName === "Microsoft Internet Explorer" && userAgent ) {
userA... | javascript | function getIEVersion () {
var userAgent, userAgentTestRx;
if ( ieVersion === undefined ) {
ieVersion = false;
userAgent = navigator && navigator.userAgent;
if ( navigator && navigator.appName === "Microsoft Internet Explorer" && userAgent ) {
userA... | [
"function",
"getIEVersion",
"(",
")",
"{",
"var",
"userAgent",
",",
"userAgentTestRx",
";",
"if",
"(",
"ieVersion",
"===",
"undefined",
")",
"{",
"ieVersion",
"=",
"false",
";",
"userAgent",
"=",
"navigator",
"&&",
"navigator",
".",
"userAgent",
";",
"if",
... | Returns the IE version, or false if the browser is not IE.
The result is determined by browser sniffing, rather than a test tailored to the use case. The function must only
be called as a last resort, for scenarios where there is no alternative to browser sniffing.
These scenarios include:
- Preventing IE6 and IE7 f... | [
"Returns",
"the",
"IE",
"version",
"or",
"false",
"if",
"the",
"browser",
"is",
"not",
"IE",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/dist/jquery.documentsize.js#L739-L755 |
40,665 | hashchange/jquery.documentsize | demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js | function() {
this.$container = $(this.options.buttonContainer);
this.$container.on('show.bs.dropdown', this.options.onDropdownShow);
this.$container.on('hide.bs.dropdown', this.options.onDropdownHide);
this.$container.on('shown.bs.dropdown', this.options.onDropdownShown);... | javascript | function() {
this.$container = $(this.options.buttonContainer);
this.$container.on('show.bs.dropdown', this.options.onDropdownShow);
this.$container.on('hide.bs.dropdown', this.options.onDropdownHide);
this.$container.on('shown.bs.dropdown', this.options.onDropdownShown);... | [
"function",
"(",
")",
"{",
"this",
".",
"$container",
"=",
"$",
"(",
"this",
".",
"options",
".",
"buttonContainer",
")",
";",
"this",
".",
"$container",
".",
"on",
"(",
"'show.bs.dropdown'",
",",
"this",
".",
"options",
".",
"onDropdownShow",
")",
";",
... | Builds the container of the multiselect. | [
"Builds",
"the",
"container",
"of",
"the",
"multiselect",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js#L351-L357 | |
40,666 | hashchange/jquery.documentsize | demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js | function() {
if (typeof this.options.selectAllValue === 'number') {
this.options.selectAllValue = this.options.selectAllValue.toString();
}
var alreadyHasSelectAll = this.hasSelectAll();
if (!alreadyHasSelectAll && this.options.includeSelectAllOption && ... | javascript | function() {
if (typeof this.options.selectAllValue === 'number') {
this.options.selectAllValue = this.options.selectAllValue.toString();
}
var alreadyHasSelectAll = this.hasSelectAll();
if (!alreadyHasSelectAll && this.options.includeSelectAllOption && ... | [
"function",
"(",
")",
"{",
"if",
"(",
"typeof",
"this",
".",
"options",
".",
"selectAllValue",
"===",
"'number'",
")",
"{",
"this",
".",
"options",
".",
"selectAllValue",
"=",
"this",
".",
"options",
".",
"selectAllValue",
".",
"toString",
"(",
")",
";",... | Build the selct all.
Checks if a select all has already been created. | [
"Build",
"the",
"selct",
"all",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js#L778-L821 | |
40,667 | hashchange/jquery.documentsize | demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js | function (justVisible) {
var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
if(justVisible) {
var visibleCheckboxes = $("li input[type='checkbox']:not(:disabled)", this.$ul).filter(":visible");
visibleCheckboxes.prop('checked', false);
... | javascript | function (justVisible) {
var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
if(justVisible) {
var visibleCheckboxes = $("li input[type='checkbox']:not(:disabled)", this.$ul).filter(":visible");
visibleCheckboxes.prop('checked', false);
... | [
"function",
"(",
"justVisible",
")",
"{",
"var",
"justVisible",
"=",
"typeof",
"justVisible",
"===",
"'undefined'",
"?",
"true",
":",
"justVisible",
";",
"if",
"(",
"justVisible",
")",
"{",
"var",
"visibleCheckboxes",
"=",
"$",
"(",
"\"li input[type='checkbox']:... | Deselects all options.
If justVisible is true or not specified, only visible options are deselected.
@param {Boolean} justVisible | [
"Deselects",
"all",
"options",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js#L1130-L1157 | |
40,668 | hashchange/jquery.documentsize | demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js | function() {
this.$ul.html('');
// Important to distinguish between radios and checkboxes.
this.options.multiple = this.$select.attr('multiple') === "multiple";
this.buildSelectAll();
this.buildDropdownOptions();
this.buildFilter();
... | javascript | function() {
this.$ul.html('');
// Important to distinguish between radios and checkboxes.
this.options.multiple = this.$select.attr('multiple') === "multiple";
this.buildSelectAll();
this.buildDropdownOptions();
this.buildFilter();
... | [
"function",
"(",
")",
"{",
"this",
".",
"$ul",
".",
"html",
"(",
"''",
")",
";",
"// Important to distinguish between radios and checkboxes.",
"this",
".",
"options",
".",
"multiple",
"=",
"this",
".",
"$select",
".",
"attr",
"(",
"'multiple'",
")",
"===",
"... | Rebuild the plugin.
Rebuilds the dropdown, the filter and the select all option. | [
"Rebuild",
"the",
"plugin",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js#L1164-L1187 | |
40,669 | hashchange/jquery.documentsize | demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js | function() {
if (this.hasSelectAll()) {
var allBoxes = $("li:not(.multiselect-item):not(.filter-hidden) input:enabled", this.$ul);
var allBoxesLength = allBoxes.length;
var checkedBoxesLength = allBoxes.filter(":checked").length;
var selectAllL... | javascript | function() {
if (this.hasSelectAll()) {
var allBoxes = $("li:not(.multiselect-item):not(.filter-hidden) input:enabled", this.$ul);
var allBoxesLength = allBoxes.length;
var checkedBoxesLength = allBoxes.filter(":checked").length;
var selectAllL... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"hasSelectAll",
"(",
")",
")",
"{",
"var",
"allBoxes",
"=",
"$",
"(",
"\"li:not(.multiselect-item):not(.filter-hidden) input:enabled\"",
",",
"this",
".",
"$ul",
")",
";",
"var",
"allBoxesLength",
"=",
"allBox... | Updates the select all checkbox based on the currently displayed and selected checkboxes. | [
"Updates",
"the",
"select",
"all",
"checkbox",
"based",
"on",
"the",
"currently",
"displayed",
"and",
"selected",
"checkboxes",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js#L1283-L1301 | |
40,670 | hashchange/jquery.documentsize | demo/load-event/js/libs/detectizr/detectizr-2.2.0.js | extend | function extend(obj, extObj) {
var a, b, i;
if (arguments.length > 2) {
for (a = 1, b = arguments.length; a < b; a += 1) {
extend(obj, arguments[a]);
}
} else {
for (i in extObj) {
if (extObj.hasOwnProperty(i)) {
... | javascript | function extend(obj, extObj) {
var a, b, i;
if (arguments.length > 2) {
for (a = 1, b = arguments.length; a < b; a += 1) {
extend(obj, arguments[a]);
}
} else {
for (i in extObj) {
if (extObj.hasOwnProperty(i)) {
... | [
"function",
"extend",
"(",
"obj",
",",
"extObj",
")",
"{",
"var",
"a",
",",
"b",
",",
"i",
";",
"if",
"(",
"arguments",
".",
"length",
">",
"2",
")",
"{",
"for",
"(",
"a",
"=",
"1",
",",
"b",
"=",
"arguments",
".",
"length",
";",
"a",
"<",
... | Create Global "extend" method, so Detectizr does not need jQuery.extend | [
"Create",
"Global",
"extend",
"method",
"so",
"Detectizr",
"does",
"not",
"need",
"jQuery",
".",
"extend"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/detectizr/detectizr-2.2.0.js#L59-L73 |
40,671 | hashchange/jquery.documentsize | demo/load-event/js/libs/detectizr/detectizr-2.2.0.js | toCamel | function toCamel(string) {
if (string === null || string === undefined) {
return "";
}
return String(string).replace(/((\s|\-|\.)+[a-z0-9])/g, function($1) {
return $1.toUpperCase().replace(/(\s|\-|\.)/g, "");
});
} | javascript | function toCamel(string) {
if (string === null || string === undefined) {
return "";
}
return String(string).replace(/((\s|\-|\.)+[a-z0-9])/g, function($1) {
return $1.toUpperCase().replace(/(\s|\-|\.)/g, "");
});
} | [
"function",
"toCamel",
"(",
"string",
")",
"{",
"if",
"(",
"string",
"===",
"null",
"||",
"string",
"===",
"undefined",
")",
"{",
"return",
"\"\"",
";",
"}",
"return",
"String",
"(",
"string",
")",
".",
"replace",
"(",
"/",
"((\\s|\\-|\\.)+[a-z0-9])",
"/... | convert string to camelcase | [
"convert",
"string",
"to",
"camelcase"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/detectizr/detectizr-2.2.0.js#L96-L103 |
40,672 | hashchange/jquery.documentsize | demo/load-event/js/libs/detectizr/detectizr-2.2.0.js | removeClass | function removeClass(element, value) {
var class2remove = value || "",
cur = element.nodeType === 1 && (element.className ? (" " + element.className + " ").replace(rclass, " ") : "");
if (cur) {
while (cur.indexOf(" " + class2remove + " ") >= 0) {
cur = cur.replac... | javascript | function removeClass(element, value) {
var class2remove = value || "",
cur = element.nodeType === 1 && (element.className ? (" " + element.className + " ").replace(rclass, " ") : "");
if (cur) {
while (cur.indexOf(" " + class2remove + " ") >= 0) {
cur = cur.replac... | [
"function",
"removeClass",
"(",
"element",
",",
"value",
")",
"{",
"var",
"class2remove",
"=",
"value",
"||",
"\"\"",
",",
"cur",
"=",
"element",
".",
"nodeType",
"===",
"1",
"&&",
"(",
"element",
".",
"className",
"?",
"(",
"\" \"",
"+",
"element",
".... | removeClass function inspired from jQuery.removeClass | [
"removeClass",
"function",
"inspired",
"from",
"jQuery",
".",
"removeClass"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/detectizr/detectizr-2.2.0.js#L106-L115 |
40,673 | hashchange/jquery.documentsize | demo/load-event/js/libs/detectizr/detectizr-2.2.0.js | setVersion | function setVersion(versionType, versionFull) {
versionType.version = versionFull;
var versionArray = versionFull.split(".");
if (versionArray.length > 0) {
versionArray = versionArray.reverse();
versionType.major = versionArray.pop();
if (versionArray.length ... | javascript | function setVersion(versionType, versionFull) {
versionType.version = versionFull;
var versionArray = versionFull.split(".");
if (versionArray.length > 0) {
versionArray = versionArray.reverse();
versionType.major = versionArray.pop();
if (versionArray.length ... | [
"function",
"setVersion",
"(",
"versionType",
",",
"versionFull",
")",
"{",
"versionType",
".",
"version",
"=",
"versionFull",
";",
"var",
"versionArray",
"=",
"versionFull",
".",
"split",
"(",
"\".\"",
")",
";",
"if",
"(",
"versionArray",
".",
"length",
">"... | set version based on versionFull | [
"set",
"version",
"based",
"on",
"versionFull"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/detectizr/detectizr-2.2.0.js#L149-L169 |
40,674 | hashchange/jquery.documentsize | spec/helpers/measurement.js | getBoundingClientRectCompat | function getBoundingClientRectCompat ( elem ) {
var elemRect = elem.getBoundingClientRect();
if ( elemRect.width === undefined || elemRect.height === undefined ) {
// Fix for IE8
elemRect = {
top: elemRect.top,
left: elemRect.left,
bottom: elemRect.bottom,
... | javascript | function getBoundingClientRectCompat ( elem ) {
var elemRect = elem.getBoundingClientRect();
if ( elemRect.width === undefined || elemRect.height === undefined ) {
// Fix for IE8
elemRect = {
top: elemRect.top,
left: elemRect.left,
bottom: elemRect.bottom,
... | [
"function",
"getBoundingClientRectCompat",
"(",
"elem",
")",
"{",
"var",
"elemRect",
"=",
"elem",
".",
"getBoundingClientRect",
"(",
")",
";",
"if",
"(",
"elemRect",
".",
"width",
"===",
"undefined",
"||",
"elemRect",
".",
"height",
"===",
"undefined",
")",
... | Returns the bounding client rect, including width and height properties. For compatibility with IE8, which
supports getBoundingClientRect but doesn't calculate width and height.
Use only when width and height are actually needed.
Will be removed when IE8 support is dropped entirely.
@param {HTMLElement} elem
@retu... | [
"Returns",
"the",
"bounding",
"client",
"rect",
"including",
"width",
"and",
"height",
"properties",
".",
"For",
"compatibility",
"with",
"IE8",
"which",
"supports",
"getBoundingClientRect",
"but",
"doesn",
"t",
"calculate",
"width",
"and",
"height",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/measurement.js#L152-L168 |
40,675 | hashchange/jquery.documentsize | spec/helpers/measurement.js | getAppliedOverflows | function getAppliedOverflows ( props, createBooleans ) {
var status = {};
// Establish the applied overflow (e.g. overflowX: "scroll")
status.overflowX = props.overflowX || props.overflow || "visible";
status.overflowY = props.overflowY || props.overflow || "visible";
// Create the derived boolean... | javascript | function getAppliedOverflows ( props, createBooleans ) {
var status = {};
// Establish the applied overflow (e.g. overflowX: "scroll")
status.overflowX = props.overflowX || props.overflow || "visible";
status.overflowY = props.overflowY || props.overflow || "visible";
// Create the derived boolean... | [
"function",
"getAppliedOverflows",
"(",
"props",
",",
"createBooleans",
")",
"{",
"var",
"status",
"=",
"{",
"}",
";",
"// Establish the applied overflow (e.g. overflowX: \"scroll\")",
"status",
".",
"overflowX",
"=",
"props",
".",
"overflowX",
"||",
"props",
".",
"... | Determines the effective overflow setting of an element, separately for each axis, based on the `overflow`,
`overflowX` and `overflowY` properties of the element which must be passed in as a hash.
Returns a hash of the computed results for overflowX, overflowY. Also adds boolean status properties to the hash
if the cr... | [
"Determines",
"the",
"effective",
"overflow",
"setting",
"of",
"an",
"element",
"separately",
"for",
"each",
"axis",
"based",
"on",
"the",
"overflow",
"overflowX",
"and",
"overflowY",
"properties",
"of",
"the",
"element",
"which",
"must",
"be",
"passed",
"in",
... | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/measurement.js#L198-L215 |
40,676 | hashchange/jquery.documentsize | spec/helpers/measurement.js | getAppliedViewportOverflows | function getAppliedViewportOverflows ( documentElementProps, bodyProps ) {
var _window = getAppliedOverflows( documentElementProps, false ),
body = getAppliedOverflows( bodyProps, false ),
consolidated = { window: {}, body: {} };
// Handle the interdependent relation between body and window (do... | javascript | function getAppliedViewportOverflows ( documentElementProps, bodyProps ) {
var _window = getAppliedOverflows( documentElementProps, false ),
body = getAppliedOverflows( bodyProps, false ),
consolidated = { window: {}, body: {} };
// Handle the interdependent relation between body and window (do... | [
"function",
"getAppliedViewportOverflows",
"(",
"documentElementProps",
",",
"bodyProps",
")",
"{",
"var",
"_window",
"=",
"getAppliedOverflows",
"(",
"documentElementProps",
",",
"false",
")",
",",
"body",
"=",
"getAppliedOverflows",
"(",
"bodyProps",
",",
"false",
... | Determines the effective overflow setting of the viewport and body, separately for each axis, based on the
`overflow`, `overflowX` and `overflowY` properties of the documentElement and body which must be passed in as a
hash.
Returns the results for viewport and body in an aggregated `{ window: ..., body: ...}` hash.
... | [
"Determines",
"the",
"effective",
"overflow",
"setting",
"of",
"the",
"viewport",
"and",
"body",
"separately",
"for",
"each",
"axis",
"based",
"on",
"the",
"overflow",
"overflowX",
"and",
"overflowY",
"properties",
"of",
"the",
"documentElement",
"and",
"body",
... | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/measurement.js#L258-L301 |
40,677 | hashchange/jquery.documentsize | demo/amd/amd.js | scaleLog | function scaleLog () {
var zoomFactor = $.pinchZoomFactor(),
logProps = {
top: ( initialLogProps.top / zoomFactor ) + "px",
left: ( initialLogProps.left / zoomFactor ) + "px",
paddingTop: ( initialLogProps.pa... | javascript | function scaleLog () {
var zoomFactor = $.pinchZoomFactor(),
logProps = {
top: ( initialLogProps.top / zoomFactor ) + "px",
left: ( initialLogProps.left / zoomFactor ) + "px",
paddingTop: ( initialLogProps.pa... | [
"function",
"scaleLog",
"(",
")",
"{",
"var",
"zoomFactor",
"=",
"$",
".",
"pinchZoomFactor",
"(",
")",
",",
"logProps",
"=",
"{",
"top",
":",
"(",
"initialLogProps",
".",
"top",
"/",
"zoomFactor",
")",
"+",
"\"px\"",
",",
"left",
":",
"(",
"initialLog... | Makes sure the log always keeps the same size, visually, as the user zooms in and out | [
"Makes",
"sure",
"the",
"log",
"always",
"keeps",
"the",
"same",
"size",
"visually",
"as",
"the",
"user",
"zooms",
"in",
"and",
"out"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/amd/amd.js#L106-L145 |
40,678 | hashchange/jquery.documentsize | demo/load-event/js/libs/modernizr/modernizr-custom.js | injectElementWithStyles | function injectElementWithStyles(rule, callback, nodes, testnames) {
var mod = 'modernizr';
var style;
var ret;
var node;
var docOverflow;
var div = createElement('div');
var body = getBody();
if (parseInt(nodes, 10)) {
// In order not to give false positives we create a node for ... | javascript | function injectElementWithStyles(rule, callback, nodes, testnames) {
var mod = 'modernizr';
var style;
var ret;
var node;
var docOverflow;
var div = createElement('div');
var body = getBody();
if (parseInt(nodes, 10)) {
// In order not to give false positives we create a node for ... | [
"function",
"injectElementWithStyles",
"(",
"rule",
",",
"callback",
",",
"nodes",
",",
"testnames",
")",
"{",
"var",
"mod",
"=",
"'modernizr'",
";",
"var",
"style",
";",
"var",
"ret",
";",
"var",
"node",
";",
"var",
"docOverflow",
";",
"var",
"div",
"="... | injectElementWithStyles injects an element with style element and some CSS rules
@access private
@function injectElementWithStyles
@param {string} rule - String representing a css rule
@param {function} callback - A function that is used to test the injected element
@param {number} [nodes] - An integer representing th... | [
"injectElementWithStyles",
"injects",
"an",
"element",
"with",
"style",
"element",
"and",
"some",
"CSS",
"rules"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/modernizr/modernizr-custom.js#L770-L828 |
40,679 | hashchange/jquery.documentsize | demo/load-event/custom.js | htmlAsEntities | function htmlAsEntities(html){
html = html.replace(/&/g, '&');
html = html.replace(/>/g, '>');
html = html.replace(/</g, '<');
html = html.replace(/"/g, '"');
html = html.replace(/'/g, ''');
return html;
} | javascript | function htmlAsEntities(html){
html = html.replace(/&/g, '&');
html = html.replace(/>/g, '>');
html = html.replace(/</g, '<');
html = html.replace(/"/g, '"');
html = html.replace(/'/g, ''');
return html;
} | [
"function",
"htmlAsEntities",
"(",
"html",
")",
"{",
"html",
"=",
"html",
".",
"replace",
"(",
"/",
"&",
"/",
"g",
",",
"'&'",
")",
";",
"html",
"=",
"html",
".",
"replace",
"(",
"/",
">",
"/",
"g",
",",
"'>'",
")",
";",
"html",
"=",
"ht... | Converts HTML markup to its
equivalent representation
@param string
@return string | [
"Converts",
"HTML",
"markup",
"to",
"its",
"equivalent",
"representation"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/custom.js#L50-L57 |
40,680 | hashchange/jquery.documentsize | demo/load-event/custom.js | map | function map(obj, callback){
var result = {};
Object.keys(obj).forEach(function(key){
result[key] = callback.call(obj, obj[key], key, obj);
});
return result;
} | javascript | function map(obj, callback){
var result = {};
Object.keys(obj).forEach(function(key){
result[key] = callback.call(obj, obj[key], key, obj);
});
return result;
} | [
"function",
"map",
"(",
"obj",
",",
"callback",
")",
"{",
"var",
"result",
"=",
"{",
"}",
";",
"Object",
".",
"keys",
"(",
"obj",
")",
".",
"forEach",
"(",
"function",
"(",
"key",
")",
"{",
"result",
"[",
"key",
"]",
"=",
"callback",
".",
"call",... | Map for Objects
@param Object
@return Object | [
"Map",
"for",
"Objects"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/custom.js#L76-L82 |
40,681 | hashchange/jquery.documentsize | demo/load-event/custom.js | sanitizeHtml | function sanitizeHtml(html){
var separator = '/';
if(html.constructor === Object){
return map(html, function(value){
var sanitizedHtml = value.split(separator)
.map(sanitizeHtml)
.join(separator);
return sanitizedHtml;
});
} else if(ht... | javascript | function sanitizeHtml(html){
var separator = '/';
if(html.constructor === Object){
return map(html, function(value){
var sanitizedHtml = value.split(separator)
.map(sanitizeHtml)
.join(separator);
return sanitizedHtml;
});
} else if(ht... | [
"function",
"sanitizeHtml",
"(",
"html",
")",
"{",
"var",
"separator",
"=",
"'/'",
";",
"if",
"(",
"html",
".",
"constructor",
"===",
"Object",
")",
"{",
"return",
"map",
"(",
"html",
",",
"function",
"(",
"value",
")",
"{",
"var",
"sanitizedHtml",
"="... | Use the browser's built-in functionality
to quickly and safely escape a string
@param string|Array|Object
@return string|Array|Object | [
"Use",
"the",
"browser",
"s",
"built",
"-",
"in",
"functionality",
"to",
"quickly",
"and",
"safely",
"escape",
"a",
"string"
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/custom.js#L91-L114 |
40,682 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | _isInView | function _isInView ( elem, config ) {
var containerWidth, containerHeight, hTolerance, vTolerance, rect,
container = config.container,
$container = config.$container,
cache = config.cache,
elemInView = true;
if ( elem === container ) throw new Error( "In... | javascript | function _isInView ( elem, config ) {
var containerWidth, containerHeight, hTolerance, vTolerance, rect,
container = config.container,
$container = config.$container,
cache = config.cache,
elemInView = true;
if ( elem === container ) throw new Error( "In... | [
"function",
"_isInView",
"(",
"elem",
",",
"config",
")",
"{",
"var",
"containerWidth",
",",
"containerHeight",
",",
"hTolerance",
",",
"vTolerance",
",",
"rect",
",",
"container",
"=",
"config",
".",
"container",
",",
"$container",
"=",
"config",
".",
"$con... | Returns if an element is in view, with regard to a given configuration.
The configuration is built with _prepareConfig().
@param {HTMLElement} elem
@param {Object} config
@param {HTMLElement|Window} config.container
@param {jQuery} config.$container
@param {boolean} config.co... | [
"Returns",
"if",
"an",
"element",
"is",
"in",
"view",
"with",
"regard",
"to",
"a",
"given",
"configuration",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L412-L462 |
40,683 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | getRelativeRect | function getRelativeRect ( rect, $container, cache ) {
var containerPaddingRectRoot;
if ( cache && cache.containerPaddingRectRoot ) {
containerPaddingRectRoot = cache.containerPaddingRectRoot;
} else {
// gBCR coordinates enclose padding, and leave out margin. That is ... | javascript | function getRelativeRect ( rect, $container, cache ) {
var containerPaddingRectRoot;
if ( cache && cache.containerPaddingRectRoot ) {
containerPaddingRectRoot = cache.containerPaddingRectRoot;
} else {
// gBCR coordinates enclose padding, and leave out margin. That is ... | [
"function",
"getRelativeRect",
"(",
"rect",
",",
"$container",
",",
"cache",
")",
"{",
"var",
"containerPaddingRectRoot",
";",
"if",
"(",
"cache",
"&&",
"cache",
".",
"containerPaddingRectRoot",
")",
"{",
"containerPaddingRectRoot",
"=",
"cache",
".",
"containerPa... | Gets the TextRectangle coordinates relative to a container element.
Do not call if the container is a window (redundant) or a document. Both calls would fail. | [
"Gets",
"the",
"TextRectangle",
"coordinates",
"relative",
"to",
"a",
"container",
"element",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L469-L498 |
40,684 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | getContentRect | function getContentRect( elem ) {
var rect = elem.getBoundingClientRect(),
props = getCss( elem, [
"borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth",
"paddingTop", "paddingRight", "paddingBottom", "paddingLeft"
], { toFloat: tru... | javascript | function getContentRect( elem ) {
var rect = elem.getBoundingClientRect(),
props = getCss( elem, [
"borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth",
"paddingTop", "paddingRight", "paddingBottom", "paddingLeft"
], { toFloat: tru... | [
"function",
"getContentRect",
"(",
"elem",
")",
"{",
"var",
"rect",
"=",
"elem",
".",
"getBoundingClientRect",
"(",
")",
",",
"props",
"=",
"getCss",
"(",
"elem",
",",
"[",
"\"borderTopWidth\"",
",",
"\"borderRightWidth\"",
",",
"\"borderBottomWidth\"",
",",
"... | Calculates the rect of the content-box. Similar to getBoundingClientRect, but excludes padding and borders - and
is much slower.
@param {HTMLElement} elem
@returns {ClientRect} | [
"Calculates",
"the",
"rect",
"of",
"the",
"content",
"-",
"box",
".",
"Similar",
"to",
"getBoundingClientRect",
"but",
"excludes",
"padding",
"and",
"borders",
"-",
"and",
"is",
"much",
"slower",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L507-L521 |
40,685 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | wrapContainer | function wrapContainer ( container ) {
var $container,
isJquery = container instanceof $;
if ( ! isJquery && ! $.isWindow( container ) && ! container.nodeType && ! isString( container ) ) throw new Error( 'Invalid container: not a window, node, jQuery object or selector string' );
... | javascript | function wrapContainer ( container ) {
var $container,
isJquery = container instanceof $;
if ( ! isJquery && ! $.isWindow( container ) && ! container.nodeType && ! isString( container ) ) throw new Error( 'Invalid container: not a window, node, jQuery object or selector string' );
... | [
"function",
"wrapContainer",
"(",
"container",
")",
"{",
"var",
"$container",
",",
"isJquery",
"=",
"container",
"instanceof",
"$",
";",
"if",
"(",
"!",
"isJquery",
"&&",
"!",
"$",
".",
"isWindow",
"(",
"container",
")",
"&&",
"!",
"container",
".",
"nod... | Establishes the container and returns it in a jQuery wrapper.
Resolves and normalizes the input, which may be a document, HTMLElement, window, or selector string. Corrects
likely mistakes, such as passing in a document or an iframe, rather than the corresponding window.
@param {Window|Document|HTMLElement|HTMLIFrameE... | [
"Establishes",
"the",
"container",
"and",
"returns",
"it",
"in",
"a",
"jQuery",
"wrapper",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L795-L819 |
40,686 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | checkOptions | function checkOptions ( opts ) {
var isNum, isNumWithUnit;
if ( opts.direction && !( opts.direction === 'vertical' || opts.direction === 'horizontal' || opts.direction === 'both' ) ) {
throw new Error( 'Invalid option value: direction = "' + opts.direction + '"' );
}
if ( o... | javascript | function checkOptions ( opts ) {
var isNum, isNumWithUnit;
if ( opts.direction && !( opts.direction === 'vertical' || opts.direction === 'horizontal' || opts.direction === 'both' ) ) {
throw new Error( 'Invalid option value: direction = "' + opts.direction + '"' );
}
if ( o... | [
"function",
"checkOptions",
"(",
"opts",
")",
"{",
"var",
"isNum",
",",
"isNumWithUnit",
";",
"if",
"(",
"opts",
".",
"direction",
"&&",
"!",
"(",
"opts",
".",
"direction",
"===",
"'vertical'",
"||",
"opts",
".",
"direction",
"===",
"'horizontal'",
"||",
... | Spots likely option mistakes and throws appropriate errors.
@param {Object} opts | [
"Spots",
"likely",
"option",
"mistakes",
"and",
"throws",
"appropriate",
"errors",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L854-L871 |
40,687 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | getContainerScrollbarWidths | function getContainerScrollbarWidths ( $container, cache ) {
var containerScrollbarWidths;
if ( cache && cache.containerScrollbarWidths ) {
containerScrollbarWidths = cache.containerScrollbarWidths;
} else {
containerScrollbarWidths = effectiveScrollbarWith( $container )... | javascript | function getContainerScrollbarWidths ( $container, cache ) {
var containerScrollbarWidths;
if ( cache && cache.containerScrollbarWidths ) {
containerScrollbarWidths = cache.containerScrollbarWidths;
} else {
containerScrollbarWidths = effectiveScrollbarWith( $container )... | [
"function",
"getContainerScrollbarWidths",
"(",
"$container",
",",
"cache",
")",
"{",
"var",
"containerScrollbarWidths",
";",
"if",
"(",
"cache",
"&&",
"cache",
".",
"containerScrollbarWidths",
")",
"{",
"containerScrollbarWidths",
"=",
"cache",
".",
"containerScrollb... | Gets the effective scroll bar widths of a given container. Makes use of caching if a cache object is provided.
@param {jQuery} $container
@param {Object} [cache]
@returns {Object} | [
"Gets",
"the",
"effective",
"scroll",
"bar",
"widths",
"of",
"a",
"given",
"container",
".",
"Makes",
"use",
"of",
"caching",
"if",
"a",
"cache",
"object",
"is",
"provided",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L930-L941 |
40,688 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | getCss | function getCss ( elem, properties, opts ) {
var i, length, name,
props = {},
_window = ( elem.ownerDocument.defaultView || elem.ownerDocument.parentWindow ),
computedStyles = _useGetComputedStyle ? _window.getComputedStyle( elem, null ) : elem.currentStyle;
opts || ... | javascript | function getCss ( elem, properties, opts ) {
var i, length, name,
props = {},
_window = ( elem.ownerDocument.defaultView || elem.ownerDocument.parentWindow ),
computedStyles = _useGetComputedStyle ? _window.getComputedStyle( elem, null ) : elem.currentStyle;
opts || ... | [
"function",
"getCss",
"(",
"elem",
",",
"properties",
",",
"opts",
")",
"{",
"var",
"i",
",",
"length",
",",
"name",
",",
"props",
"=",
"{",
"}",
",",
"_window",
"=",
"(",
"elem",
".",
"ownerDocument",
".",
"defaultView",
"||",
"elem",
".",
"ownerDoc... | Returns the computed style for a property, or an array of properties, as a hash.
Building a CSS properties hash this way can be significantly faster than the more convenient, conventional jQuery
approach, $( elem ).css( propertiesArray ).
ATTN
====
We are using an internal jQuery API here: $.css(). The current signa... | [
"Returns",
"the",
"computed",
"style",
"for",
"a",
"property",
"or",
"an",
"array",
"of",
"properties",
"as",
"a",
"hash",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L984-L1003 |
40,689 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | isIOS | function isIOS () {
if ( _isIOS === undefined ) _isIOS = (/iPad|iPhone|iPod/g).test( navigator.userAgent );
return _isIOS;
} | javascript | function isIOS () {
if ( _isIOS === undefined ) _isIOS = (/iPad|iPhone|iPod/g).test( navigator.userAgent );
return _isIOS;
} | [
"function",
"isIOS",
"(",
")",
"{",
"if",
"(",
"_isIOS",
"===",
"undefined",
")",
"_isIOS",
"=",
"(",
"/",
"iPad|iPhone|iPod",
"/",
"g",
")",
".",
"test",
"(",
"navigator",
".",
"userAgent",
")",
";",
"return",
"_isIOS",
";",
"}"
] | Detects if the browser is on iOS. Works for Safari as well as other browsers, say, Chrome on iOS.
Required for some iOS behaviour which can't be feature-detected in any way.
@returns {boolean} | [
"Detects",
"if",
"the",
"browser",
"is",
"on",
"iOS",
".",
"Works",
"for",
"Safari",
"as",
"well",
"as",
"other",
"browsers",
"say",
"Chrome",
"on",
"iOS",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L1041-L1044 |
40,690 | hashchange/jquery.documentsize | demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js | toFloat | function toFloat ( object ) {
var transformed = {};
$.map( object, function ( value, key ) {
transformed[key] = parseFloat( value );
} );
return transformed;
} | javascript | function toFloat ( object ) {
var transformed = {};
$.map( object, function ( value, key ) {
transformed[key] = parseFloat( value );
} );
return transformed;
} | [
"function",
"toFloat",
"(",
"object",
")",
"{",
"var",
"transformed",
"=",
"{",
"}",
";",
"$",
".",
"map",
"(",
"object",
",",
"function",
"(",
"value",
",",
"key",
")",
"{",
"transformed",
"[",
"key",
"]",
"=",
"parseFloat",
"(",
"value",
")",
";"... | Calls parseFloat on each value. Useful for removing units from numeric values.
@param {Object} object
@returns {Object} | [
"Calls",
"parseFloat",
"on",
"each",
"value",
".",
"Useful",
"for",
"removing",
"units",
"from",
"numeric",
"values",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js#L1052-L1060 |
40,691 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | createChildWindow | function createChildWindow ( readyDfd, size ) {
var childWindow, width, height,
sizedDefaultProps = ",top=0,left=0,location=no,menubar=no,status=no,toolbar=no,resizeable=yes,scrollbars=yes";
if ( size ) {
width = size === "parent" ? window.document.documentElement.clientWidth : size.width;
... | javascript | function createChildWindow ( readyDfd, size ) {
var childWindow, width, height,
sizedDefaultProps = ",top=0,left=0,location=no,menubar=no,status=no,toolbar=no,resizeable=yes,scrollbars=yes";
if ( size ) {
width = size === "parent" ? window.document.documentElement.clientWidth : size.width;
... | [
"function",
"createChildWindow",
"(",
"readyDfd",
",",
"size",
")",
"{",
"var",
"childWindow",
",",
"width",
",",
"height",
",",
"sizedDefaultProps",
"=",
"\",top=0,left=0,location=no,menubar=no,status=no,toolbar=no,resizeable=yes,scrollbars=yes\"",
";",
"if",
"(",
"size",
... | Creates a child window, including a document with an HTML 5 doctype, UFT-8 charset, head, title, and body tags.
Returns the handle, or undefined if window creation fails.
Optionally accepts a jQuery Deferred. The deferred is resolved when the document in the child window is ready and the
window has expanded to its int... | [
"Creates",
"a",
"child",
"window",
"including",
"a",
"document",
"with",
"an",
"HTML",
"5",
"doctype",
"UFT",
"-",
"8",
"charset",
"head",
"title",
"and",
"body",
"tags",
".",
"Returns",
"the",
"handle",
"or",
"undefined",
"if",
"window",
"creation",
"fail... | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L29-L69 |
40,692 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | createIframe | function createIframe ( opts ) {
var parent = ( opts && opts.parent ) ? ( varExists( $ ) && opts.parent instanceof $ ) ? opts.parent[0] : opts.parent : document.body,
_document = parent.ownerDocument,
iframe = _document.createElement( "iframe" );
opts || ( opts = {} );
if ( opts.elementSty... | javascript | function createIframe ( opts ) {
var parent = ( opts && opts.parent ) ? ( varExists( $ ) && opts.parent instanceof $ ) ? opts.parent[0] : opts.parent : document.body,
_document = parent.ownerDocument,
iframe = _document.createElement( "iframe" );
opts || ( opts = {} );
if ( opts.elementSty... | [
"function",
"createIframe",
"(",
"opts",
")",
"{",
"var",
"parent",
"=",
"(",
"opts",
"&&",
"opts",
".",
"parent",
")",
"?",
"(",
"varExists",
"(",
"$",
")",
"&&",
"opts",
".",
"parent",
"instanceof",
"$",
")",
"?",
"opts",
".",
"parent",
"[",
"0",... | Creates an iframe with an HTML5 doctype and UTF-8 encoding. Appends it to the body, or to another specified parent
element. Alternatively, the iframe can be prepended to the parent.
The iframe element can be styled as it is created, before it is added to the DOM, e.g. to keep it out of view.
Likewise, styles can be wr... | [
"Creates",
"an",
"iframe",
"with",
"an",
"HTML5",
"doctype",
"and",
"UTF",
"-",
"8",
"encoding",
".",
"Appends",
"it",
"to",
"the",
"body",
"or",
"to",
"another",
"specified",
"parent",
"element",
".",
"Alternatively",
"the",
"iframe",
"can",
"be",
"prepen... | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L87-L107 |
40,693 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | createIframeDocument | function createIframeDocument ( iframe, documentStyles ) {
if ( varExists( $ ) && iframe instanceof $ ) iframe = iframe[0];
if ( ! iframe.ownerDocument.body.contains( iframe ) ) throw new Error( "The iframe has not been appended to the DOM, or is not a descendant of the body element. Can't create an iframe con... | javascript | function createIframeDocument ( iframe, documentStyles ) {
if ( varExists( $ ) && iframe instanceof $ ) iframe = iframe[0];
if ( ! iframe.ownerDocument.body.contains( iframe ) ) throw new Error( "The iframe has not been appended to the DOM, or is not a descendant of the body element. Can't create an iframe con... | [
"function",
"createIframeDocument",
"(",
"iframe",
",",
"documentStyles",
")",
"{",
"if",
"(",
"varExists",
"(",
"$",
")",
"&&",
"iframe",
"instanceof",
"$",
")",
"iframe",
"=",
"iframe",
"[",
"0",
"]",
";",
"if",
"(",
"!",
"iframe",
".",
"ownerDocument"... | Creates an iframe document with an HTML5 doctype and UTF-8 encoding.
The iframe element MUST have been appended to the DOM by the time this function is called, and it must be a
descendant of the body element. A document inside an iframe can only be created when these conditions are met.
@param {HTMLIFrameElement|jQ... | [
"Creates",
"an",
"iframe",
"document",
"with",
"an",
"HTML5",
"doctype",
"and",
"UTF",
"-",
"8",
"encoding",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L120-L130 |
40,694 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | windowSizeReady | function windowSizeReady ( queriedWindow, readyDfd, interval ) {
if ( !varExists( $ ) ) throw new Error( "This method uses jQuery deferreds, but the $ variable is not available" );
if ( queriedWindow instanceof $ ) queriedWindow = queriedWindow[0];
readyDfd || ( readyDfd = $.Deferred() );
$( queried... | javascript | function windowSizeReady ( queriedWindow, readyDfd, interval ) {
if ( !varExists( $ ) ) throw new Error( "This method uses jQuery deferreds, but the $ variable is not available" );
if ( queriedWindow instanceof $ ) queriedWindow = queriedWindow[0];
readyDfd || ( readyDfd = $.Deferred() );
$( queried... | [
"function",
"windowSizeReady",
"(",
"queriedWindow",
",",
"readyDfd",
",",
"interval",
")",
"{",
"if",
"(",
"!",
"varExists",
"(",
"$",
")",
")",
"throw",
"new",
"Error",
"(",
"\"This method uses jQuery deferreds, but the $ variable is not available\"",
")",
";",
"i... | Waits for the size of a window to become stable, in case it is undergoing a change. Returns a deferred which resolves
when the window size is stable.
Optionally accepts an external jQuery deferred to act on, which is then returned instead.
This check can be used to determine when the process of resizing a window has ... | [
"Waits",
"for",
"the",
"size",
"of",
"a",
"window",
"to",
"become",
"stable",
"in",
"case",
"it",
"is",
"undergoing",
"a",
"change",
".",
"Returns",
"a",
"deferred",
"which",
"resolves",
"when",
"the",
"window",
"size",
"is",
"stable",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L156-L188 |
40,695 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | validateWindowSize | function validateWindowSize ( expected, opts ) {
var msg = "",
documentElement = ( opts && opts.window || window ).document.documentElement,
width = documentElement.clientWidth,
height = documentElement.clientHeight;
if ( opts && opts.exactly ) {
if ( width !== expected.width ) ... | javascript | function validateWindowSize ( expected, opts ) {
var msg = "",
documentElement = ( opts && opts.window || window ).document.documentElement,
width = documentElement.clientWidth,
height = documentElement.clientHeight;
if ( opts && opts.exactly ) {
if ( width !== expected.width ) ... | [
"function",
"validateWindowSize",
"(",
"expected",
",",
"opts",
")",
"{",
"var",
"msg",
"=",
"\"\"",
",",
"documentElement",
"=",
"(",
"opts",
"&&",
"opts",
".",
"window",
"||",
"window",
")",
".",
"document",
".",
"documentElement",
",",
"width",
"=",
"... | Makes sure a window is as at least as large as the specified minimum. If the window is too small, an error
is thrown.
Optionally, it can be validated that the window matches the expected size exactly.
@param {Object} expected
@param {number} expected.width
@param {number} expected.height
@param {Object} [opts]
@p... | [
"Makes",
"sure",
"a",
"window",
"is",
"as",
"at",
"least",
"as",
"large",
"as",
"the",
"specified",
"minimum",
".",
"If",
"the",
"window",
"is",
"too",
"small",
"an",
"error",
"is",
"thrown",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L203-L218 |
40,696 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | forceReflow | function forceReflow ( element ) {
if ( !varExists( $ ) ) throw new Error( "This method uses jQuery, but the $ variable is not available" );
var $element = element instanceof $ ? element : $( element );
$element.css( { display: "none" } ).height();
$element.css( { display: "block" } );
} | javascript | function forceReflow ( element ) {
if ( !varExists( $ ) ) throw new Error( "This method uses jQuery, but the $ variable is not available" );
var $element = element instanceof $ ? element : $( element );
$element.css( { display: "none" } ).height();
$element.css( { display: "block" } );
} | [
"function",
"forceReflow",
"(",
"element",
")",
"{",
"if",
"(",
"!",
"varExists",
"(",
"$",
")",
")",
"throw",
"new",
"Error",
"(",
"\"This method uses jQuery, but the $ variable is not available\"",
")",
";",
"var",
"$element",
"=",
"element",
"instanceof",
"$",
... | Forces a reflow for a given element, in case it doesn't happen automatically.
For the technique, see http://stackoverflow.com/a/14382251/508355
For some background, see e.g. http://apmblog.dynatrace.com/2009/12/12/understanding-internet-explorer-rendering-behaviour/
@param {HTMLElement|jQuery} element | [
"Forces",
"a",
"reflow",
"for",
"a",
"given",
"element",
"in",
"case",
"it",
"doesn",
"t",
"happen",
"automatically",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L256-L263 |
40,697 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | isIE | function isIE ( opts ) {
var ver = getIEVersion(),
isMatch = ver !== 0;
opts || ( opts = {} );
if ( isMatch && opts.eq ) isMatch = ver === opts.eq;
if ( isMatch && opts.lt ) isMatch = ver < opts.lt;
if ( isMatch && opts.lte ) isMatch = ver <= opts.lte;
if ( isMatch && opts.gt ) isMatch... | javascript | function isIE ( opts ) {
var ver = getIEVersion(),
isMatch = ver !== 0;
opts || ( opts = {} );
if ( isMatch && opts.eq ) isMatch = ver === opts.eq;
if ( isMatch && opts.lt ) isMatch = ver < opts.lt;
if ( isMatch && opts.lte ) isMatch = ver <= opts.lte;
if ( isMatch && opts.gt ) isMatch... | [
"function",
"isIE",
"(",
"opts",
")",
"{",
"var",
"ver",
"=",
"getIEVersion",
"(",
")",
",",
"isMatch",
"=",
"ver",
"!==",
"0",
";",
"opts",
"||",
"(",
"opts",
"=",
"{",
"}",
")",
";",
"if",
"(",
"isMatch",
"&&",
"opts",
".",
"eq",
")",
"isMatc... | Detects IE.
Can use a version requirement. A range can also be specified, e.g. with an option like { gte: 8, lt: 11 }.
@param {Object} [opts]
@param {number} [opts.eq] the IE version must be as specified
@param {number} [opts.lt] the IE version must be less than the one specified
@param {number} [opts.lte] the I... | [
"Detects",
"IE",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L416-L429 |
40,698 | hashchange/jquery.documentsize | spec/helpers/dom-utils.js | getIEVersion | function getIEVersion () {
var ieMatch = /MSIE (\d+)/.exec( navigator.userAgent ) || /Trident\/.+? rv:(\d+)/.exec( navigator.userAgent );
return ( ieMatch && ieMatch.length ) ? parseFloat( ieMatch[1] ) : 0;
} | javascript | function getIEVersion () {
var ieMatch = /MSIE (\d+)/.exec( navigator.userAgent ) || /Trident\/.+? rv:(\d+)/.exec( navigator.userAgent );
return ( ieMatch && ieMatch.length ) ? parseFloat( ieMatch[1] ) : 0;
} | [
"function",
"getIEVersion",
"(",
")",
"{",
"var",
"ieMatch",
"=",
"/",
"MSIE (\\d+)",
"/",
".",
"exec",
"(",
"navigator",
".",
"userAgent",
")",
"||",
"/",
"Trident\\/.+? rv:(\\d+)",
"/",
".",
"exec",
"(",
"navigator",
".",
"userAgent",
")",
";",
"return",... | Detects the IE version. Returns the major version number, or 0 if the browser is not IE.
Simple solution, solely based on UA sniffing. In a better implementation, conditional comments would be used to
detect IE6 to IE9 - see https://gist.github.com/cowboy/542301 for an example. UA sniffing would only serve as a
fallba... | [
"Detects",
"the",
"IE",
"version",
".",
"Returns",
"the",
"major",
"version",
"number",
"or",
"0",
"if",
"the",
"browser",
"is",
"not",
"IE",
"."
] | 4f9c24f054f604b165082bbe5b3b424ad042a729 | https://github.com/hashchange/jquery.documentsize/blob/4f9c24f054f604b165082bbe5b3b424ad042a729/spec/helpers/dom-utils.js#L439-L442 |
40,699 | klei/grunt-injector | tasks/injector.js | removeEmptySources | function removeEmptySources (sources) {
return _.reject(sources, function (obj) {
return _.isEmpty(obj.transformed);
});
} | javascript | function removeEmptySources (sources) {
return _.reject(sources, function (obj) {
return _.isEmpty(obj.transformed);
});
} | [
"function",
"removeEmptySources",
"(",
"sources",
")",
"{",
"return",
"_",
".",
"reject",
"(",
"sources",
",",
"function",
"(",
"obj",
")",
"{",
"return",
"_",
".",
"isEmpty",
"(",
"obj",
".",
"transformed",
")",
";",
"}",
")",
";",
"}"
] | Remove the entry whose transformed string is empty since we don't want to inject empty string. | [
"Remove",
"the",
"entry",
"whose",
"transformed",
"string",
"is",
"empty",
"since",
"we",
"don",
"t",
"want",
"to",
"inject",
"empty",
"string",
"."
] | 6387c056f74f35a65a462a6e07f2247a11da5a46 | https://github.com/klei/grunt-injector/blob/6387c056f74f35a65a462a6e07f2247a11da5a46/tasks/injector.js#L292-L296 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.