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
partition
stringclasses
1 value
bitpay/bitcore-wallet-service
lib/server.js
chunkArray
function chunkArray(myArray, chunk_size){ var results = []; while (myArray.length) { results.push(myArray.splice(0, chunk_size)); } return results; }
javascript
function chunkArray(myArray, chunk_size){ var results = []; while (myArray.length) { results.push(myArray.splice(0, chunk_size)); } return results; }
[ "function", "chunkArray", "(", "myArray", ",", "chunk_size", ")", "{", "var", "results", "=", "[", "]", ";", "while", "(", "myArray", ".", "length", ")", "{", "results", ".", "push", "(", "myArray", ".", "splice", "(", "0", ",", "chunk_size", ")", ")...
Returns an array with arrays of the given size. @param myArray {Array} Array to split @param chunkSize {Integer} Size of every group
[ "Returns", "an", "array", "with", "arrays", "of", "the", "given", "size", "." ]
750172ff7c508a41e612e5ca037094d967964383
https://github.com/bitpay/bitcore-wallet-service/blob/750172ff7c508a41e612e5ca037094d967964383/lib/server.js#L3254-L3262
train
mapbox/carto
lib/carto/parser.js
function() { var args = [], arg; arg = $(this.expression); while (arg) { args.push(arg); if (! $(',')) { break; } arg = $(this.expression); } retu...
javascript
function() { var args = [], arg; arg = $(this.expression); while (arg) { args.push(arg); if (! $(',')) { break; } arg = $(this.expression); } retu...
[ "function", "(", ")", "{", "var", "args", "=", "[", "]", ",", "arg", ";", "arg", "=", "$", "(", "this", ".", "expression", ")", ";", "while", "(", "arg", ")", "{", "args", ".", "push", "(", "arg", ")", ";", "if", "(", "!", "$", "(", "','", ...
Arguments are comma-separated expressions
[ "Arguments", "are", "comma", "-", "separated", "expressions" ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/parser.js#L387-L398
train
mapbox/carto
lib/carto/parser.js
function() { var c = input.charCodeAt(i); if ((c > 57 || c < 45) || c === 47) return; var value = $(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/); if (value) { return new tree.Dimension(value[1], value[2], memo, env.fi...
javascript
function() { var c = input.charCodeAt(i); if ((c > 57 || c < 45) || c === 47) return; var value = $(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/); if (value) { return new tree.Dimension(value[1], value[2], memo, env.fi...
[ "function", "(", ")", "{", "var", "c", "=", "input", ".", "charCodeAt", "(", "i", ")", ";", "if", "(", "(", "c", ">", "57", "||", "c", "<", "45", ")", "||", "c", "===", "47", ")", "return", ";", "var", "value", "=", "$", "(", "/", "^(-?\\d*...
A Dimension, that is, a number and a unit. The only unit that has an effect is %
[ "A", "Dimension", "that", "is", "a", "number", "and", "a", "unit", ".", "The", "only", "unit", "that", "has", "an", "effect", "is", "%" ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/parser.js#L463-L470
train
mapbox/carto
lib/carto/parser.js
function() { var a, attachment, e, elements = [], f, filters = new tree.Filterset(), z, zooms = [], segments = 0, conditions = 0; while ( (e = $(this.element)) || ...
javascript
function() { var a, attachment, e, elements = [], f, filters = new tree.Filterset(), z, zooms = [], segments = 0, conditions = 0; while ( (e = $(this.element)) || ...
[ "function", "(", ")", "{", "var", "a", ",", "attachment", ",", "e", ",", "elements", "=", "[", "]", ",", "f", ",", "filters", "=", "new", "tree", ".", "Filterset", "(", ")", ",", "z", ",", "zooms", "=", "[", "]", ",", "segments", "=", "0", ",...
Selectors are made out of one or more Elements, see above.
[ "Selectors", "are", "made", "out", "of", "one", "or", "more", "Elements", "see", "above", "." ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/parser.js#L516-L564
train
mapbox/carto
lib/carto/parser.js
function() { var m, a, op, operation; m = $(this.operand); if (m) { while ((op = ($('/') || $('*') || $('%'))) && (a = $(this.operand))) { operation = new tree.Operation(op, [operation || m, a], memo, env.filename); ...
javascript
function() { var m, a, op, operation; m = $(this.operand); if (m) { while ((op = ($('/') || $('*') || $('%'))) && (a = $(this.operand))) { operation = new tree.Operation(op, [operation || m, a], memo, env.filename); ...
[ "function", "(", ")", "{", "var", "m", ",", "a", ",", "op", ",", "operation", ";", "m", "=", "$", "(", "this", ".", "operand", ")", ";", "if", "(", "m", ")", "{", "while", "(", "(", "op", "=", "(", "$", "(", "'/'", ")", "||", "$", "(", ...
This is a misnomer because it actually handles multiplication and division.
[ "This", "is", "a", "misnomer", "because", "it", "actually", "handles", "multiplication", "and", "division", "." ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/parser.js#L733-L742
train
mapbox/carto
lib/carto/parser.js
function() { var e, entities = []; e = $(this.addition); while (e || $(this.entity)) { entities.push(e); e = $(this.addition); } if (entities.length > 0) { return new tree.Expres...
javascript
function() { var e, entities = []; e = $(this.addition); while (e || $(this.entity)) { entities.push(e); e = $(this.addition); } if (entities.length > 0) { return new tree.Expres...
[ "function", "(", ")", "{", "var", "e", ",", "entities", "=", "[", "]", ";", "e", "=", "$", "(", "this", ".", "addition", ")", ";", "while", "(", "e", "||", "$", "(", "this", ".", "entity", ")", ")", "{", "entities", ".", "push", "(", "e", "...
Expressions either represent mathematical operations, or white-space delimited Entities. @var * 2
[ "Expressions", "either", "represent", "mathematical", "operations", "or", "white", "-", "space", "delimited", "Entities", "." ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/parser.js#L763-L775
train
mapbox/carto
lib/carto/functions.js
function (val) { var color, mode; if (arguments.length > 1) color = arguments[1]; if (arguments.length > 2) mode = arguments[2]; return { is: 'tag', val: val, color: color, mode: mode, toString: function(env) { ...
javascript
function (val) { var color, mode; if (arguments.length > 1) color = arguments[1]; if (arguments.length > 2) mode = arguments[2]; return { is: 'tag', val: val, color: color, mode: mode, toString: function(env) { ...
[ "function", "(", "val", ")", "{", "var", "color", ",", "mode", ";", "if", "(", "arguments", ".", "length", ">", "1", ")", "color", "=", "arguments", "[", "1", "]", ";", "if", "(", "arguments", ".", "length", ">", "2", ")", "mode", "=", "arguments...
Only require val
[ "Only", "require", "val" ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/functions.js#L28-L54
train
mapbox/carto
lib/carto/renderer.js
addRules
function addRules(current, definition, byFilter) { var newFilters = definition.filters, newRules = definition.rules, updatedFilters, clone, previous; // The current definition might have been split up into // multiple definitions already. for (var k = 0; k < current.length; k++) { ...
javascript
function addRules(current, definition, byFilter) { var newFilters = definition.filters, newRules = definition.rules, updatedFilters, clone, previous; // The current definition might have been split up into // multiple definitions already. for (var k = 0; k < current.length; k++) { ...
[ "function", "addRules", "(", "current", ",", "definition", ",", "byFilter", ")", "{", "var", "newFilters", "=", "definition", ".", "filters", ",", "newRules", "=", "definition", ".", "rules", ",", "updatedFilters", ",", "clone", ",", "previous", ";", "// The...
This function currently modifies 'current' @param {Array} current current list of rules @param {Object} definition a Definition object to add to the rules @param {Object} byFilter an object/dictionary of existing filters. This is actually keyed `attachment->filter`
[ "This", "function", "currently", "modifies", "current" ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/renderer.js#L473-L523
train
mapbox/carto
lib/carto/renderer.js
inheritDefinitions
function inheritDefinitions(definitions, env) { var inheritTime = +new Date(); // definitions are ordered by specificity, // high (index 0) to low var byAttachment = {}, byFilter = {}; var result = []; var current, attachment; // Evaluate the filters specified by each definition wit...
javascript
function inheritDefinitions(definitions, env) { var inheritTime = +new Date(); // definitions are ordered by specificity, // high (index 0) to low var byAttachment = {}, byFilter = {}; var result = []; var current, attachment; // Evaluate the filters specified by each definition wit...
[ "function", "inheritDefinitions", "(", "definitions", ",", "env", ")", "{", "var", "inheritTime", "=", "+", "new", "Date", "(", ")", ";", "// definitions are ordered by specificity,", "// high (index 0) to low", "var", "byAttachment", "=", "{", "}", ",", "byFilter",...
Apply inherited styles from their ancestors to them. called either once per render (in the case of mss) or per layer (for mml) @param {Object} definitions - a list of definitions objects that contain .rules @param {Object} env - the environment @return {Array<Array>} an array of arrays is returned, in which each arra...
[ "Apply", "inherited", "styles", "from", "their", "ancestors", "to", "them", "." ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/renderer.js#L537-L582
train
mapbox/carto
lib/carto/renderer.js
foldStyle
function foldStyle(style) { for (var i = 0; i < style.length; i++) { for (var j = style.length - 1; j > i; j--) { if (style[j].filters.cloneWith(style[i].filters) === null) { style.splice(j, 1); } } } return style; }
javascript
function foldStyle(style) { for (var i = 0; i < style.length; i++) { for (var j = style.length - 1; j > i; j--) { if (style[j].filters.cloneWith(style[i].filters) === null) { style.splice(j, 1); } } } return style; }
[ "function", "foldStyle", "(", "style", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "style", ".", "length", ";", "i", "++", ")", "{", "for", "(", "var", "j", "=", "style", ".", "length", "-", "1", ";", "j", ">", "i", ";", "j",...
Removes dead style definitions that can never be reached when filter-mode="first". The style is modified in-place and returned. The style must be sorted.
[ "Removes", "dead", "style", "definitions", "that", "can", "never", "be", "reached", "when", "filter", "-", "mode", "=", "first", ".", "The", "style", "is", "modified", "in", "-", "place", "and", "returned", ".", "The", "style", "must", "be", "sorted", "....
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/renderer.js#L611-L620
train
mapbox/carto
lib/carto/tree/ruleset.js
function(env) { for (var i = 0; i < this.selectors.length; i++) { var zval = tree.Zoom.all; for (var z = 0; z < this.selectors[i].zoom.length; z++) { zval = zval & this.selectors[i].zoom[z].ev(env).zoom; } this.selectors[i].zoom = zval; } ...
javascript
function(env) { for (var i = 0; i < this.selectors.length; i++) { var zval = tree.Zoom.all; for (var z = 0; z < this.selectors[i].zoom.length; z++) { zval = zval & this.selectors[i].zoom[z].ev(env).zoom; } this.selectors[i].zoom = zval; } ...
[ "function", "(", "env", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this", ".", "selectors", ".", "length", ";", "i", "++", ")", "{", "var", "zval", "=", "tree", ".", "Zoom", ".", "all", ";", "for", "(", "var", "z", "=", "0"...
Zooms can use variables. This replaces tree.Zoom objects on selectors with simple bit-arrays that we can compare easily.
[ "Zooms", "can", "use", "variables", ".", "This", "replaces", "tree", ".", "Zoom", "objects", "on", "selectors", "with", "simple", "bit", "-", "arrays", "that", "we", "can", "compare", "easily", "." ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/tree/ruleset.js#L85-L93
train
mapbox/carto
lib/carto/tree/definition.js
symbolizerList
function symbolizerList(sym_order) { return sym_order.sort(function(a, b) { return a[1] - b[1]; }) .map(function(v) { return v[0]; }); }
javascript
function symbolizerList(sym_order) { return sym_order.sort(function(a, b) { return a[1] - b[1]; }) .map(function(v) { return v[0]; }); }
[ "function", "symbolizerList", "(", "sym_order", ")", "{", "return", "sym_order", ".", "sort", "(", "function", "(", "a", ",", "b", ")", "{", "return", "a", "[", "1", "]", "-", "b", "[", "1", "]", ";", "}", ")", ".", "map", "(", "function", "(", ...
Get a simple list of the symbolizers, in order
[ "Get", "a", "simple", "list", "of", "the", "symbolizers", "in", "order" ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/tree/definition.js#L96-L99
train
mapbox/carto
lib/carto/tree/color.js
function() { if (this.hsl !== null) { if (this.alpha < 1.0) { if (this.perceptual) { return 'rgba(' + hsluv.hsluvToRgb([this.hsl[0], this.hsl[1] * 100, this.hsl[2] * 100]).map(function(c) { return Math.round(c * 255); })...
javascript
function() { if (this.hsl !== null) { if (this.alpha < 1.0) { if (this.perceptual) { return 'rgba(' + hsluv.hsluvToRgb([this.hsl[0], this.hsl[1] * 100, this.hsl[2] * 100]).map(function(c) { return Math.round(c * 255); })...
[ "function", "(", ")", "{", "if", "(", "this", ".", "hsl", "!==", "null", ")", "{", "if", "(", "this", ".", "alpha", "<", "1.0", ")", "{", "if", "(", "this", ".", "perceptual", ")", "{", "return", "'rgba('", "+", "hsluv", ".", "hsluvToRgb", "(", ...
If we have some transparency, the only way to represent it is via `rgba`. Otherwise, we use the hex representation, which has better compatibility with older browsers.
[ "If", "we", "have", "some", "transparency", "the", "only", "way", "to", "represent", "it", "is", "via", "rgba", ".", "Otherwise", "we", "use", "the", "hex", "representation", "which", "has", "better", "compatibility", "with", "older", "browsers", "." ]
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/tree/color.js#L41-L64
train
mapbox/carto
lib/carto/tree/color.js
function(env, op, other) { var result = [], rgb2; if (other instanceof tree.Color) { rgb2 = chroma(other.toString()).rgb(); } else if (_.isArray(other)) { rgb2 = _.slice(other, 0, Math.max(other.length, 3)); } else if (_.isObject(other...
javascript
function(env, op, other) { var result = [], rgb2; if (other instanceof tree.Color) { rgb2 = chroma(other.toString()).rgb(); } else if (_.isArray(other)) { rgb2 = _.slice(other, 0, Math.max(other.length, 3)); } else if (_.isObject(other...
[ "function", "(", "env", ",", "op", ",", "other", ")", "{", "var", "result", "=", "[", "]", ",", "rgb2", ";", "if", "(", "other", "instanceof", "tree", ".", "Color", ")", "{", "rgb2", "=", "chroma", "(", "other", ".", "toString", "(", ")", ")", ...
Operations have to be done in RGB per-channel, if not, channels will spill onto each other. Once we have our result, in the form of an integer triplet, we create a new Color node to hold the result.
[ "Operations", "have", "to", "be", "done", "in", "RGB", "per", "-", "channel", "if", "not", "channels", "will", "spill", "onto", "each", "other", ".", "Once", "we", "have", "our", "result", "in", "the", "form", "of", "an", "integer", "triplet", "we", "c...
13a3962315b61b892f4ad64053cd3a2f67824f74
https://github.com/mapbox/carto/blob/13a3962315b61b892f4ad64053cd3a2f67824f74/lib/carto/tree/color.js#L100-L141
train
mozilla-comm/ical.js
build/ical.js
function(vcal) { var allsubs, properties, vtimezones, reqTzid, i, tzid; if (!vcal || vcal.name !== "vcalendar") { //not a top-level vcalendar component return vcal; } //Store vtimezone subcomponents in an object reference by tzid. //Store properties from everything else in another arra...
javascript
function(vcal) { var allsubs, properties, vtimezones, reqTzid, i, tzid; if (!vcal || vcal.name !== "vcalendar") { //not a top-level vcalendar component return vcal; } //Store vtimezone subcomponents in an object reference by tzid. //Store properties from everything else in another arra...
[ "function", "(", "vcal", ")", "{", "var", "allsubs", ",", "properties", ",", "vtimezones", ",", "reqTzid", ",", "i", ",", "tzid", ";", "if", "(", "!", "vcal", "||", "vcal", ".", "name", "!==", "\"vcalendar\"", ")", "{", "//not a top-level vcalendar compone...
Compiles a list of all referenced TZIDs in all subcomponents and removes any extra VTIMEZONE subcomponents. In addition, if any TZIDs are referenced by a component, but a VTIMEZONE does not exist, an attempt will be made to generate a VTIMEZONE using ICAL.TimezoneService. @param {ICAL.Component} vcal The top-level...
[ "Compiles", "a", "list", "of", "all", "referenced", "TZIDs", "in", "all", "subcomponents", "and", "removes", "any", "extra", "VTIMEZONE", "subcomponents", ".", "In", "addition", "if", "any", "TZIDs", "are", "referenced", "by", "a", "component", "but", "a", "...
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L50-L99
train
mozilla-comm/ical.js
build/ical.js
function(string) { var result = parseInt(string, 10); if (ICAL.helpers.isStrictlyNaN(result)) { throw new Error( 'Could not extract integer from "' + string + '"' ); } return result; }
javascript
function(string) { var result = parseInt(string, 10); if (ICAL.helpers.isStrictlyNaN(result)) { throw new Error( 'Could not extract integer from "' + string + '"' ); } return result; }
[ "function", "(", "string", ")", "{", "var", "result", "=", "parseInt", "(", "string", ",", "10", ")", ";", "if", "(", "ICAL", ".", "helpers", ".", "isStrictlyNaN", "(", "result", ")", ")", "{", "throw", "new", "Error", "(", "'Could not extract integer fr...
Parses a string value that is expected to be an integer, when the valid is not an integer throws a decoration error. @param {String} string Raw string input @return {Number} Parsed integer
[ "Parses", "a", "string", "value", "that", "is", "expected", "to", "be", "an", "integer", "when", "the", "valid", "is", "not", "an", "integer", "throws", "a", "decoration", "error", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L118-L128
train
mozilla-comm/ical.js
build/ical.js
formatClassType
function formatClassType(data, type) { if (typeof(data) === 'undefined') { return undefined; } if (data instanceof type) { return data; } return new type(data); }
javascript
function formatClassType(data, type) { if (typeof(data) === 'undefined') { return undefined; } if (data instanceof type) { return data; } return new type(data); }
[ "function", "formatClassType", "(", "data", ",", "type", ")", "{", "if", "(", "typeof", "(", "data", ")", "===", "'undefined'", ")", "{", "return", "undefined", ";", "}", "if", "(", "data", "instanceof", "type", ")", "{", "return", "data", ";", "}", ...
Creates or returns a class instance of a given type with the initialization data if the data is not already an instance of the given type. @example var time = new ICAL.Time(...); var result = ICAL.helpers.formatClassType(time, ICAL.Time); (result instanceof ICAL.Time) // => true result = ICAL.helpers.formatClassType...
[ "Creates", "or", "returns", "a", "class", "instance", "of", "a", "given", "type", "with", "the", "initialization", "data", "if", "the", "data", "is", "not", "already", "an", "instance", "of", "the", "given", "type", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L150-L159
train
mozilla-comm/ical.js
build/ical.js
function(buffer, search, pos) { while ((pos = buffer.indexOf(search, pos)) !== -1) { if (pos > 0 && buffer[pos - 1] === '\\') { pos += 1; } else { return pos; } } return -1; }
javascript
function(buffer, search, pos) { while ((pos = buffer.indexOf(search, pos)) !== -1) { if (pos > 0 && buffer[pos - 1] === '\\') { pos += 1; } else { return pos; } } return -1; }
[ "function", "(", "buffer", ",", "search", ",", "pos", ")", "{", "while", "(", "(", "pos", "=", "buffer", ".", "indexOf", "(", "search", ",", "pos", ")", ")", "!==", "-", "1", ")", "{", "if", "(", "pos", ">", "0", "&&", "buffer", "[", "pos", "...
Identical to indexOf but will only match values when they are not preceded by a backslash character. @param {String} buffer String to search @param {String} search Value to look for @param {Number} pos Start position @return {Number} The position, or -1 if not found
[ "Identical", "to", "indexOf", "but", "will", "only", "match", "values", "when", "they", "are", "not", "preceded", "by", "a", "backslash", "character", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L170-L179
train
mozilla-comm/ical.js
build/ical.js
function(list, seekVal, cmpfunc) { if (!list.length) return 0; var low = 0, high = list.length - 1, mid, cmpval; while (low <= high) { mid = low + Math.floor((high - low) / 2); cmpval = cmpfunc(seekVal, list[mid]); if (cmpval < 0) high = mid - 1; else if (cmp...
javascript
function(list, seekVal, cmpfunc) { if (!list.length) return 0; var low = 0, high = list.length - 1, mid, cmpval; while (low <= high) { mid = low + Math.floor((high - low) / 2); cmpval = cmpfunc(seekVal, list[mid]); if (cmpval < 0) high = mid - 1; else if (cmp...
[ "function", "(", "list", ",", "seekVal", ",", "cmpfunc", ")", "{", "if", "(", "!", "list", ".", "length", ")", "return", "0", ";", "var", "low", "=", "0", ",", "high", "=", "list", ".", "length", "-", "1", ",", "mid", ",", "cmpval", ";", "while...
Find the index for insertion using binary search. @param {Array} list The list to search @param {?} seekVal The value to insert @param {function(?,?)} cmpfunc The comparison func, that can compare two seekVals @return {Number} The insert position
[ "Find", "the", "index", "for", "insertion", "using", "binary", "search", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L190-L215
train
mozilla-comm/ical.js
build/ical.js
function() { if (!ICAL.debug) { return; } if (typeof (console) !== 'undefined' && 'log' in console) { ICAL.helpers.dumpn = function consoleDumpn(input) { console.log(input); }; } else { ICAL.helpers.dumpn = function geckoDumpn(input) { dump(input + '\n'); }...
javascript
function() { if (!ICAL.debug) { return; } if (typeof (console) !== 'undefined' && 'log' in console) { ICAL.helpers.dumpn = function consoleDumpn(input) { console.log(input); }; } else { ICAL.helpers.dumpn = function geckoDumpn(input) { dump(input + '\n'); }...
[ "function", "(", ")", "{", "if", "(", "!", "ICAL", ".", "debug", ")", "{", "return", ";", "}", "if", "(", "typeof", "(", "console", ")", "!==", "'undefined'", "&&", "'log'", "in", "console", ")", "{", "ICAL", ".", "helpers", ".", "dumpn", "=", "f...
Convenience function for debug output @private
[ "Convenience", "function", "for", "debug", "output" ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L221-L237
train
mozilla-comm/ical.js
build/ical.js
function(aSrc, aDeep) { if (!aSrc || typeof aSrc != "object") { return aSrc; } else if (aSrc instanceof Date) { return new Date(aSrc.getTime()); } else if ("clone" in aSrc) { return aSrc.clone(); } else if (Array.isArray(aSrc)) { var arr = []; for (var i = 0; i < aSrc.lengt...
javascript
function(aSrc, aDeep) { if (!aSrc || typeof aSrc != "object") { return aSrc; } else if (aSrc instanceof Date) { return new Date(aSrc.getTime()); } else if ("clone" in aSrc) { return aSrc.clone(); } else if (Array.isArray(aSrc)) { var arr = []; for (var i = 0; i < aSrc.lengt...
[ "function", "(", "aSrc", ",", "aDeep", ")", "{", "if", "(", "!", "aSrc", "||", "typeof", "aSrc", "!=", "\"object\"", ")", "{", "return", "aSrc", ";", "}", "else", "if", "(", "aSrc", "instanceof", "Date", ")", "{", "return", "new", "Date", "(", "aSr...
Clone the passed object or primitive. By default a shallow clone will be executed. @param {*} aSrc The thing to clone @param {Boolean=} aDeep If true, a deep clone will be performed @return {*} The copy of the thing
[ "Clone", "the", "passed", "object", "or", "primitive", ".", "By", "default", "a", "shallow", "clone", "will", "be", "executed", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L247-L275
train
mozilla-comm/ical.js
build/ical.js
foldline
function foldline(aLine) { var result = ""; var line = aLine || ""; while (line.length) { result += ICAL.newLineChar + " " + line.substr(0, ICAL.foldLength); line = line.substr(ICAL.foldLength); } return result.substr(ICAL.newLineChar.length + 1); }
javascript
function foldline(aLine) { var result = ""; var line = aLine || ""; while (line.length) { result += ICAL.newLineChar + " " + line.substr(0, ICAL.foldLength); line = line.substr(ICAL.foldLength); } return result.substr(ICAL.newLineChar.length + 1); }
[ "function", "foldline", "(", "aLine", ")", "{", "var", "result", "=", "\"\"", ";", "var", "line", "=", "aLine", "||", "\"\"", ";", "while", "(", "line", ".", "length", ")", "{", "result", "+=", "ICAL", ".", "newLineChar", "+", "\" \"", "+", "line", ...
Performs iCalendar line folding. A line ending character is inserted and the next line begins with a whitespace. @example SUMMARY:This line will be fold ed right in the middle of a word. @param {String} aLine The line to fold @return {String} The folded line
[ "Performs", "iCalendar", "line", "folding", ".", "A", "line", "ending", "character", "is", "inserted", "and", "the", "next", "line", "begins", "with", "a", "whitespace", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L288-L297
train
mozilla-comm/ical.js
build/ical.js
pad
function pad(data) { if (typeof(data) !== 'string') { // handle fractions. if (typeof(data) === 'number') { data = parseInt(data); } data = String(data); } var len = data.length; switch (len) { case 0: return '00'; case 1: return '0' + data; ...
javascript
function pad(data) { if (typeof(data) !== 'string') { // handle fractions. if (typeof(data) === 'number') { data = parseInt(data); } data = String(data); } var len = data.length; switch (len) { case 0: return '00'; case 1: return '0' + data; ...
[ "function", "pad", "(", "data", ")", "{", "if", "(", "typeof", "(", "data", ")", "!==", "'string'", ")", "{", "// handle fractions.", "if", "(", "typeof", "(", "data", ")", "===", "'number'", ")", "{", "data", "=", "parseInt", "(", "data", ")", ";", ...
Pads the given string or number with zeros so it will have at least two characters. @param {String|Number} data The string or number to pad @return {String} The number padded as a string
[ "Pads", "the", "given", "string", "or", "number", "with", "zeros", "so", "it", "will", "have", "at", "least", "two", "characters", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L306-L325
train
mozilla-comm/ical.js
build/ical.js
function(base, child, extra) { function F() {} F.prototype = base.prototype; child.prototype = new F(); if (extra) { ICAL.helpers.extend(extra, child.prototype); } }
javascript
function(base, child, extra) { function F() {} F.prototype = base.prototype; child.prototype = new F(); if (extra) { ICAL.helpers.extend(extra, child.prototype); } }
[ "function", "(", "base", ",", "child", ",", "extra", ")", "{", "function", "F", "(", ")", "{", "}", "F", ".", "prototype", "=", "base", ".", "prototype", ";", "child", ".", "prototype", "=", "new", "F", "(", ")", ";", "if", "(", "extra", ")", "...
Poor-man's cross-browser inheritance for JavaScript. Doesn't support all the features, but enough for our usage. @param {Function} base The base class constructor function. @param {Function} child The child class constructor function. @param {Object} extra Extends the prototype with extra properties and me...
[ "Poor", "-", "man", "s", "cross", "-", "browser", "inheritance", "for", "JavaScript", ".", "Doesn", "t", "support", "all", "the", "features", "but", "enough", "for", "our", "usage", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L346-L354
train
mozilla-comm/ical.js
build/ical.js
function(source, target) { for (var key in source) { var descr = Object.getOwnPropertyDescriptor(source, key); if (descr && !Object.getOwnPropertyDescriptor(target, key)) { Object.defineProperty(target, key, descr); } } return target; }
javascript
function(source, target) { for (var key in source) { var descr = Object.getOwnPropertyDescriptor(source, key); if (descr && !Object.getOwnPropertyDescriptor(target, key)) { Object.defineProperty(target, key, descr); } } return target; }
[ "function", "(", "source", ",", "target", ")", "{", "for", "(", "var", "key", "in", "source", ")", "{", "var", "descr", "=", "Object", ".", "getOwnPropertyDescriptor", "(", "source", ",", "key", ")", ";", "if", "(", "descr", "&&", "!", "Object", ".",...
Poor-man's cross-browser object extension. Doesn't support all the features, but enough for our usage. Note that the target's properties are not overwritten with the source properties. @example var child = ICAL.helpers.extend(parent, { "bar": 123 }); @param {Object} source The object to extend @param {Object} tar...
[ "Poor", "-", "man", "s", "cross", "-", "browser", "object", "extension", ".", "Doesn", "t", "support", "all", "the", "features", "but", "enough", "for", "our", "usage", ".", "Note", "that", "the", "target", "s", "properties", "are", "not", "overwritten", ...
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L370-L378
train
mozilla-comm/ical.js
build/ical.js
function(componentName) { var isInDesign = componentName && componentName in design.components; return isInDesign ? design.components[componentName] : design.defaultSet; }
javascript
function(componentName) { var isInDesign = componentName && componentName in design.components; return isInDesign ? design.components[componentName] : design.defaultSet; }
[ "function", "(", "componentName", ")", "{", "var", "isInDesign", "=", "componentName", "&&", "componentName", "in", "design", ".", "components", ";", "return", "isInDesign", "?", "design", ".", "components", "[", "componentName", "]", ":", "design", ".", "defa...
Gets the design set for the given component name. @param {String} componentName The name of the component @return {ICAL.design.designSet} The design set for the component
[ "Gets", "the", "design", "set", "for", "the", "given", "component", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L1359-L1362
train
mozilla-comm/ical.js
build/ical.js
ParserError
function ParserError(message) { this.message = message; this.name = 'ParserError'; try { throw new Error(); } catch (e) { if (e.stack) { var split = e.stack.split('\n'); split.shift(); this.stack = split.join('\n'); } } }
javascript
function ParserError(message) { this.message = message; this.name = 'ParserError'; try { throw new Error(); } catch (e) { if (e.stack) { var split = e.stack.split('\n'); split.shift(); this.stack = split.join('\n'); } } }
[ "function", "ParserError", "(", "message", ")", "{", "this", ".", "message", "=", "message", ";", "this", ".", "name", "=", "'ParserError'", ";", "try", "{", "throw", "new", "Error", "(", ")", ";", "}", "catch", "(", "e", ")", "{", "if", "(", "e", ...
An error that occurred during parsing. @param {String} message The error message @memberof ICAL.parse @extends {Error} @class
[ "An", "error", "that", "occurred", "during", "parsing", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L1697-L1710
train
mozilla-comm/ical.js
build/ical.js
function(name) { if (name) { var i = 0; var comps = this.jCal[COMPONENT_INDEX]; var len = comps.length; for (; i < len; i++) { if (comps[i][NAME_INDEX] === name) { var result = this._hydrateComponent(i); return result; } } ...
javascript
function(name) { if (name) { var i = 0; var comps = this.jCal[COMPONENT_INDEX]; var len = comps.length; for (; i < len; i++) { if (comps[i][NAME_INDEX] === name) { var result = this._hydrateComponent(i); return result; } } ...
[ "function", "(", "name", ")", "{", "if", "(", "name", ")", "{", "var", "i", "=", "0", ";", "var", "comps", "=", "this", ".", "jCal", "[", "COMPONENT_INDEX", "]", ";", "var", "len", "=", "comps", ".", "length", ";", "for", "(", ";", "i", "<", ...
Finds first sub component, optionally filtered by name. @param {String=} name Optional name to filter by @return {?ICAL.Component} The found subcomponent
[ "Finds", "first", "sub", "component", "optionally", "filtered", "by", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2336-L2356
train
mozilla-comm/ical.js
build/ical.js
function(name) { var jCalLen = this.jCal[COMPONENT_INDEX].length; var i = 0; if (name) { var comps = this.jCal[COMPONENT_INDEX]; var result = []; for (; i < jCalLen; i++) { if (name === comps[i][NAME_INDEX]) { result.push( this._hydrateComp...
javascript
function(name) { var jCalLen = this.jCal[COMPONENT_INDEX].length; var i = 0; if (name) { var comps = this.jCal[COMPONENT_INDEX]; var result = []; for (; i < jCalLen; i++) { if (name === comps[i][NAME_INDEX]) { result.push( this._hydrateComp...
[ "function", "(", "name", ")", "{", "var", "jCalLen", "=", "this", ".", "jCal", "[", "COMPONENT_INDEX", "]", ".", "length", ";", "var", "i", "=", "0", ";", "if", "(", "name", ")", "{", "var", "comps", "=", "this", ".", "jCal", "[", "COMPONENT_INDEX"...
Finds all sub components, optionally filtering by name. @param {String=} name Optional name to filter by @return {ICAL.Component[]} The found sub components
[ "Finds", "all", "sub", "components", "optionally", "filtering", "by", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2364-L2390
train
mozilla-comm/ical.js
build/ical.js
function(name) { var props = this.jCal[PROPERTY_INDEX]; var len = props.length; var i = 0; for (; i < len; i++) { // 0 is property name if (props[i][NAME_INDEX] === name) { return true; } } return false; }
javascript
function(name) { var props = this.jCal[PROPERTY_INDEX]; var len = props.length; var i = 0; for (; i < len; i++) { // 0 is property name if (props[i][NAME_INDEX] === name) { return true; } } return false; }
[ "function", "(", "name", ")", "{", "var", "props", "=", "this", ".", "jCal", "[", "PROPERTY_INDEX", "]", ";", "var", "len", "=", "props", ".", "length", ";", "var", "i", "=", "0", ";", "for", "(", ";", "i", "<", "len", ";", "i", "++", ")", "{...
Returns true when a named property exists. @param {String} name The property name @return {Boolean} True, when property is found
[ "Returns", "true", "when", "a", "named", "property", "exists", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2398-L2411
train
mozilla-comm/ical.js
build/ical.js
function(name) { if (name) { var i = 0; var props = this.jCal[PROPERTY_INDEX]; var len = props.length; for (; i < len; i++) { if (props[i][NAME_INDEX] === name) { var result = this._hydrateProperty(i); return result; } } } ...
javascript
function(name) { if (name) { var i = 0; var props = this.jCal[PROPERTY_INDEX]; var len = props.length; for (; i < len; i++) { if (props[i][NAME_INDEX] === name) { var result = this._hydrateProperty(i); return result; } } } ...
[ "function", "(", "name", ")", "{", "if", "(", "name", ")", "{", "var", "i", "=", "0", ";", "var", "props", "=", "this", ".", "jCal", "[", "PROPERTY_INDEX", "]", ";", "var", "len", "=", "props", ".", "length", ";", "for", "(", ";", "i", "<", "...
Finds the first property, optionally with the given name. @param {String=} name Lowercase property name @return {?ICAL.Property} The found property
[ "Finds", "the", "first", "property", "optionally", "with", "the", "given", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2419-L2438
train
mozilla-comm/ical.js
build/ical.js
function(name) { var jCalLen = this.jCal[PROPERTY_INDEX].length; var i = 0; if (name) { var props = this.jCal[PROPERTY_INDEX]; var result = []; for (; i < jCalLen; i++) { if (name === props[i][NAME_INDEX]) { result.push( this._hydrateProper...
javascript
function(name) { var jCalLen = this.jCal[PROPERTY_INDEX].length; var i = 0; if (name) { var props = this.jCal[PROPERTY_INDEX]; var result = []; for (; i < jCalLen; i++) { if (name === props[i][NAME_INDEX]) { result.push( this._hydrateProper...
[ "function", "(", "name", ")", "{", "var", "jCalLen", "=", "this", ".", "jCal", "[", "PROPERTY_INDEX", "]", ".", "length", ";", "var", "i", "=", "0", ";", "if", "(", "name", ")", "{", "var", "props", "=", "this", ".", "jCal", "[", "PROPERTY_INDEX", ...
Get all properties in the component, optionally filtered by name. @param {String=} name Lowercase property name @return {ICAL.Property[]} List of properties
[ "Get", "all", "properties", "in", "the", "component", "optionally", "filtered", "by", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2461-L2487
train
mozilla-comm/ical.js
build/ical.js
function(component) { if (!this._components) { this._components = []; this._hydratedComponentCount = 0; } if (component.parent) { component.parent.removeSubcomponent(component); } var idx = this.jCal[COMPONENT_INDEX].push(component.jCal); this._components[id...
javascript
function(component) { if (!this._components) { this._components = []; this._hydratedComponentCount = 0; } if (component.parent) { component.parent.removeSubcomponent(component); } var idx = this.jCal[COMPONENT_INDEX].push(component.jCal); this._components[id...
[ "function", "(", "component", ")", "{", "if", "(", "!", "this", ".", "_components", ")", "{", "this", ".", "_components", "=", "[", "]", ";", "this", ".", "_hydratedComponentCount", "=", "0", ";", "}", "if", "(", "component", ".", "parent", ")", "{",...
Adds a single sub component. @param {ICAL.Component} component The component to add @return {ICAL.Component} The passed in component
[ "Adds", "a", "single", "sub", "component", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2553-L2568
train
mozilla-comm/ical.js
build/ical.js
function(name, value) { var prop = new ICAL.Property(name); prop.setValue(value); this.addProperty(prop); return prop; }
javascript
function(name, value) { var prop = new ICAL.Property(name); prop.setValue(value); this.addProperty(prop); return prop; }
[ "function", "(", "name", ",", "value", ")", "{", "var", "prop", "=", "new", "ICAL", ".", "Property", "(", "name", ")", ";", "prop", ".", "setValue", "(", "value", ")", ";", "this", ".", "addProperty", "(", "prop", ")", ";", "return", "prop", ";", ...
Helper method to add a property with a value to the component. @param {String} name Property name to add @param {String|Number|Object} value Property value @return {ICAL.Property} The created property
[ "Helper", "method", "to", "add", "a", "property", "with", "a", "value", "to", "the", "component", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2631-L2638
train
mozilla-comm/ical.js
build/ical.js
function(name, value) { var prop = this.getFirstProperty(name); if (prop) { prop.setValue(value); } else { prop = this.addPropertyWithValue(name, value); } return prop; }
javascript
function(name, value) { var prop = this.getFirstProperty(name); if (prop) { prop.setValue(value); } else { prop = this.addPropertyWithValue(name, value); } return prop; }
[ "function", "(", "name", ",", "value", ")", "{", "var", "prop", "=", "this", ".", "getFirstProperty", "(", "name", ")", ";", "if", "(", "prop", ")", "{", "prop", ".", "setValue", "(", "value", ")", ";", "}", "else", "{", "prop", "=", "this", ".",...
Helper method that will update or create a property of the given name and sets its value. If multiple properties with the given name exist, only the first is updated. @param {String} name Property name to update @param {String|Number|Object} value Property value @return {ICAL.Property} ...
[ "Helper", "method", "that", "will", "update", "or", "create", "a", "property", "of", "the", "given", "name", "and", "sets", "its", "value", ".", "If", "multiple", "properties", "with", "the", "given", "name", "exist", "only", "the", "first", "is", "updated...
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2649-L2659
train
mozilla-comm/ical.js
build/ical.js
function() { var designSet = this._designSet; if (this.type in designSet.value) { var designType = designSet.value[this.type]; if ('decorate' in designSet.value[this.type]) { this.isDecorated = true; } else { this.isDecorated = false; } if (this...
javascript
function() { var designSet = this._designSet; if (this.type in designSet.value) { var designType = designSet.value[this.type]; if ('decorate' in designSet.value[this.type]) { this.isDecorated = true; } else { this.isDecorated = false; } if (this...
[ "function", "(", ")", "{", "var", "designSet", "=", "this", ".", "_designSet", ";", "if", "(", "this", ".", "type", "in", "designSet", ".", "value", ")", "{", "var", "designType", "=", "designSet", ".", "value", "[", "this", ".", "type", "]", ";", ...
Updates the type metadata from the current jCal type and design set. @private
[ "Updates", "the", "type", "metadata", "from", "the", "current", "jCal", "type", "and", "design", "set", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2830-L2847
train
mozilla-comm/ical.js
build/ical.js
function(value, index) { if (!this._values) { this._values = []; } if (typeof(value) === 'object' && 'icaltype' in value) { // decorated value this.jCal[VALUE_INDEX + index] = this._undecorate(value); this._values[index] = value; } else { // undecorated v...
javascript
function(value, index) { if (!this._values) { this._values = []; } if (typeof(value) === 'object' && 'icaltype' in value) { // decorated value this.jCal[VALUE_INDEX + index] = this._undecorate(value); this._values[index] = value; } else { // undecorated v...
[ "function", "(", "value", ",", "index", ")", "{", "if", "(", "!", "this", ".", "_values", ")", "{", "this", ".", "_values", "=", "[", "]", ";", "}", "if", "(", "typeof", "(", "value", ")", "===", "'object'", "&&", "'icaltype'", "in", "value", ")"...
Sets the value at the given index while also hydrating it. The passed value can either be a decorated or undecorated value. @private @param {?} value The value to set @param {Number} index The index to set it at
[ "Sets", "the", "value", "at", "the", "given", "index", "while", "also", "hydrating", "it", ".", "The", "passed", "value", "can", "either", "be", "a", "decorated", "or", "undecorated", "value", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2910-L2924
train
mozilla-comm/ical.js
build/ical.js
function(name, value) { var lcname = name.toLowerCase(); if (typeof value === "string" && lcname in this._designSet.param && 'multiValue' in this._designSet.param[lcname]) { value = [value]; } this.jCal[PROP_INDEX][name] = value; }
javascript
function(name, value) { var lcname = name.toLowerCase(); if (typeof value === "string" && lcname in this._designSet.param && 'multiValue' in this._designSet.param[lcname]) { value = [value]; } this.jCal[PROP_INDEX][name] = value; }
[ "function", "(", "name", ",", "value", ")", "{", "var", "lcname", "=", "name", ".", "toLowerCase", "(", ")", ";", "if", "(", "typeof", "value", "===", "\"string\"", "&&", "lcname", "in", "this", ".", "_designSet", ".", "param", "&&", "'multiValue'", "i...
Sets a parameter on the property. @param {String} name The parameter name @param {Array|String} value The parameter value
[ "Sets", "a", "parameter", "on", "the", "property", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2962-L2970
train
mozilla-comm/ical.js
build/ical.js
function() { var name = this.jCal[NAME_INDEX]; var designSet = this._designSet; if (name in designSet.property) { var details = designSet.property[name]; if ('defaultType' in details) { return details.defaultType; } } return design.defaultType; }
javascript
function() { var name = this.jCal[NAME_INDEX]; var designSet = this._designSet; if (name in designSet.property) { var details = designSet.property[name]; if ('defaultType' in details) { return details.defaultType; } } return design.defaultType; }
[ "function", "(", ")", "{", "var", "name", "=", "this", ".", "jCal", "[", "NAME_INDEX", "]", ";", "var", "designSet", "=", "this", ".", "_designSet", ";", "if", "(", "name", "in", "designSet", ".", "property", ")", "{", "var", "details", "=", "designS...
Get the default type based on this property's name. @return {String} The default type for this property
[ "Get", "the", "default", "type", "based", "on", "this", "property", "s", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L2986-L2997
train
mozilla-comm/ical.js
build/ical.js
function() { var len = this.jCal.length - VALUE_INDEX; if (len < 1) { // its possible for a property to have no value. return []; } var i = 0; var result = []; for (; i < len; i++) { result[i] = this._hydrateValue(i); } return result; }
javascript
function() { var len = this.jCal.length - VALUE_INDEX; if (len < 1) { // its possible for a property to have no value. return []; } var i = 0; var result = []; for (; i < len; i++) { result[i] = this._hydrateValue(i); } return result; }
[ "function", "(", ")", "{", "var", "len", "=", "this", ".", "jCal", ".", "length", "-", "VALUE_INDEX", ";", "if", "(", "len", "<", "1", ")", "{", "// its possible for a property to have no value.", "return", "[", "]", ";", "}", "var", "i", "=", "0", ";"...
Gets all values on the property. NOTE: this creates an array during each call. @return {Array} List of values
[ "Gets", "all", "values", "on", "the", "property", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3027-L3043
train
mozilla-comm/ical.js
build/ical.js
function(values) { if (!this.isMultiValue) { throw new Error( this.name + ': does not not support mulitValue.\n' + 'override isMultiValue' ); } var len = values.length; var i = 0; this.removeAllValues(); if (len > 0 && typeof(values[0])...
javascript
function(values) { if (!this.isMultiValue) { throw new Error( this.name + ': does not not support mulitValue.\n' + 'override isMultiValue' ); } var len = values.length; var i = 0; this.removeAllValues(); if (len > 0 && typeof(values[0])...
[ "function", "(", "values", ")", "{", "if", "(", "!", "this", ".", "isMultiValue", ")", "{", "throw", "new", "Error", "(", "this", ".", "name", "+", "': does not not support mulitValue.\\n'", "+", "'override isMultiValue'", ")", ";", "}", "var", "len", "=", ...
Sets the values of the property. Will overwrite the existing values. This can only be used for multi-value properties. @param {Array} values An array of values
[ "Sets", "the", "values", "of", "the", "property", ".", "Will", "overwrite", "the", "existing", "values", ".", "This", "can", "only", "be", "used", "for", "multi", "-", "value", "properties", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3061-L3088
train
mozilla-comm/ical.js
build/ical.js
function(value) { this.removeAllValues(); if (typeof(value) === 'object' && 'icaltype' in value) { this.resetType(value.icaltype); } if (this.isDecorated) { this._setDecoratedValue(value, 0); } else { this.jCal[VALUE_INDEX] = value; } }
javascript
function(value) { this.removeAllValues(); if (typeof(value) === 'object' && 'icaltype' in value) { this.resetType(value.icaltype); } if (this.isDecorated) { this._setDecoratedValue(value, 0); } else { this.jCal[VALUE_INDEX] = value; } }
[ "function", "(", "value", ")", "{", "this", ".", "removeAllValues", "(", ")", ";", "if", "(", "typeof", "(", "value", ")", "===", "'object'", "&&", "'icaltype'", "in", "value", ")", "{", "this", ".", "resetType", "(", "value", ".", "icaltype", ")", "...
Sets the current value of the property. If this is a multi-value property, all other values will be removed. @param {String|Object} value New property value.
[ "Sets", "the", "current", "value", "of", "the", "property", ".", "If", "this", "is", "a", "multi", "-", "value", "property", "all", "other", "values", "will", "be", "removed", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3096-L3107
train
mozilla-comm/ical.js
build/ical.js
icaltime_compare
function icaltime_compare(other) { var a = this.toSeconds(); var b = other.toSeconds(); return (a > b) - (b > a); }
javascript
function icaltime_compare(other) { var a = this.toSeconds(); var b = other.toSeconds(); return (a > b) - (b > a); }
[ "function", "icaltime_compare", "(", "other", ")", "{", "var", "a", "=", "this", ".", "toSeconds", "(", ")", ";", "var", "b", "=", "other", ".", "toSeconds", "(", ")", ";", "return", "(", "a", ">", "b", ")", "-", "(", "b", ">", "a", ")", ";", ...
Compare this utc offset with another one. @param {ICAL.UtcOffset} other The other offset to compare with @return {Number} -1, 0 or 1 for less/equal/greater
[ "Compare", "this", "utc", "offset", "with", "another", "one", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3261-L3265
train
mozilla-comm/ical.js
build/ical.js
function() { return ICAL.Period.fromData({ start: this.start ? this.start.clone() : null, end: this.end ? this.end.clone() : null, duration: this.duration ? this.duration.clone() : null }); }
javascript
function() { return ICAL.Period.fromData({ start: this.start ? this.start.clone() : null, end: this.end ? this.end.clone() : null, duration: this.duration ? this.duration.clone() : null }); }
[ "function", "(", ")", "{", "return", "ICAL", ".", "Period", ".", "fromData", "(", "{", "start", ":", "this", ".", "start", "?", "this", ".", "start", ".", "clone", "(", ")", ":", "null", ",", "end", ":", "this", ".", "end", "?", "this", ".", "e...
Returns a clone of the duration object. @return {ICAL.Period} The cloned object
[ "Returns", "a", "clone", "of", "the", "duration", "object", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3609-L3615
train
mozilla-comm/ical.js
build/ical.js
toSeconds
function toSeconds() { var seconds = this.seconds + 60 * this.minutes + 3600 * this.hours + 86400 * this.days + 7 * 86400 * this.weeks; return (this.isNegative ? -seconds : seconds); }
javascript
function toSeconds() { var seconds = this.seconds + 60 * this.minutes + 3600 * this.hours + 86400 * this.days + 7 * 86400 * this.weeks; return (this.isNegative ? -seconds : seconds); }
[ "function", "toSeconds", "(", ")", "{", "var", "seconds", "=", "this", ".", "seconds", "+", "60", "*", "this", ".", "minutes", "+", "3600", "*", "this", ".", "hours", "+", "86400", "*", "this", ".", "days", "+", "7", "*", "86400", "*", "this", "....
The duration value expressed as a number of seconds. @return {Number} The duration value in seconds
[ "The", "duration", "value", "expressed", "as", "a", "number", "of", "seconds", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3844-L3848
train
mozilla-comm/ical.js
build/ical.js
compare
function compare(aOther) { var thisSeconds = this.toSeconds(); var otherSeconds = aOther.toSeconds(); return (thisSeconds > otherSeconds) - (thisSeconds < otherSeconds); }
javascript
function compare(aOther) { var thisSeconds = this.toSeconds(); var otherSeconds = aOther.toSeconds(); return (thisSeconds > otherSeconds) - (thisSeconds < otherSeconds); }
[ "function", "compare", "(", "aOther", ")", "{", "var", "thisSeconds", "=", "this", ".", "toSeconds", "(", ")", ";", "var", "otherSeconds", "=", "aOther", ".", "toSeconds", "(", ")", ";", "return", "(", "thisSeconds", ">", "otherSeconds", ")", "-", "(", ...
Compares the duration instance with another one. @param {ICAL.Duration} aOther The instance to compare with @return {Number} -1, 0 or 1 for less/equal/greater
[ "Compares", "the", "duration", "instance", "with", "another", "one", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3930-L3934
train
mozilla-comm/ical.js
build/ical.js
parseDurationChunk
function parseDurationChunk(letter, number, object) { var type; switch (letter) { case 'P': if (number && number === '-') { object.isNegative = true; } else { object.isNegative = false; } // period break; case 'D': type = 'days'; ...
javascript
function parseDurationChunk(letter, number, object) { var type; switch (letter) { case 'P': if (number && number === '-') { object.isNegative = true; } else { object.isNegative = false; } // period break; case 'D': type = 'days'; ...
[ "function", "parseDurationChunk", "(", "letter", ",", "number", ",", "object", ")", "{", "var", "type", ";", "switch", "(", "letter", ")", "{", "case", "'P'", ":", "if", "(", "number", "&&", "number", "===", "'-'", ")", "{", "object", ".", "isNegative"...
Internal helper function to handle a chunk of a duration. @param {String} letter type of duration chunk @param {String} number numeric value or -/+ @param {Object} dict target to assign values to
[ "Internal", "helper", "function", "to", "handle", "a", "chunk", "of", "a", "duration", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L3994-L4041
train
mozilla-comm/ical.js
build/ical.js
utcOffset
function utcOffset(tt) { if (this == ICAL.Timezone.utcTimezone || this == ICAL.Timezone.localTimezone) { return 0; } this._ensureCoverage(tt.year); if (!this.changes.length) { return 0; } var tt_change = { year: tt.year, month: tt.month, day...
javascript
function utcOffset(tt) { if (this == ICAL.Timezone.utcTimezone || this == ICAL.Timezone.localTimezone) { return 0; } this._ensureCoverage(tt.year); if (!this.changes.length) { return 0; } var tt_change = { year: tt.year, month: tt.month, day...
[ "function", "utcOffset", "(", "tt", ")", "{", "if", "(", "this", "==", "ICAL", ".", "Timezone", ".", "utcTimezone", "||", "this", "==", "ICAL", ".", "Timezone", ".", "localTimezone", ")", "{", "return", "0", ";", "}", "this", ".", "_ensureCoverage", "(...
Finds the utcOffset the given time would occur in this timezone. @param {ICAL.Time} tt The time to check for @return {Number} utc offset in seconds
[ "Finds", "the", "utcOffset", "the", "given", "time", "would", "occur", "in", "this", "timezone", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L4262-L4341
train
mozilla-comm/ical.js
build/ical.js
function(name, timezone) { if (name instanceof ICAL.Component) { if (name.name === 'vtimezone') { timezone = new ICAL.Timezone(name); name = timezone.tzid; } } if (timezone instanceof ICAL.Timezone) { zones[name] = timezone; } else { throw new...
javascript
function(name, timezone) { if (name instanceof ICAL.Component) { if (name.name === 'vtimezone') { timezone = new ICAL.Timezone(name); name = timezone.tzid; } } if (timezone instanceof ICAL.Timezone) { zones[name] = timezone; } else { throw new...
[ "function", "(", "name", ",", "timezone", ")", "{", "if", "(", "name", "instanceof", "ICAL", ".", "Component", ")", "{", "if", "(", "name", ".", "name", "===", "'vtimezone'", ")", "{", "timezone", "=", "new", "ICAL", ".", "Timezone", "(", "name", ")"...
Registers a timezone object or component. @param {String=} name The name of the timezone. Defaults to the component's TZID if not passed. @param {ICAL.Component|ICAL.Timezone} zone The initialized zone or vtimezone.
[ "Registers", "a", "timezone", "object", "or", "component", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L4689-L4702
train
mozilla-comm/ical.js
build/ical.js
icaltime_fromJSDate
function icaltime_fromJSDate(aDate, useUTC) { if (!aDate) { this.reset(); } else { if (useUTC) { this.zone = ICAL.Timezone.utcTimezone; this.year = aDate.getUTCFullYear(); this.month = aDate.getUTCMonth() + 1; this.day = aDate.getUTCDate(); t...
javascript
function icaltime_fromJSDate(aDate, useUTC) { if (!aDate) { this.reset(); } else { if (useUTC) { this.zone = ICAL.Timezone.utcTimezone; this.year = aDate.getUTCFullYear(); this.month = aDate.getUTCMonth() + 1; this.day = aDate.getUTCDate(); t...
[ "function", "icaltime_fromJSDate", "(", "aDate", ",", "useUTC", ")", "{", "if", "(", "!", "aDate", ")", "{", "this", ".", "reset", "(", ")", ";", "}", "else", "{", "if", "(", "useUTC", ")", "{", "this", ".", "zone", "=", "ICAL", ".", "Timezone", ...
Set up the current instance from the Javascript date value. @param {?Date} aDate The Javascript Date to read, or null to reset @param {Boolean} useUTC If true, the UTC values of the date will be used
[ "Set", "up", "the", "current", "instance", "from", "the", "Javascript", "date", "value", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L4863-L4887
train
mozilla-comm/ical.js
build/ical.js
icaltime_dayOfWeek
function icaltime_dayOfWeek() { var dowCacheKey = (this.year << 9) + (this.month << 5) + this.day; if (dowCacheKey in ICAL.Time._dowCache) { return ICAL.Time._dowCache[dowCacheKey]; } // Using Zeller's algorithm var q = this.day; var m = this.month + (this.month < 3 ? 12 : 0...
javascript
function icaltime_dayOfWeek() { var dowCacheKey = (this.year << 9) + (this.month << 5) + this.day; if (dowCacheKey in ICAL.Time._dowCache) { return ICAL.Time._dowCache[dowCacheKey]; } // Using Zeller's algorithm var q = this.day; var m = this.month + (this.month < 3 ? 12 : 0...
[ "function", "icaltime_dayOfWeek", "(", ")", "{", "var", "dowCacheKey", "=", "(", "this", ".", "year", "<<", "9", ")", "+", "(", "this", ".", "month", "<<", "5", ")", "+", "this", ".", "day", ";", "if", "(", "dowCacheKey", "in", "ICAL", ".", "Time",...
Calculate the day of week. @return {ICAL.Time.weekDay}
[ "Calculate", "the", "day", "of", "week", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L4949-L4972
train
mozilla-comm/ical.js
build/ical.js
dayOfYear
function dayOfYear() { var is_leap = (ICAL.Time.isLeapYear(this.year) ? 1 : 0); var diypm = ICAL.Time.daysInYearPassedMonth; return diypm[is_leap][this.month - 1] + this.day; }
javascript
function dayOfYear() { var is_leap = (ICAL.Time.isLeapYear(this.year) ? 1 : 0); var diypm = ICAL.Time.daysInYearPassedMonth; return diypm[is_leap][this.month - 1] + this.day; }
[ "function", "dayOfYear", "(", ")", "{", "var", "is_leap", "=", "(", "ICAL", ".", "Time", ".", "isLeapYear", "(", "this", ".", "year", ")", "?", "1", ":", "0", ")", ";", "var", "diypm", "=", "ICAL", ".", "Time", ".", "daysInYearPassedMonth", ";", "r...
Calculate the day of year. @return {Number}
[ "Calculate", "the", "day", "of", "year", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L4978-L4982
train
mozilla-comm/ical.js
build/ical.js
startDoyWeek
function startDoyWeek(aFirstDayOfWeek) { var firstDow = aFirstDayOfWeek || ICAL.Time.SUNDAY; var delta = this.dayOfWeek() - firstDow; if (delta < 0) delta += 7; return this.dayOfYear() - delta; }
javascript
function startDoyWeek(aFirstDayOfWeek) { var firstDow = aFirstDayOfWeek || ICAL.Time.SUNDAY; var delta = this.dayOfWeek() - firstDow; if (delta < 0) delta += 7; return this.dayOfYear() - delta; }
[ "function", "startDoyWeek", "(", "aFirstDayOfWeek", ")", "{", "var", "firstDow", "=", "aFirstDayOfWeek", "||", "ICAL", ".", "Time", ".", "SUNDAY", ";", "var", "delta", "=", "this", ".", "dayOfWeek", "(", ")", "-", "firstDow", ";", "if", "(", "delta", "<"...
First calculates the start of the week, then returns the day of year for this date. If the day falls into the previous year, the day is zero or negative. @param {ICAL.Time.weekDay=} aFirstDayOfWeek The week start weekday, defaults to SUNDAY @return {Number} The calculated day of year
[ "First", "calculates", "the", "start", "of", "the", "week", "then", "returns", "the", "day", "of", "year", "for", "this", "date", ".", "If", "the", "day", "falls", "into", "the", "previous", "year", "the", "day", "is", "zero", "or", "negative", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5102-L5107
train
mozilla-comm/ical.js
build/ical.js
function(aDayOfWeek, aPos) { var dow = this.dayOfWeek(); if (aPos === 0 && dow === aDayOfWeek) { return true; } // get pos var day = this.nthWeekDay(aDayOfWeek, aPos); if (day === this.day) { return true; } return false; }
javascript
function(aDayOfWeek, aPos) { var dow = this.dayOfWeek(); if (aPos === 0 && dow === aDayOfWeek) { return true; } // get pos var day = this.nthWeekDay(aDayOfWeek, aPos); if (day === this.day) { return true; } return false; }
[ "function", "(", "aDayOfWeek", ",", "aPos", ")", "{", "var", "dow", "=", "this", ".", "dayOfWeek", "(", ")", ";", "if", "(", "aPos", "===", "0", "&&", "dow", "===", "aDayOfWeek", ")", "{", "return", "true", ";", "}", "// get pos", "var", "day", "="...
Checks if current time is the nth weekday, relative to the current month. Will always return false when rule resolves outside of current month. @param {ICAL.Time.weekDay} aDayOfWeek Day of week to check @param {Number} aPos Relative position @return {Boolean} Tru...
[ "Checks", "if", "current", "time", "is", "the", "nth", "weekday", "relative", "to", "the", "current", "month", ".", "Will", "always", "return", "false", "when", "rule", "resolves", "outside", "of", "current", "month", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5216-L5231
train
mozilla-comm/ical.js
build/ical.js
weekNumber
function weekNumber(aWeekStart) { var wnCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + aWeekStart; if (wnCacheKey in ICAL.Time._wnCache) { return ICAL.Time._wnCache[wnCacheKey]; } // This function courtesty of Julian Bucknall, published under the MIT license /...
javascript
function weekNumber(aWeekStart) { var wnCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + aWeekStart; if (wnCacheKey in ICAL.Time._wnCache) { return ICAL.Time._wnCache[wnCacheKey]; } // This function courtesty of Julian Bucknall, published under the MIT license /...
[ "function", "weekNumber", "(", "aWeekStart", ")", "{", "var", "wnCacheKey", "=", "(", "this", ".", "year", "<<", "12", ")", "+", "(", "this", ".", "month", "<<", "8", ")", "+", "(", "this", ".", "day", "<<", "3", ")", "+", "aWeekStart", ";", "if"...
Calculates the ISO 8601 week number. The first week of a year is the week that contains the first Thursday. The year can have 53 weeks, if January 1st is a Friday. Note there are regions where the first week of the year is the one that starts on January 1st, which may offset the week number. Also, if a different week ...
[ "Calculates", "the", "ISO", "8601", "week", "number", ".", "The", "first", "week", "of", "a", "year", "is", "the", "week", "that", "contains", "the", "first", "Thursday", ".", "The", "year", "can", "have", "53", "weeks", "if", "January", "1st", "is", "...
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5247-L5279
train
mozilla-comm/ical.js
build/ical.js
icaltime_add
function icaltime_add(aDuration) { var mult = (aDuration.isNegative ? -1 : 1); // because of the duration optimizations it is much // more efficient to grab all the values up front // then set them directly (which will avoid a normalization call). // So we don't actually normalize until w...
javascript
function icaltime_add(aDuration) { var mult = (aDuration.isNegative ? -1 : 1); // because of the duration optimizations it is much // more efficient to grab all the values up front // then set them directly (which will avoid a normalization call). // So we don't actually normalize until w...
[ "function", "icaltime_add", "(", "aDuration", ")", "{", "var", "mult", "=", "(", "aDuration", ".", "isNegative", "?", "-", "1", ":", "1", ")", ";", "// because of the duration optimizations it is much", "// more efficient to grab all the values up front", "// then set the...
Adds the duration to the current time. The instance is modified in place. @param {ICAL.Duration} aDuration The duration to add
[ "Adds", "the", "duration", "to", "the", "current", "time", ".", "The", "instance", "is", "modified", "in", "place", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5287-L5311
train
mozilla-comm/ical.js
build/ical.js
icaltime_subtract_abs
function icaltime_subtract_abs(aDate) { var unixTime = this.toUnixTime(); var other = aDate.toUnixTime(); return ICAL.Duration.fromSeconds(unixTime - other); }
javascript
function icaltime_subtract_abs(aDate) { var unixTime = this.toUnixTime(); var other = aDate.toUnixTime(); return ICAL.Duration.fromSeconds(unixTime - other); }
[ "function", "icaltime_subtract_abs", "(", "aDate", ")", "{", "var", "unixTime", "=", "this", ".", "toUnixTime", "(", ")", ";", "var", "other", "=", "aDate", ".", "toUnixTime", "(", ")", ";", "return", "ICAL", ".", "Duration", ".", "fromSeconds", "(", "un...
Subtract the date details, taking timezones into account. @param {ICAL.Time} aDate The date to subtract @return {ICAL.Duration} The difference in duration
[ "Subtract", "the", "date", "details", "taking", "timezones", "into", "account", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5333-L5337
train
mozilla-comm/ical.js
build/ical.js
icaltime_compare
function icaltime_compare(other) { var a = this.toUnixTime(); var b = other.toUnixTime(); if (a > b) return 1; if (b > a) return -1; return 0; }
javascript
function icaltime_compare(other) { var a = this.toUnixTime(); var b = other.toUnixTime(); if (a > b) return 1; if (b > a) return -1; return 0; }
[ "function", "icaltime_compare", "(", "other", ")", "{", "var", "a", "=", "this", ".", "toUnixTime", "(", ")", ";", "var", "b", "=", "other", ".", "toUnixTime", "(", ")", ";", "if", "(", "a", ">", "b", ")", "return", "1", ";", "if", "(", "b", ">...
Compares the ICAL.Time instance with another one. @param {ICAL.Duration} aOther The instance to compare with @return {Number} -1, 0 or 1 for less/equal/greater
[ "Compares", "the", "ICAL", ".", "Time", "instance", "with", "another", "one", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5345-L5352
train
mozilla-comm/ical.js
build/ical.js
icaltime_compareDateOnlyTz
function icaltime_compareDateOnlyTz(other, tz) { function cmp(attr) { return ICAL.Time._cmp_attr(a, b, attr); } var a = this.convertToZone(tz); var b = other.convertToZone(tz); var rc = 0; if ((rc = cmp("year")) != 0) return rc; if ((rc = cmp("month")) != 0) return rc;...
javascript
function icaltime_compareDateOnlyTz(other, tz) { function cmp(attr) { return ICAL.Time._cmp_attr(a, b, attr); } var a = this.convertToZone(tz); var b = other.convertToZone(tz); var rc = 0; if ((rc = cmp("year")) != 0) return rc; if ((rc = cmp("month")) != 0) return rc;...
[ "function", "icaltime_compareDateOnlyTz", "(", "other", ",", "tz", ")", "{", "function", "cmp", "(", "attr", ")", "{", "return", "ICAL", ".", "Time", ".", "_cmp_attr", "(", "a", ",", "b", ",", "attr", ")", ";", "}", "var", "a", "=", "this", ".", "c...
Compares only the date part of this instance with another one. @param {ICAL.Duration} other The instance to compare with @param {ICAL.Timezone} tz The timezone to compare in @return {Number} -1, 0 or 1 for less/equal/greater
[ "Compares", "only", "the", "date", "part", "of", "this", "instance", "with", "another", "one", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5361-L5374
train
mozilla-comm/ical.js
build/ical.js
convertToZone
function convertToZone(zone) { var copy = this.clone(); var zone_equals = (this.zone.tzid == zone.tzid); if (!this.isDate && !zone_equals) { ICAL.Timezone.convert_time(copy, this.zone, zone); } copy.zone = zone; return copy; }
javascript
function convertToZone(zone) { var copy = this.clone(); var zone_equals = (this.zone.tzid == zone.tzid); if (!this.isDate && !zone_equals) { ICAL.Timezone.convert_time(copy, this.zone, zone); } copy.zone = zone; return copy; }
[ "function", "convertToZone", "(", "zone", ")", "{", "var", "copy", "=", "this", ".", "clone", "(", ")", ";", "var", "zone_equals", "=", "(", "this", ".", "zone", ".", "tzid", "==", "zone", ".", "tzid", ")", ";", "if", "(", "!", "this", ".", "isDa...
Convert the instance into another timzone. The returned ICAL.Time instance is always a copy. @param {ICAL.Timezone} zone The zone to convert to @return {ICAL.Time} The copy, converted to the zone
[ "Convert", "the", "instance", "into", "another", "timzone", ".", "The", "returned", "ICAL", ".", "Time", "instance", "is", "always", "a", "copy", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5383-L5393
train
mozilla-comm/ical.js
build/ical.js
function() { var string = this.toString(); if (string.length > 10) { return ICAL.design.icalendar.value['date-time'].toICAL(string); } else { return ICAL.design.icalendar.value.date.toICAL(string); } }
javascript
function() { var string = this.toString(); if (string.length > 10) { return ICAL.design.icalendar.value['date-time'].toICAL(string); } else { return ICAL.design.icalendar.value.date.toICAL(string); } }
[ "function", "(", ")", "{", "var", "string", "=", "this", ".", "toString", "(", ")", ";", "if", "(", "string", ".", "length", ">", "10", ")", "{", "return", "ICAL", ".", "design", ".", "icalendar", ".", "value", "[", "'date-time'", "]", ".", "toICAL...
Returns an RFC 5545 compliant ical representation of this object. @return {String} ical date/date-time
[ "Returns", "an", "RFC", "5545", "compliant", "ical", "representation", "of", "this", "object", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5415-L5423
train
mozilla-comm/ical.js
build/ical.js
toJSDate
function toJSDate() { if (this.zone == ICAL.Timezone.localTimezone) { if (this.isDate) { return new Date(this.year, this.month - 1, this.day); } else { return new Date(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, 0); ...
javascript
function toJSDate() { if (this.zone == ICAL.Timezone.localTimezone) { if (this.isDate) { return new Date(this.year, this.month - 1, this.day); } else { return new Date(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, 0); ...
[ "function", "toJSDate", "(", ")", "{", "if", "(", "this", ".", "zone", "==", "ICAL", ".", "Timezone", ".", "localTimezone", ")", "{", "if", "(", "this", ".", "isDate", ")", "{", "return", "new", "Date", "(", "this", ".", "year", ",", "this", ".", ...
Converts the current instance to a Javascript date @return {Date}
[ "Converts", "the", "current", "instance", "to", "a", "Javascript", "date" ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5452-L5463
train
mozilla-comm/ical.js
build/ical.js
fromUnixTime
function fromUnixTime(seconds) { this.zone = ICAL.Timezone.utcTimezone; var epoch = ICAL.Time.epochTime.clone(); epoch.adjust(0, 0, 0, seconds); this.year = epoch.year; this.month = epoch.month; this.day = epoch.day; this.hour = epoch.hour; this.minute = epoch.minute; ...
javascript
function fromUnixTime(seconds) { this.zone = ICAL.Timezone.utcTimezone; var epoch = ICAL.Time.epochTime.clone(); epoch.adjust(0, 0, 0, seconds); this.year = epoch.year; this.month = epoch.month; this.day = epoch.day; this.hour = epoch.hour; this.minute = epoch.minute; ...
[ "function", "fromUnixTime", "(", "seconds", ")", "{", "this", ".", "zone", "=", "ICAL", ".", "Timezone", ".", "utcTimezone", ";", "var", "epoch", "=", "ICAL", ".", "Time", ".", "epochTime", ".", "clone", "(", ")", ";", "epoch", ".", "adjust", "(", "0...
Sets up the current instance from unix time, the number of seconds since January 1st, 1970. @param {Number} seconds The seconds to set up with
[ "Sets", "up", "the", "current", "instance", "from", "unix", "time", "the", "number", "of", "seconds", "since", "January", "1st", "1970", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5580-L5593
train
mozilla-comm/ical.js
build/ical.js
toUnixTime
function toUnixTime() { if (this._cachedUnixTime !== null) { return this._cachedUnixTime; } var offset = this.utcOffset(); // we use the offset trick to ensure // that we are getting the actual UTC time var ms = Date.UTC( this.year, this.month - 1, th...
javascript
function toUnixTime() { if (this._cachedUnixTime !== null) { return this._cachedUnixTime; } var offset = this.utcOffset(); // we use the offset trick to ensure // that we are getting the actual UTC time var ms = Date.UTC( this.year, this.month - 1, th...
[ "function", "toUnixTime", "(", ")", "{", "if", "(", "this", ".", "_cachedUnixTime", "!==", "null", ")", "{", "return", "this", ".", "_cachedUnixTime", ";", "}", "var", "offset", "=", "this", ".", "utcOffset", "(", ")", ";", "// we use the offset trick to ens...
Converts the current instance to seconds since January 1st 1970. @return {Number} Seconds since 1970
[ "Converts", "the", "current", "instance", "to", "seconds", "since", "January", "1st", "1970", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5600-L5620
train
mozilla-comm/ical.js
build/ical.js
function() { var copy = [ 'year', 'month', 'day', 'hour', 'minute', 'second', 'isDate' ]; var result = Object.create(null); var i = 0; var len = copy.length; var prop; for (; i < len; i++) { prop = copy[i]; ...
javascript
function() { var copy = [ 'year', 'month', 'day', 'hour', 'minute', 'second', 'isDate' ]; var result = Object.create(null); var i = 0; var len = copy.length; var prop; for (; i < len; i++) { prop = copy[i]; ...
[ "function", "(", ")", "{", "var", "copy", "=", "[", "'year'", ",", "'month'", ",", "'day'", ",", "'hour'", ",", "'minute'", ",", "'second'", ",", "'isDate'", "]", ";", "var", "result", "=", "Object", ".", "create", "(", "null", ")", ";", "var", "i"...
Converts time to into Object which can be serialized then re-created using the constructor. @example // toJSON will automatically be called var json = JSON.stringify(mytime); var deserialized = JSON.parse(json); var time = new ICAL.Time(deserialized); @return {Object}
[ "Converts", "time", "to", "into", "Object", "which", "can", "be", "serialized", "then", "re", "-", "created", "using", "the", "constructor", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L5636-L5663
train
mozilla-comm/ical.js
build/ical.js
function() { var res = Object.create(null); res.freq = this.freq; if (this.count) { res.count = this.count; } if (this.interval > 1) { res.interval = this.interval; } for (var k in this.parts) { /* istanbul ignore if */ if (!this.parts.hasOwnP...
javascript
function() { var res = Object.create(null); res.freq = this.freq; if (this.count) { res.count = this.count; } if (this.interval > 1) { res.interval = this.interval; } for (var k in this.parts) { /* istanbul ignore if */ if (!this.parts.hasOwnP...
[ "function", "(", ")", "{", "var", "res", "=", "Object", ".", "create", "(", "null", ")", ";", "res", ".", "freq", "=", "this", ".", "freq", ";", "if", "(", "this", ".", "count", ")", "{", "res", ".", "count", "=", "this", ".", "count", ";", "...
The jCal representation of this recurrence type. @return {Object}
[ "The", "jCal", "representation", "of", "this", "recurrence", "type", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L6507-L6539
train
mozilla-comm/ical.js
build/ical.js
icalrecur_toString
function icalrecur_toString() { // TODO retain order var str = "FREQ=" + this.freq; if (this.count) { str += ";COUNT=" + this.count; } if (this.interval > 1) { str += ";INTERVAL=" + this.interval; } for (var k in this.parts) { /* istanbul ignore else */ ...
javascript
function icalrecur_toString() { // TODO retain order var str = "FREQ=" + this.freq; if (this.count) { str += ";COUNT=" + this.count; } if (this.interval > 1) { str += ";INTERVAL=" + this.interval; } for (var k in this.parts) { /* istanbul ignore else */ ...
[ "function", "icalrecur_toString", "(", ")", "{", "// TODO retain order", "var", "str", "=", "\"FREQ=\"", "+", "this", ".", "freq", ";", "if", "(", "this", ".", "count", ")", "{", "str", "+=", "\";COUNT=\"", "+", "this", ".", "count", ";", "}", "if", "(...
The string representation of this recurrence rule. @return {String}
[ "The", "string", "representation", "of", "this", "recurrence", "rule", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L6545-L6567
train
mozilla-comm/ical.js
build/ical.js
function(options) { this.rule = ICAL.helpers.formatClassType(options.rule, ICAL.Recur); if (!this.rule) { throw new Error('iterator requires a (ICAL.Recur) rule'); } this.dtstart = ICAL.helpers.formatClassType(options.dtstart, ICAL.Time); if (!this.dtstart) { throw new E...
javascript
function(options) { this.rule = ICAL.helpers.formatClassType(options.rule, ICAL.Recur); if (!this.rule) { throw new Error('iterator requires a (ICAL.Recur) rule'); } this.dtstart = ICAL.helpers.formatClassType(options.dtstart, ICAL.Time); if (!this.dtstart) { throw new E...
[ "function", "(", "options", ")", "{", "this", ".", "rule", "=", "ICAL", ".", "helpers", ".", "formatClassType", "(", "options", ".", "rule", ",", "ICAL", ".", "Recur", ")", ";", "if", "(", "!", "this", ".", "rule", ")", "{", "throw", "new", "Error"...
Initialize the recurrence iterator from the passed data object. This method is usually not called directly, you can initialize the iterator through the constructor. @param {Object} options The iterator options @param {ICAL.Recur} options.rule The rule to iterate. @param {ICAL.Time} options.dtstart...
[ "Initialize", "the", "recurrence", "iterator", "from", "the", "passed", "data", "object", ".", "This", "method", "is", "usually", "not", "called", "directly", "you", "can", "initialize", "the", "iterator", "through", "the", "constructor", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L6898-L6944
train
mozilla-comm/ical.js
build/ical.js
icalrecur_iterator_next
function icalrecur_iterator_next() { var before = (this.last ? this.last.clone() : null); if ((this.rule.count && this.occurrence_number >= this.rule.count) || (this.rule.until && this.last.compare(this.rule.until) > 0)) { //XXX: right now this is just a flag and has no impact //...
javascript
function icalrecur_iterator_next() { var before = (this.last ? this.last.clone() : null); if ((this.rule.count && this.occurrence_number >= this.rule.count) || (this.rule.until && this.last.compare(this.rule.until) > 0)) { //XXX: right now this is just a flag and has no impact //...
[ "function", "icalrecur_iterator_next", "(", ")", "{", "var", "before", "=", "(", "this", ".", "last", "?", "this", ".", "last", ".", "clone", "(", ")", ":", "null", ")", ";", "if", "(", "(", "this", ".", "rule", ".", "count", "&&", "this", ".", "...
Retrieve the next occurrence from the iterator. @return {ICAL.Time}
[ "Retrieve", "the", "next", "occurrence", "from", "the", "iterator", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L7096-L7163
train
mozilla-comm/ical.js
build/ical.js
check_set_position
function check_set_position(aPos) { if (this.has_by_data('BYSETPOS')) { var idx = this.by_data.BYSETPOS.indexOf(aPos); // negative numbers are not false-y return idx !== -1; } return false; }
javascript
function check_set_position(aPos) { if (this.has_by_data('BYSETPOS')) { var idx = this.by_data.BYSETPOS.indexOf(aPos); // negative numbers are not false-y return idx !== -1; } return false; }
[ "function", "check_set_position", "(", "aPos", ")", "{", "if", "(", "this", ".", "has_by_data", "(", "'BYSETPOS'", ")", ")", "{", "var", "idx", "=", "this", ".", "by_data", ".", "BYSETPOS", ".", "indexOf", "(", "aPos", ")", ";", "// negative numbers are no...
Checks if given value is in BYSETPOS. @private @param {Numeric} aPos position to check for. @return {Boolean} false unless BYSETPOS rules exist and the given value is present in rules.
[ "Checks", "if", "given", "value", "is", "in", "BYSETPOS", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8073-L8080
train
mozilla-comm/ical.js
build/ical.js
function() { var result = Object.create(null); result.initialized = this.initialized; result.rule = this.rule.toJSON(); result.dtstart = this.dtstart.toJSON(); result.by_data = this.by_data; result.days = this.days; result.last = this.last.toJSON(); result.by_indices = t...
javascript
function() { var result = Object.create(null); result.initialized = this.initialized; result.rule = this.rule.toJSON(); result.dtstart = this.dtstart.toJSON(); result.by_data = this.by_data; result.days = this.days; result.last = this.last.toJSON(); result.by_indices = t...
[ "function", "(", ")", "{", "var", "result", "=", "Object", ".", "create", "(", "null", ")", ";", "result", ".", "initialized", "=", "this", ".", "initialized", ";", "result", ".", "rule", "=", "this", ".", "rule", ".", "toJSON", "(", ")", ";", "res...
Convert iterator into a serialize-able object. Will preserve current iteration sequence to ensure the seamless continuation of the recurrence rule. @return {Object}
[ "Convert", "iterator", "into", "a", "serialize", "-", "able", "object", ".", "Will", "preserve", "current", "iteration", "sequence", "to", "ensure", "the", "seamless", "continuation", "of", "the", "recurrence", "rule", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8163-L8176
train
mozilla-comm/ical.js
build/ical.js
function() { var iter; var ruleOfDay; var next; var compare; var maxTries = 500; var currentTry = 0; while (true) { if (currentTry++ > maxTries) { throw new Error( 'max tries have occured, rule may be impossible to forfill.' ); ...
javascript
function() { var iter; var ruleOfDay; var next; var compare; var maxTries = 500; var currentTry = 0; while (true) { if (currentTry++ > maxTries) { throw new Error( 'max tries have occured, rule may be impossible to forfill.' ); ...
[ "function", "(", ")", "{", "var", "iter", ";", "var", "ruleOfDay", ";", "var", "next", ";", "var", "compare", ";", "var", "maxTries", "=", "500", ";", "var", "currentTry", "=", "0", ";", "while", "(", "true", ")", "{", "if", "(", "currentTry", "++"...
Retrieve the next occurrence in the series. @return {ICAL.Time}
[ "Retrieve", "the", "next", "occurrence", "in", "the", "series", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8427-L8494
train
mozilla-comm/ical.js
build/ical.js
function() { function toJSON(item) { return item.toJSON(); } var result = Object.create(null); result.ruleIterators = this.ruleIterators.map(toJSON); if (this.ruleDates) { result.ruleDates = this.ruleDates.map(toJSON); } if (this.exDates) { result.exD...
javascript
function() { function toJSON(item) { return item.toJSON(); } var result = Object.create(null); result.ruleIterators = this.ruleIterators.map(toJSON); if (this.ruleDates) { result.ruleDates = this.ruleDates.map(toJSON); } if (this.exDates) { result.exD...
[ "function", "(", ")", "{", "function", "toJSON", "(", "item", ")", "{", "return", "item", ".", "toJSON", "(", ")", ";", "}", "var", "result", "=", "Object", ".", "create", "(", "null", ")", ";", "result", ".", "ruleIterators", "=", "this", ".", "ru...
Converts object into a serialize-able format. This format can be passed back into the expansion to resume iteration. @return {Object}
[ "Converts", "object", "into", "a", "serialize", "-", "able", "format", ".", "This", "format", "can", "be", "passed", "back", "into", "the", "expansion", "to", "resume", "iteration", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8501-L8524
train
mozilla-comm/ical.js
build/ical.js
function(component, propertyName) { function handleProp(prop) { idx = ICAL.helpers.binsearchInsert( result, prop, compareTime ); // ordered insert result.splice(idx, 0, prop); } var result = []; var props = component.getAllPropertie...
javascript
function(component, propertyName) { function handleProp(prop) { idx = ICAL.helpers.binsearchInsert( result, prop, compareTime ); // ordered insert result.splice(idx, 0, prop); } var result = []; var props = component.getAllPropertie...
[ "function", "(", "component", ",", "propertyName", ")", "{", "function", "handleProp", "(", "prop", ")", "{", "idx", "=", "ICAL", ".", "helpers", ".", "binsearchInsert", "(", "result", ",", "prop", ",", "compareTime", ")", ";", "// ordered insert", "result",...
Extract all dates from the properties in the given component. The properties will be filtered by the property name. @private @param {ICAL.Component} component The component to search in @param {String} propertyName The property name to search for @return {ICAL.Time[]} The extracte...
[ "Extract", "all", "dates", "from", "the", "properties", "in", "the", "given", "component", ".", "The", "properties", "will", "be", "filtered", "by", "the", "property", "name", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8535-L8560
train
mozilla-comm/ical.js
build/ical.js
function(component) { this.ruleIterators = []; this.last = this.dtstart.clone(); // to provide api consistency non-recurring // events can also use the iterator though it will // only return a single time. if (!isRecurringComponent(component)) { this.ruleDate = this.last.cl...
javascript
function(component) { this.ruleIterators = []; this.last = this.dtstart.clone(); // to provide api consistency non-recurring // events can also use the iterator though it will // only return a single time. if (!isRecurringComponent(component)) { this.ruleDate = this.last.cl...
[ "function", "(", "component", ")", "{", "this", ".", "ruleIterators", "=", "[", "]", ";", "this", ".", "last", "=", "this", ".", "dtstart", ".", "clone", "(", ")", ";", "// to provide api consistency non-recurring", "// events can also use the iterator though it wil...
Initialize the recurrence expansion. @private @param {ICAL.Component} component The component to initialize from.
[ "Initialize", "the", "recurrence", "expansion", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8568-L8636
train
mozilla-comm/ical.js
build/ical.js
function() { var iters = this.ruleIterators; if (iters.length === 0) { return null; } var len = iters.length; var iter; var iterTime; var iterIdx = 0; var chosenIter; // loop through each iterator for (; iterIdx < len; iterIdx++) { iter = it...
javascript
function() { var iters = this.ruleIterators; if (iters.length === 0) { return null; } var len = iters.length; var iter; var iterTime; var iterIdx = 0; var chosenIter; // loop through each iterator for (; iterIdx < len; iterIdx++) { iter = it...
[ "function", "(", ")", "{", "var", "iters", "=", "this", ".", "ruleIterators", ";", "if", "(", "iters", ".", "length", "===", "0", ")", "{", "return", "null", ";", "}", "var", "len", "=", "iters", ".", "length", ";", "var", "iter", ";", "var", "it...
Find and return the recurrence rule with the most recent event and return it. @private @return {?ICAL.RecurIterator} Found iterator.
[ "Find", "and", "return", "the", "recurrence", "rule", "with", "the", "most", "recent", "event", "and", "return", "it", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8661-L8701
train
mozilla-comm/ical.js
build/ical.js
function(obj) { if (this.isRecurrenceException()) { throw new Error('cannot relate exception to exceptions'); } if (obj instanceof ICAL.Component) { obj = new ICAL.Event(obj); } if (this.strictExceptions && obj.uid !== this.uid) { throw new Error('attempted to rel...
javascript
function(obj) { if (this.isRecurrenceException()) { throw new Error('cannot relate exception to exceptions'); } if (obj instanceof ICAL.Component) { obj = new ICAL.Event(obj); } if (this.strictExceptions && obj.uid !== this.uid) { throw new Error('attempted to rel...
[ "function", "(", "obj", ")", "{", "if", "(", "this", ".", "isRecurrenceException", "(", ")", ")", "{", "throw", "new", "Error", "(", "'cannot relate exception to exceptions'", ")", ";", "}", "if", "(", "obj", "instanceof", "ICAL", ".", "Component", ")", "{...
Relates a given event exception to this object. If the given component does not share the UID of this event it cannot be related and will throw an exception. If this component is an exception it cannot have other exceptions related to it. @param {ICAL.Component|ICAL.Event} obj Component or event
[ "Relates", "a", "given", "event", "exception", "to", "this", "object", ".", "If", "the", "given", "component", "does", "not", "share", "the", "UID", "of", "this", "event", "it", "cannot", "be", "related", "and", "will", "throw", "an", "exception", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8795-L8831
train
mozilla-comm/ical.js
build/ical.js
function(time) { if (!this.rangeExceptions.length) { return null; } var utc = time.toUnixTime(); var idx = ICAL.helpers.binsearchInsert( this.rangeExceptions, [utc], compareRangeException ); idx -= 1; // occurs before if (idx < 0) { ...
javascript
function(time) { if (!this.rangeExceptions.length) { return null; } var utc = time.toUnixTime(); var idx = ICAL.helpers.binsearchInsert( this.rangeExceptions, [utc], compareRangeException ); idx -= 1; // occurs before if (idx < 0) { ...
[ "function", "(", "time", ")", "{", "if", "(", "!", "this", ".", "rangeExceptions", ".", "length", ")", "{", "return", "null", ";", "}", "var", "utc", "=", "time", ".", "toUnixTime", "(", ")", ";", "var", "idx", "=", "ICAL", ".", "helpers", ".", "...
Finds the range exception nearest to the given date. @param {ICAL.Time} time usually an occurrence time of an event @return {?ICAL.Event} the related event/exception or null
[ "Finds", "the", "range", "exception", "nearest", "to", "the", "given", "date", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L8854-L8881
train
mozilla-comm/ical.js
build/ical.js
function() { var rules = this.component.getAllProperties('rrule'); var i = 0; var len = rules.length; var result = Object.create(null); for (; i < len; i++) { var value = rules[i].getFirstValue(); result[value.freq] = true; } return result; }
javascript
function() { var rules = this.component.getAllProperties('rrule'); var i = 0; var len = rules.length; var result = Object.create(null); for (; i < len; i++) { var value = rules[i].getFirstValue(); result[value.freq] = true; } return result; }
[ "function", "(", ")", "{", "var", "rules", "=", "this", ".", "component", ".", "getAllProperties", "(", "'rrule'", ")", ";", "var", "i", "=", "0", ";", "var", "len", "=", "rules", ".", "length", ";", "var", "result", "=", "Object", ".", "create", "...
Returns the types of recurrences this event may have. Returned as an object with the following possible keys: - YEARLY - MONTHLY - WEEKLY - DAILY - MINUTELY - SECONDLY @return {Object.<ICAL.Recur.frequencyValues, Boolean>} Object of recurrence flags
[ "Returns", "the", "types", "of", "recurrences", "this", "event", "may", "have", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L9025-L9037
train
mozilla-comm/ical.js
build/ical.js
function(ical) { //TODO: this is sync now in the future we will have a incremental parser. if (typeof(ical) === 'string') { ical = ICAL.parse(ical); } if (!(ical instanceof ICAL.Component)) { ical = new ICAL.Component(ical); } var components = ical.getAllSubcomponen...
javascript
function(ical) { //TODO: this is sync now in the future we will have a incremental parser. if (typeof(ical) === 'string') { ical = ICAL.parse(ical); } if (!(ical instanceof ICAL.Component)) { ical = new ICAL.Component(ical); } var components = ical.getAllSubcomponen...
[ "function", "(", "ical", ")", "{", "//TODO: this is sync now in the future we will have a incremental parser.", "if", "(", "typeof", "(", "ical", ")", "===", "'string'", ")", "{", "ical", "=", "ICAL", ".", "parse", "(", "ical", ")", ";", "}", "if", "(", "!", ...
Process a string or parse ical object. This function itself will return nothing but will start the parsing process. Events must be registered prior to calling this method. @param {ICAL.Component|String|Object} ical The component to process, either in its final form, as a jCal Object, or string representation
[ "Process", "a", "string", "or", "parse", "ical", "object", ".", "This", "function", "itself", "will", "return", "nothing", "but", "will", "start", "the", "parsing", "process", "." ]
2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d
https://github.com/mozilla-comm/ical.js/blob/2d08c79b4e77bfe4dbf1c9ac0b463580f0605a7d/build/ical.js#L9376-L9419
train
serverless/serverless-kubeless
lib/deploy.js
deployMQTrigger
function deployMQTrigger(mqType, name, namespace, topic, options) { const opts = _.defaults({}, options, { log: console.log, }); const trigger = { apiVersion: 'kubeless.io/v1beta1', kind: `${mqType}Trigger`, metadata: { name: _.kebabCase(`${name}-${topic}`), namespace, labels: { ...
javascript
function deployMQTrigger(mqType, name, namespace, topic, options) { const opts = _.defaults({}, options, { log: console.log, }); const trigger = { apiVersion: 'kubeless.io/v1beta1', kind: `${mqType}Trigger`, metadata: { name: _.kebabCase(`${name}-${topic}`), namespace, labels: { ...
[ "function", "deployMQTrigger", "(", "mqType", ",", "name", ",", "namespace", ",", "topic", ",", "options", ")", "{", "const", "opts", "=", "_", ".", "defaults", "(", "{", "}", ",", "options", ",", "{", "log", ":", "console", ".", "log", ",", "}", "...
Handling Kafka and NATS message queue trigger @param {MQTypes} mqType @param {string} name @param {string} namespace @param {string} topic @param {object} options
[ "Handling", "Kafka", "and", "NATS", "message", "queue", "trigger" ]
b85b77f584139a8d53f06346b3036f8b3017c9f9
https://github.com/serverless/serverless-kubeless/blob/b85b77f584139a8d53f06346b3036f8b3017c9f9/lib/deploy.js#L347-L386
train
serverless/serverless-kubeless
lib/deploy.js
handleMQTDeployment
function handleMQTDeployment(trigger, name, namespace, options) { let mqTrigger = trigger; // If only a string is passed, expect it to be the subject if (typeof mqTrigger === 'string') { // Defaults to Kafka mqTrigger = { queue: 'kafka', topic: mqTrigger, }; } else { // Otherwise exp...
javascript
function handleMQTDeployment(trigger, name, namespace, options) { let mqTrigger = trigger; // If only a string is passed, expect it to be the subject if (typeof mqTrigger === 'string') { // Defaults to Kafka mqTrigger = { queue: 'kafka', topic: mqTrigger, }; } else { // Otherwise exp...
[ "function", "handleMQTDeployment", "(", "trigger", ",", "name", ",", "namespace", ",", "options", ")", "{", "let", "mqTrigger", "=", "trigger", ";", "// If only a string is passed, expect it to be the subject", "if", "(", "typeof", "mqTrigger", "===", "'string'", ")",...
Handle message queue trigger input to normalize the users input values. @param {string|object} trigger @param {string} name @param {string} namespace @param {object} options
[ "Handle", "message", "queue", "trigger", "input", "to", "normalize", "the", "users", "input", "values", "." ]
b85b77f584139a8d53f06346b3036f8b3017c9f9
https://github.com/serverless/serverless-kubeless/blob/b85b77f584139a8d53f06346b3036f8b3017c9f9/lib/deploy.js#L476-L502
train
fergiemcdowall/search-index
demo/search-app.js
function (elements) { elements.forEach(function(element) { document.getElementById(element).innerHTML = '' document.getElementById(element).value = '' }) }
javascript
function (elements) { elements.forEach(function(element) { document.getElementById(element).innerHTML = '' document.getElementById(element).value = '' }) }
[ "function", "(", "elements", ")", "{", "elements", ".", "forEach", "(", "function", "(", "element", ")", "{", "document", ".", "getElementById", "(", "element", ")", ".", "innerHTML", "=", "''", "document", ".", "getElementById", "(", "element", ")", ".", ...
Empty HTML elements
[ "Empty", "HTML", "elements" ]
f69d992dd4c2a01c84b01feb0e6e57d91b6d7241
https://github.com/fergiemcdowall/search-index/blob/f69d992dd4c2a01c84b01feb0e6e57d91b6d7241/demo/search-app.js#L49-L54
train
angular-ui/ui-calendar
src/calendar.js
function (newTokens, oldTokens) { var i; var token; var replacedTokens = {}; var removedTokens = subtractAsSets(oldTokens, newTokens); for (i = 0; i < removedTokens.length; i++) { var removedToken...
javascript
function (newTokens, oldTokens) { var i; var token; var replacedTokens = {}; var removedTokens = subtractAsSets(oldTokens, newTokens); for (i = 0; i < removedTokens.length; i++) { var removedToken...
[ "function", "(", "newTokens", ",", "oldTokens", ")", "{", "var", "i", ";", "var", "token", ";", "var", "replacedTokens", "=", "{", "}", ";", "var", "removedTokens", "=", "subtractAsSets", "(", "oldTokens", ",", "newTokens", ")", ";", "for", "(", "i", "...
Compare newTokens to oldTokens and call onAdded, onRemoved, and onChanged handlers for each affected event respectively.
[ "Compare", "newTokens", "to", "oldTokens", "and", "call", "onAdded", "onRemoved", "and", "onChanged", "handlers", "for", "each", "affected", "event", "respectively", "." ]
ac7a76c678a4eb8242a695d0ce133757345e6c31
https://github.com/angular-ui/ui-calendar/blob/ac7a76c678a4eb8242a695d0ce133757345e6c31/src/calendar.js#L146-L172
train
angular-ui/ui-calendar
src/calendar.js
function (data) { // convert {0: "Jan", 1: "Feb", ...} to ["Jan", "Feb", ...] return (Object.keys(data) || []).reduce( function (rslt, el) { rslt.push(data[el]); return rslt; ...
javascript
function (data) { // convert {0: "Jan", 1: "Feb", ...} to ["Jan", "Feb", ...] return (Object.keys(data) || []).reduce( function (rslt, el) { rslt.push(data[el]); return rslt; ...
[ "function", "(", "data", ")", "{", "// convert {0: \"Jan\", 1: \"Feb\", ...} to [\"Jan\", \"Feb\", ...]", "return", "(", "Object", ".", "keys", "(", "data", ")", "||", "[", "]", ")", ".", "reduce", "(", "function", "(", "rslt", ",", "el", ")", "{", "rslt", "...
Configure to use locale names by default
[ "Configure", "to", "use", "locale", "names", "by", "default" ]
ac7a76c678a4eb8242a695d0ce133757345e6c31
https://github.com/angular-ui/ui-calendar/blob/ac7a76c678a4eb8242a695d0ce133757345e6c31/src/calendar.js#L208-L217
train
digiaonline/react-foundation
src/components/button.js
createButtonClassName
function createButtonClassName(props) { return createClassName( props.noDefaultClassName ? null : 'button', props.className, props.size, props.color, { 'hollow': props.isHollow, 'clear': props.isClear, 'expanded': props.isExpanded, 'disabled': props.isDisabled, 'dropd...
javascript
function createButtonClassName(props) { return createClassName( props.noDefaultClassName ? null : 'button', props.className, props.size, props.color, { 'hollow': props.isHollow, 'clear': props.isClear, 'expanded': props.isExpanded, 'disabled': props.isDisabled, 'dropd...
[ "function", "createButtonClassName", "(", "props", ")", "{", "return", "createClassName", "(", "props", ".", "noDefaultClassName", "?", "null", ":", "'button'", ",", "props", ".", "className", ",", "props", ".", "size", ",", "props", ".", "color", ",", "{", ...
Creates button class name from the given properties. @param {Object} props @returns {string}
[ "Creates", "button", "class", "name", "from", "the", "given", "properties", "." ]
20cd3e2ff04efe8a01cf68b671f3bf2eb68d9ed3
https://github.com/digiaonline/react-foundation/blob/20cd3e2ff04efe8a01cf68b671f3bf2eb68d9ed3/src/components/button.js#L59-L75
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
FeedMessage
function FeedMessage(properties) { this.entity = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function FeedMessage(properties) { this.entity = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "FeedMessage", "(", "properties", ")", "{", "this", ".", "entity", "=", "[", "]", ";", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "ke...
Properties of a FeedMessage. @memberof transit_realtime @interface IFeedMessage @property {transit_realtime.IFeedHeader} header FeedMessage header @property {Array.<transit_realtime.IFeedEntity>|null} [entity] FeedMessage entity Constructs a new FeedMessage. @memberof transit_realtime @classdesc Represents a FeedMess...
[ "Properties", "of", "a", "FeedMessage", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L53-L59
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
FeedHeader
function FeedHeader(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function FeedHeader(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "FeedHeader", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", "if...
Properties of a FeedHeader. @memberof transit_realtime @interface IFeedHeader @property {string} gtfsRealtimeVersion FeedHeader gtfsRealtimeVersion @property {transit_realtime.FeedHeader.Incrementality|null} [incrementality] FeedHeader incrementality @property {number|Long|null} [timestamp] FeedHeader timestamp Const...
[ "Properties", "of", "a", "FeedHeader", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L291-L296
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
FeedEntity
function FeedEntity(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function FeedEntity(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "FeedEntity", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", "if...
Properties of a FeedEntity. @memberof transit_realtime @interface IFeedEntity @property {string} id FeedEntity id @property {boolean|null} [isDeleted] FeedEntity isDeleted @property {transit_realtime.ITripUpdate|null} [tripUpdate] FeedEntity tripUpdate @property {transit_realtime.IVehiclePosition|null} [vehicle] FeedEn...
[ "Properties", "of", "a", "FeedEntity", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L566-L571
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
TripUpdate
function TripUpdate(properties) { this.stopTimeUpdate = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function TripUpdate(properties) { this.stopTimeUpdate = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "TripUpdate", "(", "properties", ")", "{", "this", ".", "stopTimeUpdate", "=", "[", "]", ";", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<"...
Properties of a TripUpdate. @memberof transit_realtime @interface ITripUpdate @property {transit_realtime.ITripDescriptor} trip TripUpdate trip @property {transit_realtime.IVehicleDescriptor|null} [vehicle] TripUpdate vehicle @property {Array.<transit_realtime.TripUpdate.IStopTimeUpdate>|null} [stopTimeUpdate] TripUpda...
[ "Properties", "of", "a", "TripUpdate", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L857-L863
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
StopTimeEvent
function StopTimeEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function StopTimeEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "StopTimeEvent", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", ...
Properties of a StopTimeEvent. @memberof transit_realtime.TripUpdate @interface IStopTimeEvent @property {number|null} [delay] StopTimeEvent delay @property {number|Long|null} [time] StopTimeEvent time @property {number|null} [uncertainty] StopTimeEvent uncertainty Constructs a new StopTimeEvent. @memberof transit_re...
[ "Properties", "of", "a", "StopTimeEvent", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L1175-L1180
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
StopTimeUpdate
function StopTimeUpdate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function StopTimeUpdate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "StopTimeUpdate", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", ...
Properties of a StopTimeUpdate. @memberof transit_realtime.TripUpdate @interface IStopTimeUpdate @property {number|null} [stopSequence] StopTimeUpdate stopSequence @property {string|null} [stopId] StopTimeUpdate stopId @property {transit_realtime.TripUpdate.IStopTimeEvent|null} [arrival] StopTimeUpdate arrival @propert...
[ "Properties", "of", "a", "StopTimeUpdate", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L1423-L1428
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
VehiclePosition
function VehiclePosition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function VehiclePosition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "VehiclePosition", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", ...
Properties of a VehiclePosition. @memberof transit_realtime @interface IVehiclePosition @property {transit_realtime.ITripDescriptor|null} [trip] VehiclePosition trip @property {transit_realtime.IVehicleDescriptor|null} [vehicle] VehiclePosition vehicle @property {transit_realtime.IPosition|null} [position] VehiclePosit...
[ "Properties", "of", "a", "VehiclePosition", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L1750-L1755
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
Alert
function Alert(properties) { this.activePeriod = []; this.informedEntity = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties...
javascript
function Alert(properties) { this.activePeriod = []; this.informedEntity = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties...
[ "function", "Alert", "(", "properties", ")", "{", "this", ".", "activePeriod", "=", "[", "]", ";", "this", ".", "informedEntity", "=", "[", "]", ";", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "propertie...
Properties of an Alert. @memberof transit_realtime @interface IAlert @property {Array.<transit_realtime.ITimeRange>|null} [activePeriod] Alert activePeriod @property {Array.<transit_realtime.IEntitySelector>|null} [informedEntity] Alert informedEntity @property {transit_realtime.Alert.Cause|null} [cause] Alert cause @p...
[ "Properties", "of", "an", "Alert", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L2288-L2295
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
TimeRange
function TimeRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function TimeRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "TimeRange", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", "if"...
Properties of a TimeRange. @memberof transit_realtime @interface ITimeRange @property {number|Long|null} [start] TimeRange start @property {number|Long|null} [end] TimeRange end Constructs a new TimeRange. @memberof transit_realtime @classdesc Represents a TimeRange. @implements ITimeRange @constructor @param {transi...
[ "Properties", "of", "a", "TimeRange", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L2956-L2961
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
Position
function Position(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function Position(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "Position", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", "if",...
Properties of a Position. @memberof transit_realtime @interface IPosition @property {number} latitude Position latitude @property {number} longitude Position longitude @property {number|null} [bearing] Position bearing @property {number|null} [odometer] Position odometer @property {number|null} [speed] Position speed ...
[ "Properties", "of", "a", "Position", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L3197-L3202
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
TripDescriptor
function TripDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function TripDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "TripDescriptor", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", ...
Properties of a TripDescriptor. @memberof transit_realtime @interface ITripDescriptor @property {string|null} [tripId] TripDescriptor tripId @property {string|null} [routeId] TripDescriptor routeId @property {number|null} [directionId] TripDescriptor directionId @property {string|null} [startTime] TripDescriptor startT...
[ "Properties", "of", "a", "TripDescriptor", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L3474-L3479
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
VehicleDescriptor
function VehicleDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function VehicleDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "VehicleDescriptor", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")"...
Properties of a VehicleDescriptor. @memberof transit_realtime @interface IVehicleDescriptor @property {string|null} [id] VehicleDescriptor id @property {string|null} [label] VehicleDescriptor label @property {string|null} [licensePlate] VehicleDescriptor licensePlate Constructs a new VehicleDescriptor. @memberof tran...
[ "Properties", "of", "a", "VehicleDescriptor", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L3817-L3822
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
EntitySelector
function EntitySelector(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function EntitySelector(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "EntitySelector", "(", "properties", ")", "{", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", "<", "keys", ".", "length", ";", "++", "i", ")", ...
Properties of an EntitySelector. @memberof transit_realtime @interface IEntitySelector @property {string|null} [agencyId] EntitySelector agencyId @property {string|null} [routeId] EntitySelector routeId @property {number|null} [routeType] EntitySelector routeType @property {transit_realtime.ITripDescriptor|null} [trip]...
[ "Properties", "of", "an", "EntitySelector", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L4051-L4056
train
MobilityData/gtfs-realtime-bindings
nodejs/gtfs-realtime.js
TranslatedString
function TranslatedString(properties) { this.translation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
javascript
function TranslatedString(properties) { this.translation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; }
[ "function", "TranslatedString", "(", "properties", ")", "{", "this", ".", "translation", "=", "[", "]", ";", "if", "(", "properties", ")", "for", "(", "var", "keys", "=", "Object", ".", "keys", "(", "properties", ")", ",", "i", "=", "0", ";", "i", ...
Properties of a TranslatedString. @memberof transit_realtime @interface ITranslatedString @property {Array.<transit_realtime.TranslatedString.ITranslation>|null} [translation] TranslatedString translation Constructs a new TranslatedString. @memberof transit_realtime @classdesc Represents a TranslatedString. @implemen...
[ "Properties", "of", "a", "TranslatedString", "." ]
2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487
https://github.com/MobilityData/gtfs-realtime-bindings/blob/2ede9aeee2d9e8ec62ecc7684b8ee624fcfc5487/nodejs/gtfs-realtime.js#L4328-L4334
train