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
chevex-archived/mongoose-auto-increment
index.js
function (callback) { IdentityCounter.findOneAndUpdate( { model: settings.model, field: settings.field }, { count: settings.startAt - settings.incrementBy }, { new: true }, // new: true specifies that the callback should get the updated counter. function (err) { if (err) return callb...
javascript
function (callback) { IdentityCounter.findOneAndUpdate( { model: settings.model, field: settings.field }, { count: settings.startAt - settings.incrementBy }, { new: true }, // new: true specifies that the callback should get the updated counter. function (err) { if (err) return callb...
[ "function", "(", "callback", ")", "{", "IdentityCounter", ".", "findOneAndUpdate", "(", "{", "model", ":", "settings", ".", "model", ",", "field", ":", "settings", ".", "field", "}", ",", "{", "count", ":", "settings", ".", "startAt", "-", "settings", "....
Declare a function to reset counter at the start value - increment value.
[ "Declare", "a", "function", "to", "reset", "counter", "at", "the", "start", "value", "-", "increment", "value", "." ]
50bd2a642c7565cf0a9f2c368d437b83160ad0a6
https://github.com/chevex-archived/mongoose-auto-increment/blob/50bd2a642c7565cf0a9f2c368d437b83160ad0a6/index.js#L104-L114
train
chevex-archived/mongoose-auto-increment
index.js
function (err, updatedIdentityCounter) { if (err) return next(err); // If there are no errors then go ahead and set the document's field to the current count. doc[settings.field] = updatedIdentityCounter.count; // Continue with default document save functi...
javascript
function (err, updatedIdentityCounter) { if (err) return next(err); // If there are no errors then go ahead and set the document's field to the current count. doc[settings.field] = updatedIdentityCounter.count; // Continue with default document save functi...
[ "function", "(", "err", ",", "updatedIdentityCounter", ")", "{", "if", "(", "err", ")", "return", "next", "(", "err", ")", ";", "// If there are no errors then go ahead and set the document's field to the current count.", "doc", "[", "settings", ".", "field", "]", "="...
Receive the updated counter.
[ "Receive", "the", "updated", "counter", "." ]
50bd2a642c7565cf0a9f2c368d437b83160ad0a6
https://github.com/chevex-archived/mongoose-auto-increment/blob/50bd2a642c7565cf0a9f2c368d437b83160ad0a6/index.js#L157-L163
train
StephanWagner/jBox
dist/jBox.all.js
addUnscrollClassName
function addUnscrollClassName() { if (document.getElementById('unscroll-class-name')) { return; } var css = '.unscrollable { overflow-y: hidden !important; }', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); ...
javascript
function addUnscrollClassName() { if (document.getElementById('unscroll-class-name')) { return; } var css = '.unscrollable { overflow-y: hidden !important; }', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); ...
[ "function", "addUnscrollClassName", "(", ")", "{", "if", "(", "document", ".", "getElementById", "(", "'unscroll-class-name'", ")", ")", "{", "return", ";", "}", "var", "css", "=", "'.unscrollable { overflow-y: hidden !important; }'", ",", "head", "=", "document", ...
Add unscroll class to head
[ "Add", "unscroll", "class", "to", "head" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L49-L60
train
StephanWagner/jBox
dist/jBox.all.js
function (el) { // Extract the href or the onclick event if no submit event is passed if (!this.options.confirm) { var submit = el.attr('onclick') ? el.attr('onclick') : (el.attr('href') ? (el.attr('target') ? 'window.open("' + el.attr('href') + '", "' + el.attr('target') + '");' : 'window.loca...
javascript
function (el) { // Extract the href or the onclick event if no submit event is passed if (!this.options.confirm) { var submit = el.attr('onclick') ? el.attr('onclick') : (el.attr('href') ? (el.attr('target') ? 'window.open("' + el.attr('href') + '", "' + el.attr('target') + '");' : 'window.loca...
[ "function", "(", "el", ")", "{", "// Extract the href or the onclick event if no submit event is passed", "if", "(", "!", "this", ".", "options", ".", "confirm", ")", "{", "var", "submit", "=", "el", ".", "attr", "(", "'onclick'", ")", "?", "el", ".", "attr", ...
Triggered when jBox is attached to the element
[ "Triggered", "when", "jBox", "is", "attached", "to", "the", "element" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2222-L2229
train
StephanWagner/jBox
dist/jBox.all.js
function () { // Set the new action for the submit button this.submitButton.off('click.jBox-Confirm' + this.id).on('click.jBox-Confirm' + this.id, function () { this.options.confirm ? this.options.confirm() : eval(this.source.data('jBox-Confirm-submit')); this.options.closeOnConfirm && this.close(); }.b...
javascript
function () { // Set the new action for the submit button this.submitButton.off('click.jBox-Confirm' + this.id).on('click.jBox-Confirm' + this.id, function () { this.options.confirm ? this.options.confirm() : eval(this.source.data('jBox-Confirm-submit')); this.options.closeOnConfirm && this.close(); }.b...
[ "function", "(", ")", "{", "// Set the new action for the submit button", "this", ".", "submitButton", ".", "off", "(", "'click.jBox-Confirm'", "+", "this", ".", "id", ")", ".", "on", "(", "'click.jBox-Confirm'", "+", "this", ".", "id", ",", "function", "(", "...
Triggered when jBox is opened
[ "Triggered", "when", "jBox", "is", "opened" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2249-L2253
train
StephanWagner/jBox
dist/jBox.all.js
function () { // Append image label containers this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper); this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery...
javascript
function () { // Append image label containers this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper); this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery...
[ "function", "(", ")", "{", "// Append image label containers", "this", ".", "imageLabel", "=", "jQuery", "(", "'<div/>'", ",", "{", "'class'", ":", "'jBox-image-label-container'", "}", ")", ".", "appendTo", "(", "this", ".", "wrapper", ")", ";", "this", ".", ...
Triggered when jBox was created
[ "Triggered", "when", "jBox", "was", "created" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2507-L2539
train
StephanWagner/jBox
dist/jBox.all.js
function () { // Add key events jQuery(document).on('keyup.jBox-Image-' + this.id, function (ev) { (ev.keyCode == 37) && this.showImage('prev'); (ev.keyCode == 39) && this.showImage('next'); }.bind(this)); // Load the image from the attached element this.showImage('ope...
javascript
function () { // Add key events jQuery(document).on('keyup.jBox-Image-' + this.id, function (ev) { (ev.keyCode == 37) && this.showImage('prev'); (ev.keyCode == 39) && this.showImage('next'); }.bind(this)); // Load the image from the attached element this.showImage('ope...
[ "function", "(", ")", "{", "// Add key events", "jQuery", "(", "document", ")", ".", "on", "(", "'keyup.jBox-Image-'", "+", "this", ".", "id", ",", "function", "(", "ev", ")", "{", "(", "ev", ".", "keyCode", "==", "37", ")", "&&", "this", ".", "showI...
Triggered when jBox opens
[ "Triggered", "when", "jBox", "opens" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2544-L2554
train
StephanWagner/jBox
dist/jBox.all.js
function () { // Cache position values this.defaultNoticePosition = jQuery.extend({}, this.options.position); // Type Notice has its own adjust position function this._adjustNoticePositon = function () { var win = jQuery(window); var windowDimensions = { x: win.wid...
javascript
function () { // Cache position values this.defaultNoticePosition = jQuery.extend({}, this.options.position); // Type Notice has its own adjust position function this._adjustNoticePositon = function () { var win = jQuery(window); var windowDimensions = { x: win.wid...
[ "function", "(", ")", "{", "// Cache position values", "this", ".", "defaultNoticePosition", "=", "jQuery", ".", "extend", "(", "{", "}", ",", "this", ".", "options", ".", "position", ")", ";", "// Type Notice has its own adjust position function", "this", ".", "_...
Triggered when notice is initialized
[ "Triggered", "when", "notice", "is", "initialized" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2626-L2666
train
StephanWagner/jBox
dist/jBox.all.js
function () { // Bail if we're stacking if (this.options.stack) { return; } // Adjust position when opening this._adjustNoticePositon(); // Loop through notices at same window corner destroy them jQuery.each(jQuery('.jBox-Notice'), function (index, el) { ...
javascript
function () { // Bail if we're stacking if (this.options.stack) { return; } // Adjust position when opening this._adjustNoticePositon(); // Loop through notices at same window corner destroy them jQuery.each(jQuery('.jBox-Notice'), function (index, el) { ...
[ "function", "(", ")", "{", "// Bail if we're stacking", "if", "(", "this", ".", "options", ".", "stack", ")", "{", "return", ";", "}", "// Adjust position when opening", "this", ".", "_adjustNoticePositon", "(", ")", ";", "// Loop through notices at same window corner...
Triggered when notice opens
[ "Triggered", "when", "notice", "opens" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2683-L2709
train
StephanWagner/jBox
dist/jBox.all.js
function () { var stacks = {}; jQuery.each(jQuery('.jBox-Notice'), function (index, el) { el = jQuery(el); var pos = el.data('jBox-Notice-position'); if (!stacks[pos]) { stacks[pos] = []; } stacks[pos].push(el); }); ...
javascript
function () { var stacks = {}; jQuery.each(jQuery('.jBox-Notice'), function (index, el) { el = jQuery(el); var pos = el.data('jBox-Notice-position'); if (!stacks[pos]) { stacks[pos] = []; } stacks[pos].push(el); }); ...
[ "function", "(", ")", "{", "var", "stacks", "=", "{", "}", ";", "jQuery", ".", "each", "(", "jQuery", "(", "'.jBox-Notice'", ")", ",", "function", "(", "index", ",", "el", ")", "{", "el", "=", "jQuery", "(", "el", ")", ";", "var", "pos", "=", "...
Triggered when resizing window etc.
[ "Triggered", "when", "resizing", "window", "etc", "." ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/dist/jBox.all.js#L2713-L2736
train
StephanWagner/jBox
Demo/Playground/Playground.Avatars.js
function () { // Create the containers for the liked or disliked avatars if (initial) { $('<div id="LikedAvatars" class="AvatarsCollection"/>').appendTo($('body')); $('<div id="DislikedAvatars" class="AvatarsCollection"/>').appendTo($('body')); } $.each(this.footer....
javascript
function () { // Create the containers for the liked or disliked avatars if (initial) { $('<div id="LikedAvatars" class="AvatarsCollection"/>').appendTo($('body')); $('<div id="DislikedAvatars" class="AvatarsCollection"/>').appendTo($('body')); } $.each(this.footer....
[ "function", "(", ")", "{", "// Create the containers for the liked or disliked avatars", "if", "(", "initial", ")", "{", "$", "(", "'<div id=\"LikedAvatars\" class=\"AvatarsCollection\"/>'", ")", ".", "appendTo", "(", "$", "(", "'body'", ")", ")", ";", "$", "(", "'<...
When the jBox is created, add the click events to the buttons
[ "When", "the", "jBox", "is", "created", "add", "the", "click", "events", "to", "the", "buttons" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/Demo/Playground/Playground.Avatars.js#L124-L181
train
StephanWagner/jBox
Demo/Playground/Playground.Avatars.js
function () { // Set title and content depending on current index this.setTitle(DemoAvatars.Avatars[DemoAvatars.current]); this.content.css({backgroundImage: 'url(https://stephanwagner.me/img/jBox/avatar/' + DemoAvatars.Avatars[DemoAvatars.current] + '.svg)'}); // If it's the inita...
javascript
function () { // Set title and content depending on current index this.setTitle(DemoAvatars.Avatars[DemoAvatars.current]); this.content.css({backgroundImage: 'url(https://stephanwagner.me/img/jBox/avatar/' + DemoAvatars.Avatars[DemoAvatars.current] + '.svg)'}); // If it's the inita...
[ "function", "(", ")", "{", "// Set title and content depending on current index", "this", ".", "setTitle", "(", "DemoAvatars", ".", "Avatars", "[", "DemoAvatars", ".", "current", "]", ")", ";", "this", ".", "content", ".", "css", "(", "{", "backgroundImage", ":"...
When we open the jBox, set the new content and show the tooltips if it's the initial jBox
[ "When", "we", "open", "the", "jBox", "set", "the", "new", "content", "and", "show", "the", "tooltips", "if", "it", "s", "the", "initial", "jBox" ]
63857f9529ad8f9c491d5a5bc7fe44135f74e927
https://github.com/StephanWagner/jBox/blob/63857f9529ad8f9c491d5a5bc7fe44135f74e927/Demo/Playground/Playground.Avatars.js#L184-L221
train
minio/minio-js
src/main/signing.js
getCredential
function getCredential(accessKey, region, requestDate) { if (!isString(accessKey)) { throw new TypeError('accessKey should be of type "string"') } if (!isString(region)) { throw new TypeError('region should be of type "string"') } if (!isObject(requestDate)) { throw new TypeError('requestDate shou...
javascript
function getCredential(accessKey, region, requestDate) { if (!isString(accessKey)) { throw new TypeError('accessKey should be of type "string"') } if (!isString(region)) { throw new TypeError('region should be of type "string"') } if (!isObject(requestDate)) { throw new TypeError('requestDate shou...
[ "function", "getCredential", "(", "accessKey", ",", "region", ",", "requestDate", ")", "{", "if", "(", "!", "isString", "(", "accessKey", ")", ")", "{", "throw", "new", "TypeError", "(", "'accessKey should be of type \"string\"'", ")", "}", "if", "(", "!", "...
generate a credential string
[ "generate", "a", "credential", "string" ]
84a3e57809499c8dafb8afb4abf5162dd22c95ef
https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L79-L90
train
minio/minio-js
src/main/signing.js
getSignedHeaders
function getSignedHeaders(headers) { if (!isObject(headers)) { throw new TypeError('request should be of type "object"') } // Excerpts from @lsegal - https://github.com/aws/aws-sdk-js/issues/659#issuecomment-120477258 // // User-Agent: // // This is ignored from signing because signing this caus...
javascript
function getSignedHeaders(headers) { if (!isObject(headers)) { throw new TypeError('request should be of type "object"') } // Excerpts from @lsegal - https://github.com/aws/aws-sdk-js/issues/659#issuecomment-120477258 // // User-Agent: // // This is ignored from signing because signing this caus...
[ "function", "getSignedHeaders", "(", "headers", ")", "{", "if", "(", "!", "isObject", "(", "headers", ")", ")", "{", "throw", "new", "TypeError", "(", "'request should be of type \"object\"'", ")", "}", "// Excerpts from @lsegal - https://github.com/aws/aws-sdk-js/issues/...
Returns signed headers array - alphabetically sorted
[ "Returns", "signed", "headers", "array", "-", "alphabetically", "sorted" ]
84a3e57809499c8dafb8afb4abf5162dd22c95ef
https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L93-L128
train
minio/minio-js
src/main/signing.js
getSigningKey
function getSigningKey(date, region, secretKey) { if (!isObject(date)) { throw new TypeError('date should be of type "object"') } if (!isString(region)) { throw new TypeError('region should be of type "string"') } if (!isString(secretKey)) { throw new TypeError('secretKey should be of type "string...
javascript
function getSigningKey(date, region, secretKey) { if (!isObject(date)) { throw new TypeError('date should be of type "object"') } if (!isString(region)) { throw new TypeError('region should be of type "string"') } if (!isString(secretKey)) { throw new TypeError('secretKey should be of type "string...
[ "function", "getSigningKey", "(", "date", ",", "region", ",", "secretKey", ")", "{", "if", "(", "!", "isObject", "(", "date", ")", ")", "{", "throw", "new", "TypeError", "(", "'date should be of type \"object\"'", ")", "}", "if", "(", "!", "isString", "(",...
returns the key used for calculating signature
[ "returns", "the", "key", "used", "for", "calculating", "signature" ]
84a3e57809499c8dafb8afb4abf5162dd22c95ef
https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L131-L146
train
minio/minio-js
src/main/signing.js
getStringToSign
function getStringToSign(canonicalRequest, requestDate, region) { if (!isString(canonicalRequest)) { throw new TypeError('canonicalRequest should be of type "string"') } if (!isObject(requestDate)) { throw new TypeError('requestDate should be of type "object"') } if (!isString(region)) { throw new...
javascript
function getStringToSign(canonicalRequest, requestDate, region) { if (!isString(canonicalRequest)) { throw new TypeError('canonicalRequest should be of type "string"') } if (!isObject(requestDate)) { throw new TypeError('requestDate should be of type "object"') } if (!isString(region)) { throw new...
[ "function", "getStringToSign", "(", "canonicalRequest", ",", "requestDate", ",", "region", ")", "{", "if", "(", "!", "isString", "(", "canonicalRequest", ")", ")", "{", "throw", "new", "TypeError", "(", "'canonicalRequest should be of type \"string\"'", ")", "}", ...
returns the string that needs to be signed
[ "returns", "the", "string", "that", "needs", "to", "be", "signed" ]
84a3e57809499c8dafb8afb4abf5162dd22c95ef
https://github.com/minio/minio-js/blob/84a3e57809499c8dafb8afb4abf5162dd22c95ef/src/main/signing.js#L149-L167
train
watson/bonjour
lib/registry.js
probe
function probe (mdns, service, cb) { var sent = false var retries = 0 var timer mdns.on('response', onresponse) setTimeout(send, Math.random() * 250) function send () { // abort if the service have or is being stopped in the meantime if (!service._activated || service._destroyed) return mdns....
javascript
function probe (mdns, service, cb) { var sent = false var retries = 0 var timer mdns.on('response', onresponse) setTimeout(send, Math.random() * 250) function send () { // abort if the service have or is being stopped in the meantime if (!service._activated || service._destroyed) return mdns....
[ "function", "probe", "(", "mdns", ",", "service", ",", "cb", ")", "{", "var", "sent", "=", "false", "var", "retries", "=", "0", "var", "timer", "mdns", ".", "on", "(", "'response'", ",", "onresponse", ")", "setTimeout", "(", "send", ",", "Math", ".",...
Check if a service name is already in use on the network. Used before announcing the new service. To guard against race conditions where multiple services are started simultaneously on the network, wait a random amount of time (between 0 and 250 ms) before probing. TODO: Add support for Simultaneous Probe Tiebreakin...
[ "Check", "if", "a", "service", "name", "is", "already", "in", "use", "on", "the", "network", "." ]
bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098
https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/registry.js#L78-L119
train
watson/bonjour
lib/registry.js
announce
function announce (server, service) { var delay = 1000 var packet = service._records() server.register(packet) ;(function broadcast () { // abort if the service have or is being stopped in the meantime if (!service._activated || service._destroyed) return server.mdns.respond(packet, function () {...
javascript
function announce (server, service) { var delay = 1000 var packet = service._records() server.register(packet) ;(function broadcast () { // abort if the service have or is being stopped in the meantime if (!service._activated || service._destroyed) return server.mdns.respond(packet, function () {...
[ "function", "announce", "(", "server", ",", "service", ")", "{", "var", "delay", "=", "1000", "var", "packet", "=", "service", ".", "_records", "(", ")", "server", ".", "register", "(", "packet", ")", ";", "(", "function", "broadcast", "(", ")", "{", ...
Initial service announcement Used to announce new services when they are first registered. Broadcasts right away, then after 3 seconds, 9 seconds, 27 seconds, and so on, up to a maximum interval of one hour.
[ "Initial", "service", "announcement" ]
bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098
https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/registry.js#L129-L153
train
watson/bonjour
lib/registry.js
teardown
function teardown (server, services, cb) { if (!Array.isArray(services)) services = [services] services = services.filter(function (service) { return service._activated // ignore services not currently starting or started }) var records = flatten.depth(services.map(function (service) { service._activa...
javascript
function teardown (server, services, cb) { if (!Array.isArray(services)) services = [services] services = services.filter(function (service) { return service._activated // ignore services not currently starting or started }) var records = flatten.depth(services.map(function (service) { service._activa...
[ "function", "teardown", "(", "server", ",", "services", ",", "cb", ")", "{", "if", "(", "!", "Array", ".", "isArray", "(", "services", ")", ")", "services", "=", "[", "services", "]", "services", "=", "services", ".", "filter", "(", "function", "(", ...
Stop the given services Besides removing a service from the mDNS registry, a "goodbye" message is sent for each service to let the network know about the shutdown.
[ "Stop", "the", "given", "services" ]
bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098
https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/registry.js#L162-L189
train
watson/bonjour
lib/browser.js
Browser
function Browser (mdns, opts, onup) { if (typeof opts === 'function') return new Browser(mdns, null, opts) EventEmitter.call(this) this._mdns = mdns this._onresponse = null this._serviceMap = {} this._txt = dnsTxt(opts.txt) if (!opts || !opts.type) { this._name = WILDCARD this._wildcard = true ...
javascript
function Browser (mdns, opts, onup) { if (typeof opts === 'function') return new Browser(mdns, null, opts) EventEmitter.call(this) this._mdns = mdns this._onresponse = null this._serviceMap = {} this._txt = dnsTxt(opts.txt) if (!opts || !opts.type) { this._name = WILDCARD this._wildcard = true ...
[ "function", "Browser", "(", "mdns", ",", "opts", ",", "onup", ")", "{", "if", "(", "typeof", "opts", "===", "'function'", ")", "return", "new", "Browser", "(", "mdns", ",", "null", ",", "opts", ")", "EventEmitter", ".", "call", "(", "this", ")", "thi...
Start a browser The browser listens for services by querying for PTR records of a given type, protocol and domain, e.g. _http._tcp.local. If no type is given, a wild card search is performed. An internal list of online services is kept which starts out empty. When ever a new service is discovered, it's added to the ...
[ "Start", "a", "browser" ]
bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098
https://github.com/watson/bonjour/blob/bdc467a4f3c7b9fe8bc54468b6fc4d80b8f1c098/lib/browser.js#L30-L54
train
ocombe/ocLazyLoad
examples/requireJSExample/js/ng-grid-2.0.11.debug.js
function (obj, columnName) { if (typeof obj !== "object" || typeof columnName !== "string") { return obj; } var args = columnName.split('.'); var cObj = obj; if (args.length > 1) { for (var i = 1, len = args.length; i < len; i++) { cObj = cObj[args[i]]; if (!cObj) { return obj; ...
javascript
function (obj, columnName) { if (typeof obj !== "object" || typeof columnName !== "string") { return obj; } var args = columnName.split('.'); var cObj = obj; if (args.length > 1) { for (var i = 1, len = args.length; i < len; i++) { cObj = cObj[args[i]]; if (!cObj) { return obj; ...
[ "function", "(", "obj", ",", "columnName", ")", "{", "if", "(", "typeof", "obj", "!==", "\"object\"", "||", "typeof", "columnName", "!==", "\"string\"", ")", "{", "return", "obj", ";", "}", "var", "args", "=", "columnName", ".", "split", "(", "'.'", ")...
Traversing through the object to find the value that we want. If fail, then return the original object.
[ "Traversing", "through", "the", "object", "to", "find", "the", "value", "that", "we", "want", ".", "If", "fail", "then", "return", "the", "original", "object", "." ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/examples/requireJSExample/js/ng-grid-2.0.11.debug.js#L2686-L2702
train
ocombe/ocLazyLoad
dist/ocLazyLoad.require.js
stringify
function stringify(obj) { try { return JSON.stringify(obj); } catch (e) { var cache = []; return JSON.stringify(obj, function (key, value) { if (angular.isObject(value) && value !== null) { if (cache.inde...
javascript
function stringify(obj) { try { return JSON.stringify(obj); } catch (e) { var cache = []; return JSON.stringify(obj, function (key, value) { if (angular.isObject(value) && value !== null) { if (cache.inde...
[ "function", "stringify", "(", "obj", ")", "{", "try", "{", "return", "JSON", ".", "stringify", "(", "obj", ")", ";", "}", "catch", "(", "e", ")", "{", "var", "cache", "=", "[", "]", ";", "return", "JSON", ".", "stringify", "(", "obj", ",", "funct...
Like JSON.stringify but that doesn't throw on circular references @param obj
[ "Like", "JSON", ".", "stringify", "but", "that", "doesn", "t", "throw", "on", "circular", "references" ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L139-L156
train
ocombe/ocLazyLoad
dist/ocLazyLoad.require.js
getModuleConfig
function getModuleConfig(moduleName) { if (!angular.isString(moduleName)) { throw new Error('You need to give the name of the module to get'); } if (!modules[moduleName]) { return null; } ...
javascript
function getModuleConfig(moduleName) { if (!angular.isString(moduleName)) { throw new Error('You need to give the name of the module to get'); } if (!modules[moduleName]) { return null; } ...
[ "function", "getModuleConfig", "(", "moduleName", ")", "{", "if", "(", "!", "angular", ".", "isString", "(", "moduleName", ")", ")", "{", "throw", "new", "Error", "(", "'You need to give the name of the module to get'", ")", ";", "}", "if", "(", "!", "modules"...
Let you get a module config object @param moduleName String the name of the module @returns {*}
[ "Let", "you", "get", "a", "module", "config", "object" ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L420-L428
train
ocombe/ocLazyLoad
dist/ocLazyLoad.require.js
setModuleConfig
function setModuleConfig(moduleConfig) { if (!angular.isObject(moduleConfig)) { throw new Error('You need to give the module config object to set'); } modules[moduleConfig.name] = moduleConfig; return moduleConfig; ...
javascript
function setModuleConfig(moduleConfig) { if (!angular.isObject(moduleConfig)) { throw new Error('You need to give the module config object to set'); } modules[moduleConfig.name] = moduleConfig; return moduleConfig; ...
[ "function", "setModuleConfig", "(", "moduleConfig", ")", "{", "if", "(", "!", "angular", ".", "isObject", "(", "moduleConfig", ")", ")", "{", "throw", "new", "Error", "(", "'You need to give the module config object to set'", ")", ";", "}", "modules", "[", "modu...
Let you define a module config object @param moduleConfig Object the module config object @returns {*}
[ "Let", "you", "define", "a", "module", "config", "object" ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L435-L441
train
ocombe/ocLazyLoad
dist/ocLazyLoad.require.js
isLoaded
function isLoaded(modulesNames) { var moduleLoaded = function moduleLoaded(module) { var isLoaded = regModules.indexOf(module) > -1; if (!isLoaded) { isLoaded = !!moduleExists(module); } ...
javascript
function isLoaded(modulesNames) { var moduleLoaded = function moduleLoaded(module) { var isLoaded = regModules.indexOf(module) > -1; if (!isLoaded) { isLoaded = !!moduleExists(module); } ...
[ "function", "isLoaded", "(", "modulesNames", ")", "{", "var", "moduleLoaded", "=", "function", "moduleLoaded", "(", "module", ")", "{", "var", "isLoaded", "=", "regModules", ".", "indexOf", "(", "module", ")", ">", "-", "1", ";", "if", "(", "!", "isLoade...
Let you check if a module has been loaded into Angular or not @param modulesNames String/Object a module name, or a list of module names @returns {boolean}
[ "Let", "you", "check", "if", "a", "module", "has", "been", "loaded", "into", "Angular", "or", "not" ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L456-L478
train
ocombe/ocLazyLoad
dist/ocLazyLoad.require.js
getModule
function getModule(moduleName) { try { return ngModuleFct(moduleName); } catch (e) { // this error message really suxx if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) { ...
javascript
function getModule(moduleName) { try { return ngModuleFct(moduleName); } catch (e) { // this error message really suxx if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) { ...
[ "function", "getModule", "(", "moduleName", ")", "{", "try", "{", "return", "ngModuleFct", "(", "moduleName", ")", ";", "}", "catch", "(", "e", ")", "{", "// this error message really suxx", "if", "(", "/", "No module", "/", ".", "test", "(", "e", ")", "...
Returns a module if it exists @param moduleName @returns {module}
[ "Returns", "a", "module", "if", "it", "exists" ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L492-L502
train
ocombe/ocLazyLoad
dist/ocLazyLoad.require.js
inject
function inject(moduleName) { var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; var self = this, deferred =...
javascript
function inject(moduleName) { var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; var self = this, deferred =...
[ "function", "inject", "(", "moduleName", ")", "{", "var", "localParams", "=", "arguments", ".", "length", "<=", "1", "||", "arguments", "[", "1", "]", "===", "undefined", "?", "{", "}", ":", "arguments", "[", "1", "]", ";", "var", "real", "=", "argum...
Inject new modules into Angular @param moduleName @param localParams @param real
[ "Inject", "new", "modules", "into", "Angular" ]
c282f8f47736c195a4079024f62f3c9e16420619
https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/dist/ocLazyLoad.require.js#L622-L672
train
webpack-contrib/less-loader
src/getOptions.js
getOptions
function getOptions(loaderContext) { const options = { plugins: [], relativeUrls: true, ...clone(loaderUtils.getOptions(loaderContext)), }; // We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry options.filename = loaderContext.resource;...
javascript
function getOptions(loaderContext) { const options = { plugins: [], relativeUrls: true, ...clone(loaderUtils.getOptions(loaderContext)), }; // We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry options.filename = loaderContext.resource;...
[ "function", "getOptions", "(", "loaderContext", ")", "{", "const", "options", "=", "{", "plugins", ":", "[", "]", ",", "relativeUrls", ":", "true", ",", "...", "clone", "(", "loaderUtils", ".", "getOptions", "(", "loaderContext", ")", ")", ",", "}", ";",...
Retrieves the options from the loaderContext, makes a deep copy of it and normalizes it for further consumption. @param {LoaderContext} loaderContext
[ "Retrieves", "the", "options", "from", "the", "loaderContext", "makes", "a", "deep", "copy", "of", "it", "and", "normalizes", "it", "for", "further", "consumption", "." ]
821c12d407b36f49aacc506737a02d1dc46aee56
https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/getOptions.js#L11-L38
train
webpack-contrib/less-loader
src/createWebpackLessPlugin.js
createWebpackLessPlugin
function createWebpackLessPlugin(loaderContext) { const { fs } = loaderContext; const resolve = pify(loaderContext.resolve.bind(loaderContext)); const loadModule = pify(loaderContext.loadModule.bind(loaderContext)); const readFile = pify(fs.readFile.bind(fs)); class WebpackFileManager extends less.FileManage...
javascript
function createWebpackLessPlugin(loaderContext) { const { fs } = loaderContext; const resolve = pify(loaderContext.resolve.bind(loaderContext)); const loadModule = pify(loaderContext.loadModule.bind(loaderContext)); const readFile = pify(fs.readFile.bind(fs)); class WebpackFileManager extends less.FileManage...
[ "function", "createWebpackLessPlugin", "(", "loaderContext", ")", "{", "const", "{", "fs", "}", "=", "loaderContext", ";", "const", "resolve", "=", "pify", "(", "loaderContext", ".", "resolve", ".", "bind", "(", "loaderContext", ")", ")", ";", "const", "load...
Creates a Less plugin that uses webpack's resolving engine that is provided by the loaderContext. @param {LoaderContext} loaderContext @param {string=} root @returns {LessPlugin}
[ "Creates", "a", "Less", "plugin", "that", "uses", "webpack", "s", "resolving", "engine", "that", "is", "provided", "by", "the", "loaderContext", "." ]
821c12d407b36f49aacc506737a02d1dc46aee56
https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/createWebpackLessPlugin.js#L30-L100
train
webpack-contrib/less-loader
src/processResult.js
processResult
function processResult(loaderContext, resultPromise) { const { callback } = loaderContext; resultPromise .then( ({ css, map, imports }) => { imports.forEach(loaderContext.addDependency, loaderContext); return { // Removing the sourceMappingURL comment. // See removeSou...
javascript
function processResult(loaderContext, resultPromise) { const { callback } = loaderContext; resultPromise .then( ({ css, map, imports }) => { imports.forEach(loaderContext.addDependency, loaderContext); return { // Removing the sourceMappingURL comment. // See removeSou...
[ "function", "processResult", "(", "loaderContext", ",", "resultPromise", ")", "{", "const", "{", "callback", "}", "=", "loaderContext", ";", "resultPromise", ".", "then", "(", "(", "{", "css", ",", "map", ",", "imports", "}", ")", "=>", "{", "imports", "...
Removes the sourceMappingURL from the generated CSS, parses the source map and calls the next loader. @param {loaderContext} loaderContext @param {Promise<LessResult>} resultPromise
[ "Removes", "the", "sourceMappingURL", "from", "the", "generated", "CSS", "parses", "the", "source", "map", "and", "calls", "the", "next", "loader", "." ]
821c12d407b36f49aacc506737a02d1dc46aee56
https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/processResult.js#L10-L34
train
webpack-contrib/less-loader
src/formatLessError.js
formatLessError
function formatLessError(err) { /* eslint-disable no-param-reassign */ const msg = err.message; // Instruct webpack to hide the JS stack from the console // Usually you're only interested in the SASS stack in this case. err.hideStack = true; err.message = [ os.EOL, ...getFileExcerptIfPossible(err)...
javascript
function formatLessError(err) { /* eslint-disable no-param-reassign */ const msg = err.message; // Instruct webpack to hide the JS stack from the console // Usually you're only interested in the SASS stack in this case. err.hideStack = true; err.message = [ os.EOL, ...getFileExcerptIfPossible(err)...
[ "function", "formatLessError", "(", "err", ")", "{", "/* eslint-disable no-param-reassign */", "const", "msg", "=", "err", ".", "message", ";", "// Instruct webpack to hide the JS stack from the console", "// Usually you're only interested in the SASS stack in this case.", "err", "...
Beautifies the error message from Less. @param {LessError} lessErr @param {string} lessErr.type - e.g. 'Name' @param {string} lessErr.message - e.g. '.undefined-mixin is undefined' @param {string} lessErr.filename - e.g. '/path/to/style.less' @param {number} lessErr.index - e.g. 352 @param {number} lessErr.line - e.g....
[ "Beautifies", "the", "error", "message", "from", "Less", "." ]
821c12d407b36f49aacc506737a02d1dc46aee56
https://github.com/webpack-contrib/less-loader/blob/821c12d407b36f49aacc506737a02d1dc46aee56/src/formatLessError.js#L45-L61
train
GriddleGriddle/Griddle
src/utils/columnUtils.js
getColumnPropertiesFromColumnArray
function getColumnPropertiesFromColumnArray(columnProperties, columns) { return columns.reduce((previous, current, i) => { previous[current] = { id: current, order: offset + i }; return previous; }, columnProperties); }
javascript
function getColumnPropertiesFromColumnArray(columnProperties, columns) { return columns.reduce((previous, current, i) => { previous[current] = { id: current, order: offset + i }; return previous; }, columnProperties); }
[ "function", "getColumnPropertiesFromColumnArray", "(", "columnProperties", ",", "columns", ")", "{", "return", "columns", ".", "reduce", "(", "(", "previous", ",", "current", ",", "i", ")", "=>", "{", "previous", "[", "current", "]", "=", "{", "id", ":", "...
Gets a column properties object from an array of columnNames @param {Array<string>} columns - array of column names
[ "Gets", "a", "column", "properties", "object", "from", "an", "array", "of", "columnNames" ]
f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891
https://github.com/GriddleGriddle/Griddle/blob/f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891/src/utils/columnUtils.js#L6-L12
train
GriddleGriddle/Griddle
src/utils/compositionUtils.js
buildGriddleReducerObject
function buildGriddleReducerObject(reducerObjects) { let reducerMethodsWithoutHooks = []; let beforeHooks = []; let afterHooks = []; let beforeReduceAll = []; let afterReduceAll = []; if (reducerObjects.length > 0) { // remove the hooks and extend the object for(const key in reducerObjects) { ...
javascript
function buildGriddleReducerObject(reducerObjects) { let reducerMethodsWithoutHooks = []; let beforeHooks = []; let afterHooks = []; let beforeReduceAll = []; let afterReduceAll = []; if (reducerObjects.length > 0) { // remove the hooks and extend the object for(const key in reducerObjects) { ...
[ "function", "buildGriddleReducerObject", "(", "reducerObjects", ")", "{", "let", "reducerMethodsWithoutHooks", "=", "[", "]", ";", "let", "beforeHooks", "=", "[", "]", ";", "let", "afterHooks", "=", "[", "]", ";", "let", "beforeReduceAll", "=", "[", "]", ";"...
Builds a new reducer that composes hooks and extends standard reducers between reducerObjects @param {Object <array>} reducers - An array of reducerObjects Note: this used to be exported, but the same properties are available from buildGriddleReducer. TODO: This method should be broken down a bit -- it's doing too much...
[ "Builds", "a", "new", "reducer", "that", "composes", "hooks", "and", "extends", "standard", "reducers", "between", "reducerObjects" ]
f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891
https://github.com/GriddleGriddle/Griddle/blob/f836fc3d3e1e05357ae60c9a7b3c106e5c5c8891/src/utils/compositionUtils.js#L177-L216
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-file/www/FileEntry.js
function(name, fullPath, fileSystem, nativeURL) { // remove trailing slash if it is present if (fullPath && /\/$/.test(fullPath)) { fullPath = fullPath.substring(0, fullPath.length - 1); } if (nativeURL && /\/$/.test(nativeURL)) { nativeURL = nativeURL.substring(0, nativeURL.length - 1);...
javascript
function(name, fullPath, fileSystem, nativeURL) { // remove trailing slash if it is present if (fullPath && /\/$/.test(fullPath)) { fullPath = fullPath.substring(0, fullPath.length - 1); } if (nativeURL && /\/$/.test(nativeURL)) { nativeURL = nativeURL.substring(0, nativeURL.length - 1);...
[ "function", "(", "name", ",", "fullPath", ",", "fileSystem", ",", "nativeURL", ")", "{", "// remove trailing slash if it is present", "if", "(", "fullPath", "&&", "/", "\\/$", "/", ".", "test", "(", "fullPath", ")", ")", "{", "fullPath", "=", "fullPath", "."...
An interface representing a file on the file system. {boolean} isFile always true (readonly) {boolean} isDirectory always false (readonly) {DOMString} name of the file, excluding the path leading to it (readonly) {DOMString} fullPath the absolute full path to the file (readonly) {FileSystem} filesystem on which the fi...
[ "An", "interface", "representing", "a", "file", "on", "the", "file", "system", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-file/www/FileEntry.js#L39-L49
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/afterPrepare.js
run
function run(context) { const preferences = configPreferences.read(context); const platforms = context.opts.cordova.platforms; platforms.forEach(platform => { if (platform === ANDROID) { androidManifest.writePreferences(context, preferences); } if (platform === IOS) { iosD...
javascript
function run(context) { const preferences = configPreferences.read(context); const platforms = context.opts.cordova.platforms; platforms.forEach(platform => { if (platform === ANDROID) { androidManifest.writePreferences(context, preferences); } if (platform === IOS) { iosD...
[ "function", "run", "(", "context", ")", "{", "const", "preferences", "=", "configPreferences", ".", "read", "(", "context", ")", ";", "const", "platforms", "=", "context", ".", "opts", ".", "cordova", ".", "platforms", ";", "platforms", ".", "forEach", "("...
builds after platform config
[ "builds", "after", "platform", "config" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/afterPrepare.js#L14-L26
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/index.js
execute
function execute(method, params) { var output = !params ? [] : params; if (method == "getStandardEvents") { return new Promise(function promise(resolve, reject) { resolve(standardEvent); }); } return new Promise(function promise(resolve, reject) { exec( function success(res) { ...
javascript
function execute(method, params) { var output = !params ? [] : params; if (method == "getStandardEvents") { return new Promise(function promise(resolve, reject) { resolve(standardEvent); }); } return new Promise(function promise(resolve, reject) { exec( function success(res) { ...
[ "function", "execute", "(", "method", ",", "params", ")", "{", "var", "output", "=", "!", "params", "?", "[", "]", ":", "params", ";", "if", "(", "method", "==", "\"getStandardEvents\"", ")", "{", "return", "new", "Promise", "(", "function", "promise", ...
JavsSript to SDK wrappers
[ "JavsSript", "to", "SDK", "wrappers" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/index.js#L33-L55
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-file/www/FileReader.js
function() { this._readyState = 0; this._error = null; this._result = null; this._progress = null; this._localURL = ''; this._realReader = origFileReader ? new origFileReader() : {}; }
javascript
function() { this._readyState = 0; this._error = null; this._result = null; this._progress = null; this._localURL = ''; this._realReader = origFileReader ? new origFileReader() : {}; }
[ "function", "(", ")", "{", "this", ".", "_readyState", "=", "0", ";", "this", ".", "_error", "=", "null", ";", "this", ".", "_result", "=", "null", ";", "this", ".", "_progress", "=", "null", ";", "this", ".", "_localURL", "=", "''", ";", "this", ...
This class reads the mobile device file system. For Android: The root directory is the root of the file system. To read from the SD card, the file name is "sdcard/my_file.txt" @constructor
[ "This", "class", "reads", "the", "mobile", "device", "file", "system", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-file/www/FileReader.js#L37-L44
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js
addDevelopmentTeam
function addDevelopmentTeam(preferences) { const file = path.join(preferences.projectRoot, FILENAME); let content = getBuildJson(file); content = convertStringToJson(content); createDefaultBuildJson(content); updateDevelopmentTeam(content, preferences); content = convertJsonToString(content); ...
javascript
function addDevelopmentTeam(preferences) { const file = path.join(preferences.projectRoot, FILENAME); let content = getBuildJson(file); content = convertStringToJson(content); createDefaultBuildJson(content); updateDevelopmentTeam(content, preferences); content = convertJsonToString(content); ...
[ "function", "addDevelopmentTeam", "(", "preferences", ")", "{", "const", "file", "=", "path", ".", "join", "(", "preferences", ".", "projectRoot", ",", "FILENAME", ")", ";", "let", "content", "=", "getBuildJson", "(", "file", ")", ";", "content", "=", "con...
updates the development team for Universal Links
[ "updates", "the", "development", "team", "for", "Universal", "Links" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js#L14-L23
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js
updateDevelopmentTeam
function updateDevelopmentTeam(content, preferences) { const release = preferences.iosTeamRelease; const debug = preferences.iosTeamDebug ? preferences.iosTeamDebug : preferences.iosTeamRelease; if (release === null) { throw new Error( 'BRANCH SDK: Invalid "ios-team-release" in <b...
javascript
function updateDevelopmentTeam(content, preferences) { const release = preferences.iosTeamRelease; const debug = preferences.iosTeamDebug ? preferences.iosTeamDebug : preferences.iosTeamRelease; if (release === null) { throw new Error( 'BRANCH SDK: Invalid "ios-team-release" in <b...
[ "function", "updateDevelopmentTeam", "(", "content", ",", "preferences", ")", "{", "const", "release", "=", "preferences", ".", "iosTeamRelease", ";", "const", "debug", "=", "preferences", ".", "iosTeamDebug", "?", "preferences", ".", "iosTeamDebug", ":", "prefere...
update build.json with developmentTeam from config.xml
[ "update", "build", ".", "json", "with", "developmentTeam", "from", "config", ".", "xml" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateDevelopmentTeam.js#L88-L102
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js
function (successCB, failureCB, args, env) { var result = new PluginResult(args, env); var response = g11n.getInstance().InvokeMethod('getPreferredLanguage', args); var data = JSON.parse(response); console.log('getPreferredLanguage: ' + JSON.stringify(response)); if (data.error ...
javascript
function (successCB, failureCB, args, env) { var result = new PluginResult(args, env); var response = g11n.getInstance().InvokeMethod('getPreferredLanguage', args); var data = JSON.parse(response); console.log('getPreferredLanguage: ' + JSON.stringify(response)); if (data.error ...
[ "function", "(", "successCB", ",", "failureCB", ",", "args", ",", "env", ")", "{", "var", "result", "=", "new", "PluginResult", "(", "args", ",", "env", ")", ";", "var", "response", "=", "g11n", ".", "getInstance", "(", ")", ".", "InvokeMethod", "(", ...
Returns the string identifier for the client's current language. It returns the language identifier string to the successCB callback with a properties object as a parameter. If there is an error getting the language, then the errorCB callback is invoked. @param {Function} successCB @param {Function} errorCB @return O...
[ "Returns", "the", "string", "identifier", "for", "the", "client", "s", "current", "language", ".", "It", "returns", "the", "language", "identifier", "string", "to", "the", "successCB", "callback", "with", "a", "properties", "object", "as", "a", "parameter", "....
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js#L44-L60
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js
function (successCB, failureCB, args, env) { var result = new PluginResult(args, env); var response = g11n.getInstance().InvokeMethod('getNumberPattern', args); var data = JSON.parse(response); console.log('getNumberPattern: ' + JSON.stringify(response)); if (data.error !== unde...
javascript
function (successCB, failureCB, args, env) { var result = new PluginResult(args, env); var response = g11n.getInstance().InvokeMethod('getNumberPattern', args); var data = JSON.parse(response); console.log('getNumberPattern: ' + JSON.stringify(response)); if (data.error !== unde...
[ "function", "(", "successCB", ",", "failureCB", ",", "args", ",", "env", ")", "{", "var", "result", "=", "new", "PluginResult", "(", "args", ",", "env", ")", ";", "var", "response", "=", "g11n", ".", "getInstance", "(", ")", ".", "InvokeMethod", "(", ...
Returns a pattern string for formatting and parsing numbers according to the client's user preferences. It returns the pattern to the successCB callback with a properties object as a parameter. If there is an error obtaining the pattern, then the errorCB callback is invoked. The defaults are: type="decimal" @param {F...
[ "Returns", "a", "pattern", "string", "for", "formatting", "and", "parsing", "numbers", "according", "to", "the", "client", "s", "user", "preferences", ".", "It", "returns", "the", "pattern", "to", "the", "successCB", "callback", "with", "a", "properties", "obj...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js#L483-L506
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js
function (date, successCB, failureCB, options) { argscheck.checkArgs('dfFO', 'Globalization.dateToString', arguments); var dateValue = date.valueOf(); exec(successCB, failureCB, 'Globalization', 'dateToString', [{'date': dateValue, 'options': options}]); }
javascript
function (date, successCB, failureCB, options) { argscheck.checkArgs('dfFO', 'Globalization.dateToString', arguments); var dateValue = date.valueOf(); exec(successCB, failureCB, 'Globalization', 'dateToString', [{'date': dateValue, 'options': options}]); }
[ "function", "(", "date", ",", "successCB", ",", "failureCB", ",", "options", ")", "{", "argscheck", ".", "checkArgs", "(", "'dfFO'", ",", "'Globalization.dateToString'", ",", "arguments", ")", ";", "var", "dateValue", "=", "date", ".", "valueOf", "(", ")", ...
Returns a date formatted as a string according to the client's user preferences and calendar using the time zone of the client. It returns the formatted date string to the successCB callback with a properties object as a parameter. If there is an error formatting the date, then the errorCB callback is invoked. The def...
[ "Returns", "a", "date", "formatted", "as", "a", "string", "according", "to", "the", "client", "s", "user", "preferences", "and", "calendar", "using", "the", "time", "zone", "of", "the", "client", ".", "It", "returns", "the", "formatted", "date", "string", ...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js#L97-L101
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js
function (currencyCode, successCB, failureCB) { argscheck.checkArgs('sfF', 'Globalization.getCurrencyPattern', arguments); exec(successCB, failureCB, 'Globalization', 'getCurrencyPattern', [{'currencyCode': currencyCode}]); }
javascript
function (currencyCode, successCB, failureCB) { argscheck.checkArgs('sfF', 'Globalization.getCurrencyPattern', arguments); exec(successCB, failureCB, 'Globalization', 'getCurrencyPattern', [{'currencyCode': currencyCode}]); }
[ "function", "(", "currencyCode", ",", "successCB", ",", "failureCB", ")", "{", "argscheck", ".", "checkArgs", "(", "'sfF'", ",", "'Globalization.getCurrencyPattern'", ",", "arguments", ")", ";", "exec", "(", "successCB", ",", "failureCB", ",", "'Globalization'", ...
Returns a pattern string for formatting and parsing currency values according to the client's user preferences and ISO 4217 currency code. It returns the pattern to the successCB callback with a properties object as a parameter. If there is an error obtaining the pattern, then the errorCB callback is invoked. @param {...
[ "Returns", "a", "pattern", "string", "for", "formatting", "and", "parsing", "currency", "values", "according", "to", "the", "client", "s", "user", "preferences", "and", "ISO", "4217", "currency", "code", ".", "It", "returns", "the", "pattern", "to", "the", "...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/platforms/ios/www/plugins/cordova-plugin-globalization/www/globalization.js#L379-L382
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/www/MediaFile.js
function(name, localURL, type, lastModifiedDate, size){ MediaFile.__super__.constructor.apply(this, arguments); }
javascript
function(name, localURL, type, lastModifiedDate, size){ MediaFile.__super__.constructor.apply(this, arguments); }
[ "function", "(", "name", ",", "localURL", ",", "type", ",", "lastModifiedDate", ",", "size", ")", "{", "MediaFile", ".", "__super__", ".", "constructor", ".", "apply", "(", "this", ",", "arguments", ")", ";", "}" ]
Represents a single file. name {DOMString} name of the file, without path information fullPath {DOMString} the full path of the file, including the name type {DOMString} mime type lastModifiedDate {Date} last modified date size {Number} size of the file in bytes
[ "Represents", "a", "single", "file", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/www/MediaFile.js#L35-L37
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
collectEventData
function collectEventData(element, eventType, touches, ev) { // find out pointerType var pointerType = ionic.Gestures.POINTER_TOUCH; if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) { pointerType = ionic.Gestures.POINTER_MOUSE; } ...
javascript
function collectEventData(element, eventType, touches, ev) { // find out pointerType var pointerType = ionic.Gestures.POINTER_TOUCH; if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) { pointerType = ionic.Gestures.POINTER_MOUSE; } ...
[ "function", "collectEventData", "(", "element", ",", "eventType", ",", "touches", ",", "ev", ")", "{", "// find out pointerType", "var", "pointerType", "=", "ionic", ".", "Gestures", ".", "POINTER_TOUCH", ";", "if", "(", "ev", ".", "type", ".", "match", "(",...
collect event data for ionic.Gestures js @param {HTMLElement} element @param {String} eventType like ionic.Gestures.EVENT_MOVE @param {Object} eventData
[ "collect", "event", "data", "for", "ionic", ".", "Gestures", "js" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L1032-L1079
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function() { if (keyboardHasPlugin()) { window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow ); window.removeEventListener('native.keyboardhide', keyboardFocusOut); } else { document.body.removeEventListener('focusout', keyboardFocusOut); } document.body.remov...
javascript
function() { if (keyboardHasPlugin()) { window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow ); window.removeEventListener('native.keyboardhide', keyboardFocusOut); } else { document.body.removeEventListener('focusout', keyboardFocusOut); } document.body.remov...
[ "function", "(", ")", "{", "if", "(", "keyboardHasPlugin", "(", ")", ")", "{", "window", ".", "removeEventListener", "(", "'native.keyboardshow'", ",", "debouncedKeyboardNativeShow", ")", ";", "window", ".", "removeEventListener", "(", "'native.keyboardhide'", ",", ...
Remove all keyboard related event listeners, effectively disabling Ionic's keyboard adjustments.
[ "Remove", "all", "keyboard", "related", "event", "listeners", "effectively", "disabling", "Ionic", "s", "keyboard", "adjustments", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3776-L3795
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
keyboardNativeShow
function keyboardNativeShow(e) { clearTimeout(keyboardFocusOutTimer); //console.log("keyboardNativeShow fired at: " + Date.now()); //console.log("keyboardNativeshow window.innerHeight: " + window.innerHeight); if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) { ionic.keyboard.isOpening = true; io...
javascript
function keyboardNativeShow(e) { clearTimeout(keyboardFocusOutTimer); //console.log("keyboardNativeShow fired at: " + Date.now()); //console.log("keyboardNativeshow window.innerHeight: " + window.innerHeight); if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) { ionic.keyboard.isOpening = true; io...
[ "function", "keyboardNativeShow", "(", "e", ")", "{", "clearTimeout", "(", "keyboardFocusOutTimer", ")", ";", "//console.log(\"keyboardNativeShow fired at: \" + Date.now());", "//console.log(\"keyboardNativeshow window.innerHeight: \" + window.innerHeight);", "if", "(", "!", "ionic",...
Event handler for 'native.keyboardshow' event, sets keyboard.height to the reported height and keyboard.isOpening to true. Then calls keyboardWaitForResize with keyboardShow or keyboardUpdateViewportHeight as the callback depending on whether the event was triggered by a focusin or an orientationchange.
[ "Event", "handler", "for", "native", ".", "keyboardshow", "event", "sets", "keyboard", ".", "height", "to", "the", "reported", "height", "and", "keyboard", ".", "isOpening", "to", "true", ".", "Then", "calls", "keyboardWaitForResize", "with", "keyboardShow", "or...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3847-L3865
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
keyboardFocusOut
function keyboardFocusOut() { clearTimeout(keyboardFocusOutTimer); //console.log("keyboardFocusOut fired at: " + Date.now()); //console.log("keyboardFocusOut event type: " + e.type); if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) { ionic.keyboard.isClosing = true; ionic.keyboard.isOpening = fal...
javascript
function keyboardFocusOut() { clearTimeout(keyboardFocusOutTimer); //console.log("keyboardFocusOut fired at: " + Date.now()); //console.log("keyboardFocusOut event type: " + e.type); if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) { ionic.keyboard.isClosing = true; ionic.keyboard.isOpening = fal...
[ "function", "keyboardFocusOut", "(", ")", "{", "clearTimeout", "(", "keyboardFocusOutTimer", ")", ";", "//console.log(\"keyboardFocusOut fired at: \" + Date.now());", "//console.log(\"keyboardFocusOut event type: \" + e.type);", "if", "(", "ionic", ".", "keyboard", ".", "isOpen",...
Event handler for 'focusout' events. Sets keyboard.isClosing to true and calls keyboardWaitForResize with keyboardHide as the callback after a small timeout.
[ "Event", "handler", "for", "focusout", "events", ".", "Sets", "keyboard", ".", "isClosing", "to", "true", "and", "calls", "keyboardWaitForResize", "with", "keyboardHide", "as", "the", "callback", "after", "a", "small", "timeout", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3944-L3972
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
keyboardOrientationChange
function keyboardOrientationChange() { //console.log("orientationchange fired at: " + Date.now()); //console.log("orientation was: " + (ionic.keyboard.isLandscape ? "landscape" : "portrait")); // toggle orientation ionic.keyboard.isLandscape = !ionic.keyboard.isLandscape; // //console.log("now orientation is...
javascript
function keyboardOrientationChange() { //console.log("orientationchange fired at: " + Date.now()); //console.log("orientation was: " + (ionic.keyboard.isLandscape ? "landscape" : "portrait")); // toggle orientation ionic.keyboard.isLandscape = !ionic.keyboard.isLandscape; // //console.log("now orientation is...
[ "function", "keyboardOrientationChange", "(", ")", "{", "//console.log(\"orientationchange fired at: \" + Date.now());", "//console.log(\"orientation was: \" + (ionic.keyboard.isLandscape ? \"landscape\" : \"portrait\"));", "// toggle orientation", "ionic", ".", "keyboard", ".", "isLandscape...
Event handler for 'orientationchange' events. If using the keyboard plugin and the keyboard is open on Android, sets wasOrientationChange to true so nativeShow can update the viewport height with an accurate keyboard height. If the keyboard isn't open or keyboard plugin isn't being used, waits for the window to resize ...
[ "Event", "handler", "for", "orientationchange", "events", ".", "If", "using", "the", "keyboard", "plugin", "and", "the", "keyboard", "is", "open", "on", "Android", "sets", "wasOrientationChange", "to", "true", "so", "nativeShow", "can", "update", "the", "viewpor...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L3985-L4010
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
keyboardShow
function keyboardShow() { ionic.keyboard.isOpen = true; ionic.keyboard.isOpening = false; var details = { keyboardHeight: keyboardGetHeight(), viewportHeight: keyboardCurrentViewportHeight }; if (keyboardActiveElement) { details.target = keyboardActiveElement; var elementBounds = keyboardA...
javascript
function keyboardShow() { ionic.keyboard.isOpen = true; ionic.keyboard.isOpening = false; var details = { keyboardHeight: keyboardGetHeight(), viewportHeight: keyboardCurrentViewportHeight }; if (keyboardActiveElement) { details.target = keyboardActiveElement; var elementBounds = keyboardA...
[ "function", "keyboardShow", "(", ")", "{", "ionic", ".", "keyboard", ".", "isOpen", "=", "true", ";", "ionic", ".", "keyboard", ".", "isOpening", "=", "false", ";", "var", "details", "=", "{", "keyboardHeight", ":", "keyboardGetHeight", "(", ")", ",", "v...
On keyboard open sets keyboard state to open, adds CSS to the body indicating the keyboard is open and tells the scroll view to resize and the currently focused input into view if necessary.
[ "On", "keyboard", "open", "sets", "keyboard", "state", "to", "open", "adds", "CSS", "to", "the", "body", "indicating", "the", "keyboard", "is", "open", "and", "tells", "the", "scroll", "view", "to", "resize", "and", "the", "currently", "focused", "input", ...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L4156-L4193
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(touches, timeStamp) { var self = this; // remember if the deceleration was just stopped self.__decStopped = !!(self.__isDecelerating || self.__isAnimating); self.hintResize(); if (timeStamp instanceof Date) { timeStamp = timeStamp.valueOf(); } if (typeof timeStamp !== "numb...
javascript
function(touches, timeStamp) { var self = this; // remember if the deceleration was just stopped self.__decStopped = !!(self.__isDecelerating || self.__isAnimating); self.hintResize(); if (timeStamp instanceof Date) { timeStamp = timeStamp.valueOf(); } if (typeof timeStamp !== "numb...
[ "function", "(", "touches", ",", "timeStamp", ")", "{", "var", "self", "=", "this", ";", "// remember if the deceleration was just stopped", "self", ".", "__decStopped", "=", "!", "!", "(", "self", ".", "__isDecelerating", "||", "self", ".", "__isAnimating", ")"...
Touch start handler for scrolling support
[ "Touch", "start", "handler", "for", "scrolling", "support" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L6199-L6281
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(left, top, animate) { var self = this; if (!animate) { self.el.scrollTop = top; self.el.scrollLeft = left; self.resize(); return; } var oldOverflowX = self.el.style.overflowX; var oldOverflowY = self.el.style.overflowY; clearTimeout(self.__s...
javascript
function(left, top, animate) { var self = this; if (!animate) { self.el.scrollTop = top; self.el.scrollLeft = left; self.resize(); return; } var oldOverflowX = self.el.style.overflowX; var oldOverflowY = self.el.style.overflowY; clearTimeout(self.__s...
[ "function", "(", "left", ",", "top", ",", "animate", ")", "{", "var", "self", "=", "this", ";", "if", "(", "!", "animate", ")", "{", "self", ".", "el", ".", "scrollTop", "=", "top", ";", "self", ".", "el", ".", "scrollLeft", "=", "left", ";", "...
Scrolls to the given position in px. @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code> @param top {Number} Vertical scroll position, keeps current if value is <code>null</code> @param animate {Boolean} Whether the scrolling should happen using an animation
[ "Scrolls", "to", "the", "given", "position", "in", "px", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L7204-L7277
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function() { this.el = this.listEl = this.scrollEl = this.scrollView = null; // ensure no scrolls have been left frozen if (this.isScrollFreeze) { self.scrollView.freeze(false); } }
javascript
function() { this.el = this.listEl = this.scrollEl = this.scrollView = null; // ensure no scrolls have been left frozen if (this.isScrollFreeze) { self.scrollView.freeze(false); } }
[ "function", "(", ")", "{", "this", ".", "el", "=", "this", ".", "listEl", "=", "this", ".", "scrollEl", "=", "this", ".", "scrollView", "=", "null", ";", "// ensure no scrolls have been left frozen", "if", "(", "this", ".", "isScrollFreeze", ")", "{", "sel...
Be sure to cleanup references.
[ "Be", "sure", "to", "cleanup", "references", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L7984-L7991
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(isInstant) { if (this._lastDragOp) { this._lastDragOp.clean && this._lastDragOp.clean(isInstant); this._lastDragOp.deregister && this._lastDragOp.deregister(); this._lastDragOp = null; } }
javascript
function(isInstant) { if (this._lastDragOp) { this._lastDragOp.clean && this._lastDragOp.clean(isInstant); this._lastDragOp.deregister && this._lastDragOp.deregister(); this._lastDragOp = null; } }
[ "function", "(", "isInstant", ")", "{", "if", "(", "this", ".", "_lastDragOp", ")", "{", "this", ".", "_lastDragOp", ".", "clean", "&&", "this", ".", "_lastDragOp", ".", "clean", "(", "isInstant", ")", ";", "this", ".", "_lastDragOp", ".", "deregister", ...
Clear any active drag effects on the list.
[ "Clear", "any", "active", "drag", "effects", "on", "the", "list", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L8052-L8058
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
compilationGenerator
function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) { var compiled; if (eager) { return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); } return function lazyCompilation() { ...
javascript
function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) { var compiled; if (eager) { return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); } return function lazyCompilation() { ...
[ "function", "compilationGenerator", "(", "eager", ",", "$compileNodes", ",", "transcludeFn", ",", "maxPriority", ",", "ignoreDirective", ",", "previousCompileContext", ")", "{", "var", "compiled", ";", "if", "(", "eager", ")", "{", "return", "compile", "(", "$co...
A function generator that is used to support both eager and lazy compilation linking function. @param eager @param $compileNodes @param transcludeFn @param maxPriority @param ignoreDirective @param previousCompileContext @returns {Function}
[ "A", "function", "generator", "that", "is", "used", "to", "support", "both", "eager", "and", "lazy", "compilation", "linking", "function", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L21912-L21928
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
roundNumber
function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) { var digits = parsedNumber.d; var fractionLen = digits.length - parsedNumber.i; // determine fractionSize if it is not specified; `+fractionSize` converts it to a number fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(mi...
javascript
function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) { var digits = parsedNumber.d; var fractionLen = digits.length - parsedNumber.i; // determine fractionSize if it is not specified; `+fractionSize` converts it to a number fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(mi...
[ "function", "roundNumber", "(", "parsedNumber", ",", "fractionSize", ",", "minFrac", ",", "maxFrac", ")", "{", "var", "digits", "=", "parsedNumber", ".", "d", ";", "var", "fractionLen", "=", "digits", ".", "length", "-", "parsedNumber", ".", "i", ";", "// ...
Round the parsed number to the specified number of decimal places This function changed the parsedNumber in-place
[ "Round", "the", "parsed", "number", "to", "the", "specified", "number", "of", "decimal", "places", "This", "function", "changed", "the", "parsedNumber", "in", "-", "place" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L33195-L33250
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(scope, $element, attrs, ctrl, $transclude) { var previousElement, previousScope; scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) { if (previousElement) { $animate.leave(previousElement); } if (previousScope) { previousScope.$de...
javascript
function(scope, $element, attrs, ctrl, $transclude) { var previousElement, previousScope; scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) { if (previousElement) { $animate.leave(previousElement); } if (previousScope) { previousScope.$de...
[ "function", "(", "scope", ",", "$element", ",", "attrs", ",", "ctrl", ",", "$transclude", ")", "{", "var", "previousElement", ",", "previousScope", ";", "scope", ".", "$watchCollection", "(", "attrs", ".", "ngAnimateSwap", "||", "attrs", "[", "'for'", "]", ...
we use 600 here to ensure that the directive is caught before others
[ "we", "use", "600", "here", "to", "ensure", "that", "the", "directive", "is", "caught", "before", "others" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L47433-L47451
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
run
function run() { var template; $ionicTemplateCache._runCount++; hasRun = true; // ignore if race condition already zeroed out array if (toCache.length === 0) return; var i = 0; while (i < 4 && (template = toCache.pop())) { // note that inline templates are ignored by this request ...
javascript
function run() { var template; $ionicTemplateCache._runCount++; hasRun = true; // ignore if race condition already zeroed out array if (toCache.length === 0) return; var i = 0; while (i < 4 && (template = toCache.pop())) { // note that inline templates are ignored by this request ...
[ "function", "run", "(", ")", "{", "var", "template", ";", "$ionicTemplateCache", ".", "_runCount", "++", ";", "hasRun", "=", "true", ";", "// ignore if race condition already zeroed out array", "if", "(", "toCache", ".", "length", "===", "0", ")", "return", ";",...
run through methods - internal method
[ "run", "through", "methods", "-", "internal", "method" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L57615-L57633
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
checkInfiniteBounds
function checkInfiniteBounds() { if (self.isLoading) return; var maxScroll = {}; if (self.jsScrolling) { maxScroll = self.getJSMaxScroll(); var scrollValues = self.scrollView.getValues(); if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) || (maxScroll.top !== -1 &...
javascript
function checkInfiniteBounds() { if (self.isLoading) return; var maxScroll = {}; if (self.jsScrolling) { maxScroll = self.getJSMaxScroll(); var scrollValues = self.scrollView.getValues(); if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) || (maxScroll.top !== -1 &...
[ "function", "checkInfiniteBounds", "(", ")", "{", "if", "(", "self", ".", "isLoading", ")", "return", ";", "var", "maxScroll", "=", "{", "}", ";", "if", "(", "self", ".", "jsScrolling", ")", "{", "maxScroll", "=", "self", ".", "getJSMaxScroll", "(", ")...
check if we've scrolled far enough to trigger an infinite scroll
[ "check", "if", "we", "ve", "scrolled", "far", "enough", "to", "trigger", "an", "infinite", "scroll" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L58934-L58957
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
calculateMaxValue
function calculateMaxValue(maximum) { var distance = ($attrs.distance || '2.5%').trim(); var isPercent = distance.indexOf('%') !== -1; return isPercent ? maximum * (1 - parseFloat(distance) / 100) : maximum - parseFloat(distance); }
javascript
function calculateMaxValue(maximum) { var distance = ($attrs.distance || '2.5%').trim(); var isPercent = distance.indexOf('%') !== -1; return isPercent ? maximum * (1 - parseFloat(distance) / 100) : maximum - parseFloat(distance); }
[ "function", "calculateMaxValue", "(", "maximum", ")", "{", "var", "distance", "=", "(", "$attrs", ".", "distance", "||", "'2.5%'", ")", ".", "trim", "(", ")", ";", "var", "isPercent", "=", "distance", ".", "indexOf", "(", "'%'", ")", "!==", "-", "1", ...
determine pixel refresh distance based on % or value
[ "determine", "pixel", "refresh", "distance", "based", "on", "%", "or", "value" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L58994-L59000
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(newWidth, newHeight) { var requiresRefresh = self.dataLength && newWidth && newHeight && (newWidth !== self.width || newHeight !== self.height); self.width = newWidth; self.height = newHeight; return !!requiresRefresh; }
javascript
function(newWidth, newHeight) { var requiresRefresh = self.dataLength && newWidth && newHeight && (newWidth !== self.width || newHeight !== self.height); self.width = newWidth; self.height = newHeight; return !!requiresRefresh; }
[ "function", "(", "newWidth", ",", "newHeight", ")", "{", "var", "requiresRefresh", "=", "self", ".", "dataLength", "&&", "newWidth", "&&", "newHeight", "&&", "(", "newWidth", "!==", "self", ".", "width", "||", "newHeight", "!==", "self", ".", "height", ")"...
A resize triggers a refresh only if we have data, the scrollView has size, and the size has changed.
[ "A", "resize", "triggers", "a", "refresh", "only", "if", "we", "have", "data", "the", "scrollView", "has", "size", "and", "the", "size", "has", "changed", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L62226-L62234
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(newData) { var requiresRefresh = newData.length > 0 || newData.length < self.dataLength; self.dataLength = newData.length; return !!requiresRefresh; }
javascript
function(newData) { var requiresRefresh = newData.length > 0 || newData.length < self.dataLength; self.dataLength = newData.length; return !!requiresRefresh; }
[ "function", "(", "newData", ")", "{", "var", "requiresRefresh", "=", "newData", ".", "length", ">", "0", "||", "newData", ".", "length", "<", "self", ".", "dataLength", ";", "self", ".", "dataLength", "=", "newData", ".", "length", ";", "return", "!", ...
A change in data only triggers a refresh if the data has length, or if the data's length is less than before.
[ "A", "change", "in", "data", "only", "triggers", "a", "refresh", "if", "the", "data", "has", "length", "or", "if", "the", "data", "s", "length", "is", "less", "than", "before", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/ionic1/www/lib/ionic/js/ionic.bundle.js#L62237-L62243
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
toggleElements
function toggleElements() { // convert arguments to array var args = Array.prototype.slice.call(arguments); args.forEach(function(buttonId) { var buttonEl = document.getElementById(buttonId); if (buttonEl) { var curDisplayStyle = buttonEl.style.display; ...
javascript
function toggleElements() { // convert arguments to array var args = Array.prototype.slice.call(arguments); args.forEach(function(buttonId) { var buttonEl = document.getElementById(buttonId); if (buttonEl) { var curDisplayStyle = buttonEl.style.display; ...
[ "function", "toggleElements", "(", ")", "{", "// convert arguments to array", "var", "args", "=", "Array", ".", "prototype", ".", "slice", ".", "call", "(", "arguments", ")", ";", "args", ".", "forEach", "(", "function", "(", "buttonId", ")", "{", "var", "...
Helper function that toggles visibility of DOM elements with provided ids @param {String} variable number of elements' ids which visibility needs to be toggled
[ "Helper", "function", "that", "toggles", "visibility", "of", "DOM", "elements", "with", "provided", "ids" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L50-L60
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
startCameraPreview
function startCameraPreview(takeCallback, errorCallback, selectCallback, retakeCallback) { // try to select appropriate device for capture // rear camera is preferred option var expectedPanel = Windows.Devices.Enumeration.Panel.back; Windows.Devices.Enumeration.DeviceInformation.findAllA...
javascript
function startCameraPreview(takeCallback, errorCallback, selectCallback, retakeCallback) { // try to select appropriate device for capture // rear camera is preferred option var expectedPanel = Windows.Devices.Enumeration.Panel.back; Windows.Devices.Enumeration.DeviceInformation.findAllA...
[ "function", "startCameraPreview", "(", "takeCallback", ",", "errorCallback", ",", "selectCallback", ",", "retakeCallback", ")", "{", "// try to select appropriate device for capture", "// rear camera is preferred option", "var", "expectedPanel", "=", "Windows", ".", "Devices", ...
Starts camera preview and binds provided callbacks to controls @param {function} takeCallback Callback for Take button @param {function} errorCallback Callback for Cancel button + default error callback @param {function} selectCallback Callback for Select button @param {function} retakeCallback Callback for Reta...
[ "Starts", "camera", "preview", "and", "binds", "provided", "callbacks", "to", "controls" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L102-L144
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
destroyCameraPreview
function destroyCameraPreview() { capturePreview.pause(); capturePreview.src = null; if (previewContainer) { document.body.removeChild(previewContainer); } if (capture) { capture.stopRecordAsync(); capture = null; } }
javascript
function destroyCameraPreview() { capturePreview.pause(); capturePreview.src = null; if (previewContainer) { document.body.removeChild(previewContainer); } if (capture) { capture.stopRecordAsync(); capture = null; } }
[ "function", "destroyCameraPreview", "(", ")", "{", "capturePreview", ".", "pause", "(", ")", ";", "capturePreview", ".", "src", "=", "null", ";", "if", "(", "previewContainer", ")", "{", "document", ".", "body", ".", "removeChild", "(", "previewContainer", "...
Destroys camera preview, removes all elements created
[ "Destroys", "camera", "preview", "removes", "all", "elements", "created" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L149-L159
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
function (successCallback, errorCallback) { try { createCameraUI(); startCameraPreview(function () { // This callback called twice: whem video capture started and when it ended // so we need to check capture status i...
javascript
function (successCallback, errorCallback) { try { createCameraUI(); startCameraPreview(function () { // This callback called twice: whem video capture started and when it ended // so we need to check capture status i...
[ "function", "(", "successCallback", ",", "errorCallback", ")", "{", "try", "{", "createCameraUI", "(", ")", ";", "startCameraPreview", "(", "function", "(", ")", "{", "// This callback called twice: whem video capture started and when it ended", "// so we need to check captur...
Initiate video capture using MediaCapture class @param {function} successCallback Called, when user clicked on preview, with captured file object @param {function} errorCallback Called on any error
[ "Initiate", "video", "capture", "using", "MediaCapture", "class" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L167-L205
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
function (successCallback, errorCallback) { try { createCameraUI(); startCameraPreview( // Callback for Take button - captures intermediate image file. function () { var encodingProperties = Windows.Media.MediaPr...
javascript
function (successCallback, errorCallback) { try { createCameraUI(); startCameraPreview( // Callback for Take button - captures intermediate image file. function () { var encodingProperties = Windows.Media.MediaPr...
[ "function", "(", "successCallback", ",", "errorCallback", ")", "{", "try", "{", "createCameraUI", "(", ")", ";", "startCameraPreview", "(", "// Callback for Take button - captures intermediate image file.", "function", "(", ")", "{", "var", "encodingProperties", "=", "W...
Initiate image capture using MediaCapture class @param {function} successCallback Called, when user clicked on preview, with captured file object @param {function} errorCallback Called on any error
[ "Initiate", "image", "capture", "using", "MediaCapture", "class" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L212-L265
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
function () { var encodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createJpeg(), overwriteCollisionOption = Windows.Storage.CreationCollisionOption.replaceExisting, tempFolder = Windows.Storage.ApplicationData.curr...
javascript
function () { var encodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createJpeg(), overwriteCollisionOption = Windows.Storage.CreationCollisionOption.replaceExisting, tempFolder = Windows.Storage.ApplicationData.curr...
[ "function", "(", ")", "{", "var", "encodingProperties", "=", "Windows", ".", "Media", ".", "MediaProperties", ".", "ImageEncodingProperties", ".", "createJpeg", "(", ")", ",", "overwriteCollisionOption", "=", "Windows", ".", "Storage", ".", "CreationCollisionOption"...
Callback for Take button - captures intermediate image file.
[ "Callback", "for", "Take", "button", "-", "captures", "intermediate", "image", "file", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L217-L237
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js
function () { var generateUniqueCollisionOption = Windows.Storage.CreationCollisionOption.generateUniqueName, localFolder = Windows.Storage.ApplicationData.current.localFolder; capturedPictureFile.copyAsync(localFolder, capturedPictureFile.nam...
javascript
function () { var generateUniqueCollisionOption = Windows.Storage.CreationCollisionOption.generateUniqueName, localFolder = Windows.Storage.ApplicationData.current.localFolder; capturedPictureFile.copyAsync(localFolder, capturedPictureFile.nam...
[ "function", "(", ")", "{", "var", "generateUniqueCollisionOption", "=", "Windows", ".", "Storage", ".", "CreationCollisionOption", ".", "generateUniqueName", ",", "localFolder", "=", "Windows", ".", "Storage", ".", "ApplicationData", ".", "current", ".", "localFolde...
Callback for Select button - copies intermediate file into persistent application's storage
[ "Callback", "for", "Select", "button", "-", "copies", "intermediate", "file", "into", "persistent", "application", "s", "storage" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-media-capture/src/windows/CaptureProxy.js#L244-L255
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/beforePrepare.js
run
function run(context) { const preferences = configPreferences.read(context); const platforms = context.opts.cordova.platforms; platforms.forEach(platform => { if (platform === IOS) { iosPlist.addBranchSettings(preferences); iosCapabilities.enableAssociatedDomains(preferences); ...
javascript
function run(context) { const preferences = configPreferences.read(context); const platforms = context.opts.cordova.platforms; platforms.forEach(platform => { if (platform === IOS) { iosPlist.addBranchSettings(preferences); iosCapabilities.enableAssociatedDomains(preferences); ...
[ "function", "run", "(", "context", ")", "{", "const", "preferences", "=", "configPreferences", ".", "read", "(", "context", ")", ";", "const", "platforms", "=", "context", ".", "opts", ".", "cordova", ".", "platforms", ";", "platforms", ".", "forEach", "("...
builds before platform config
[ "builds", "before", "platform", "config" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/hooks/beforePrepare.js#L14-L25
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js
writePreferences
function writePreferences(context, preferences) { // read manifest const manifest = getManifest(context); // update manifest manifest.file = updateBranchMetaData(manifest.file, preferences); manifest.file = updateBranchReferrerTracking(manifest.file); manifest.file = updateLaunchOptionToSingleT...
javascript
function writePreferences(context, preferences) { // read manifest const manifest = getManifest(context); // update manifest manifest.file = updateBranchMetaData(manifest.file, preferences); manifest.file = updateBranchReferrerTracking(manifest.file); manifest.file = updateLaunchOptionToSingleT...
[ "function", "writePreferences", "(", "context", ",", "preferences", ")", "{", "// read manifest", "const", "manifest", "=", "getManifest", "(", "context", ")", ";", "// update manifest", "manifest", ".", "file", "=", "updateBranchMetaData", "(", "manifest", ".", "...
injects config.xml preferences into AndroidManifest.xml file.
[ "injects", "config", ".", "xml", "preferences", "into", "AndroidManifest", ".", "xml", "file", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js#L13-L38
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js
getManifest
function getManifest(context) { let pathToManifest; let manifest; try { // cordova platform add android@6.0.0 pathToManifest = path.join( context.opts.projectRoot, "platforms", "android", "AndroidManifest.xml" ); manifest = xmlHelper.readXmlAsJson(pat...
javascript
function getManifest(context) { let pathToManifest; let manifest; try { // cordova platform add android@6.0.0 pathToManifest = path.join( context.opts.projectRoot, "platforms", "android", "AndroidManifest.xml" ); manifest = xmlHelper.readXmlAsJson(pat...
[ "function", "getManifest", "(", "context", ")", "{", "let", "pathToManifest", ";", "let", "manifest", ";", "try", "{", "// cordova platform add android@6.0.0", "pathToManifest", "=", "path", ".", "join", "(", "context", ".", "opts", ".", "projectRoot", ",", "\"p...
get AndroidManifest.xml information
[ "get", "AndroidManifest", ".", "xml", "information" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js#L41-L83
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-file/www/FileWriter.js
function(file) { this.fileName = ""; this.length = 0; if (file) { this.localURL = file.localURL || file; this.length = file.size || 0; } // default is to write at the beginning of the file this.position = 0; this.readyState = 0; // EMPTY this.result = null; // Erro...
javascript
function(file) { this.fileName = ""; this.length = 0; if (file) { this.localURL = file.localURL || file; this.length = file.size || 0; } // default is to write at the beginning of the file this.position = 0; this.readyState = 0; // EMPTY this.result = null; // Erro...
[ "function", "(", "file", ")", "{", "this", ".", "fileName", "=", "\"\"", ";", "this", ".", "length", "=", "0", ";", "if", "(", "file", ")", "{", "this", ".", "localURL", "=", "file", ".", "localURL", "||", "file", ";", "this", ".", "length", "=",...
This class writes to the mobile device file system. For Android: The root directory is the root of the file system. To write to the SD card, the file name is "sdcard/my_file.txt" @constructor @param file {File} File object containing file properties @param append if true write to the end of the file, otherwise overwr...
[ "This", "class", "writes", "to", "the", "mobile", "device", "file", "system", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-file/www/FileWriter.js#L37-L61
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js
makeCallbackButton
function makeCallbackButton (labelIndex) { return function () { if (modalWindow) { modalWindow.removeEventListener('unload', onUnload, false); modalWindow.close(); } // checking if prompt var promptInput = modalDocument.getElementById...
javascript
function makeCallbackButton (labelIndex) { return function () { if (modalWindow) { modalWindow.removeEventListener('unload', onUnload, false); modalWindow.close(); } // checking if prompt var promptInput = modalDocument.getElementById...
[ "function", "makeCallbackButton", "(", "labelIndex", ")", "{", "return", "function", "(", ")", "{", "if", "(", "modalWindow", ")", "{", "modalWindow", ".", "removeEventListener", "(", "'unload'", ",", "onUnload", ",", "false", ")", ";", "modalWindow", ".", "...
call callback and destroy modal
[ "call", "callback", "and", "destroy", "modal" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js#L93-L111
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js
enableAssociatedDomains
function enableAssociatedDomains(preferences) { const entitlementsFile = path.join( preferences.projectRoot, "platforms", "ios", preferences.projectName, "Resources", `${preferences.projectName}.entitlements` ); activateAssociativeDomains( preferences.iosProjectMod...
javascript
function enableAssociatedDomains(preferences) { const entitlementsFile = path.join( preferences.projectRoot, "platforms", "ios", preferences.projectName, "Resources", `${preferences.projectName}.entitlements` ); activateAssociativeDomains( preferences.iosProjectMod...
[ "function", "enableAssociatedDomains", "(", "preferences", ")", "{", "const", "entitlementsFile", "=", "path", ".", "join", "(", "preferences", ".", "projectRoot", ",", "\"platforms\"", ",", "\"ios\"", ",", "preferences", ".", "projectName", ",", "\"Resources\"", ...
updates the xcode preferences to allow associated domains
[ "updates", "the", "xcode", "preferences", "to", "allow", "associated", "domains" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js#L16-L32
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js
activateAssociativeDomains
function activateAssociativeDomains(xcodeProject, entitlementsFile) { const configurations = removeComments( xcodeProject.pbxXCBuildConfigurationSection() ); let config; let buildSettings; for (config in configurations) { buildSettings = configurations[config].buildSettings; build...
javascript
function activateAssociativeDomains(xcodeProject, entitlementsFile) { const configurations = removeComments( xcodeProject.pbxXCBuildConfigurationSection() ); let config; let buildSettings; for (config in configurations) { buildSettings = configurations[config].buildSettings; build...
[ "function", "activateAssociativeDomains", "(", "xcodeProject", ",", "entitlementsFile", ")", "{", "const", "configurations", "=", "removeComments", "(", "xcodeProject", ".", "pbxXCBuildConfigurationSection", "(", ")", ")", ";", "let", "config", ";", "let", "buildSetti...
adds entitlement files to the xcode project
[ "adds", "entitlement", "files", "to", "the", "xcode", "project" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js#L35-L57
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js
removeComments
function removeComments(obj) { const keys = Object.keys(obj); const newObj = {}; for (let i = 0, len = keys.length; i < len; i++) { if (!COMMENT_KEY.test(keys[i])) { newObj[keys[i]] = obj[keys[i]]; } } return newObj; }
javascript
function removeComments(obj) { const keys = Object.keys(obj); const newObj = {}; for (let i = 0, len = keys.length; i < len; i++) { if (!COMMENT_KEY.test(keys[i])) { newObj[keys[i]] = obj[keys[i]]; } } return newObj; }
[ "function", "removeComments", "(", "obj", ")", "{", "const", "keys", "=", "Object", ".", "keys", "(", "obj", ")", ";", "const", "newObj", "=", "{", "}", ";", "for", "(", "let", "i", "=", "0", ",", "len", "=", "keys", ".", "length", ";", "i", "<...
removes comments from .pbx file
[ "removes", "comments", "from", ".", "pbx", "file" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js#L89-L100
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js
install
function install(context) { // set properties const q = context.requireCordovaModule("q"); var async = new q.defer(); // eslint-disable-line const installFlagLocation = path.join( context.opts.projectRoot, "plugins", context.opts.plugin.id, INSTALLFLAGNAME ); const depend...
javascript
function install(context) { // set properties const q = context.requireCordovaModule("q"); var async = new q.defer(); // eslint-disable-line const installFlagLocation = path.join( context.opts.projectRoot, "plugins", context.opts.plugin.id, INSTALLFLAGNAME ); const depend...
[ "function", "install", "(", "context", ")", "{", "// set properties", "const", "q", "=", "context", ".", "requireCordovaModule", "(", "\"q\"", ")", ";", "var", "async", "=", "new", "q", ".", "defer", "(", ")", ";", "// eslint-disable-line", "const", "install...
install the node dependencies for Branch SDK
[ "install", "the", "node", "dependencies", "for", "Branch", "SDK" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js#L16-L49
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js
installNodeModules
function installNodeModules(modules, callback) { // base case if (modules.length <= 0) { return callback(); } // install one at a time const module = modules.pop(); console.log(`BRANCH SDK: Installing node dependency ${module}`); const install = `npm install --prefix ./plugins/${SDK}...
javascript
function installNodeModules(modules, callback) { // base case if (modules.length <= 0) { return callback(); } // install one at a time const module = modules.pop(); console.log(`BRANCH SDK: Installing node dependency ${module}`); const install = `npm install --prefix ./plugins/${SDK}...
[ "function", "installNodeModules", "(", "modules", ",", "callback", ")", "{", "// base case", "if", "(", "modules", ".", "length", "<=", "0", ")", "{", "return", "callback", "(", ")", ";", "}", "// install one at a time", "const", "module", "=", "modules", "....
installs the node modules via npm install one at a time
[ "installs", "the", "node", "modules", "via", "npm", "install", "one", "at", "a", "time" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js#L52-L74
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js
getNodeModulesToInstall
function getNodeModulesToInstall(dependencies) { const modules = []; for (const module in dependencies) { if (dependencies.hasOwnProperty(module)) { try { require(module); } catch (err) { modules.push(module); } } } return modules; }
javascript
function getNodeModulesToInstall(dependencies) { const modules = []; for (const module in dependencies) { if (dependencies.hasOwnProperty(module)) { try { require(module); } catch (err) { modules.push(module); } } } return modules; }
[ "function", "getNodeModulesToInstall", "(", "dependencies", ")", "{", "const", "modules", "=", "[", "]", ";", "for", "(", "const", "module", "in", "dependencies", ")", "{", "if", "(", "dependencies", ".", "hasOwnProperty", "(", "module", ")", ")", "{", "tr...
checks to see which node modules need to be installed from package.json.dependencies
[ "checks", "to", "see", "which", "node", "modules", "need", "to", "be", "installed", "from", "package", ".", "json", ".", "dependencies" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/npm/downloadNpmDependencies.js#L77-L89
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-camera/src/blackberry10/index.js
showCameraDialog
function showCameraDialog (done, cancel, fail) { var wv = qnx.webplatform.createWebView(function () { wv.url = 'local:///chrome/camera.html'; wv.allowQnxObject = true; wv.allowRpc = true; wv.zOrder = 1; wv.setGeometry(0, 0, screen.width, screen.height); wv.backgroundC...
javascript
function showCameraDialog (done, cancel, fail) { var wv = qnx.webplatform.createWebView(function () { wv.url = 'local:///chrome/camera.html'; wv.allowQnxObject = true; wv.allowRpc = true; wv.zOrder = 1; wv.setGeometry(0, 0, screen.width, screen.height); wv.backgroundC...
[ "function", "showCameraDialog", "(", "done", ",", "cancel", ",", "fail", ")", "{", "var", "wv", "=", "qnx", ".", "webplatform", ".", "createWebView", "(", "function", "(", ")", "{", "wv", ".", "url", "=", "'local:///chrome/camera.html'", ";", "wv", ".", ...
open a webview with getUserMedia camera card implementation when camera card not available
[ "open", "a", "webview", "with", "getUserMedia", "camera", "card", "implementation", "when", "camera", "card", "not", "available" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-camera/src/blackberry10/index.js#L51-L86
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-camera/src/blackberry10/index.js
saveImage
function saveImage(data, success, fail) { var name = savePath + imgName(); require('lib/webview').setSandbox(false); window.webkitRequestFileSystem(window.PERSISTENT, 0, function (fs) { fs.root.getFile(name, { create: true }, function (entry) { entry.createWriter(function (writer) { ...
javascript
function saveImage(data, success, fail) { var name = savePath + imgName(); require('lib/webview').setSandbox(false); window.webkitRequestFileSystem(window.PERSISTENT, 0, function (fs) { fs.root.getFile(name, { create: true }, function (entry) { entry.createWriter(function (writer) { ...
[ "function", "saveImage", "(", "data", ",", "success", ",", "fail", ")", "{", "var", "name", "=", "savePath", "+", "imgName", "(", ")", ";", "require", "(", "'lib/webview'", ")", ".", "setSandbox", "(", "false", ")", ";", "window", ".", "webkitRequestFile...
save dataURI to file system and call success with path
[ "save", "dataURI", "to", "file", "system", "and", "call", "success", "with", "path" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-camera/src/blackberry10/index.js#L110-L124
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateAssociatedDomains.js
addAssociatedDomains
function addAssociatedDomains(preferences) { const files = getEntitlementFiles(preferences); for (let i = 0; i < files.length; i++) { const file = files[i]; let entitlements = getEntitlements(file); entitlements = updateEntitlements(entitlements, preferences); setEntitlements(file, ent...
javascript
function addAssociatedDomains(preferences) { const files = getEntitlementFiles(preferences); for (let i = 0; i < files.length; i++) { const file = files[i]; let entitlements = getEntitlements(file); entitlements = updateEntitlements(entitlements, preferences); setEntitlements(file, ent...
[ "function", "addAssociatedDomains", "(", "preferences", ")", "{", "const", "files", "=", "getEntitlementFiles", "(", "preferences", ")", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "files", ".", "length", ";", "i", "++", ")", "{", "const", "f...
updates the associated domains from the link-domain field of the app's config.xml
[ "updates", "the", "associated", "domains", "from", "the", "link", "-", "domain", "field", "of", "the", "app", "s", "config", ".", "xml" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateAssociatedDomains.js#L17-L27
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateAssociatedDomains.js
getEntitlementFiles
function getEntitlementFiles(preferences) { const files = []; const entitlements = path.join( preferences.projectRoot, "platforms", "ios", preferences.projectName, "Resources", `${preferences.projectName}.entitlements` ); files.push( path.join( preferenc...
javascript
function getEntitlementFiles(preferences) { const files = []; const entitlements = path.join( preferences.projectRoot, "platforms", "ios", preferences.projectName, "Resources", `${preferences.projectName}.entitlements` ); files.push( path.join( preferenc...
[ "function", "getEntitlementFiles", "(", "preferences", ")", "{", "const", "files", "=", "[", "]", ";", "const", "entitlements", "=", "path", ".", "join", "(", "preferences", ".", "projectRoot", ",", "\"platforms\"", ",", "\"ios\"", ",", "preferences", ".", "...
get the xcode .entitlements and provisioning profile .plist
[ "get", "the", "xcode", ".", "entitlements", "and", "provisioning", "profile", ".", "plist" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateAssociatedDomains.js#L30-L64
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateAssociatedDomains.js
updateAssociatedDomains
function updateAssociatedDomains(preferences) { const domainList = []; const prefix = "applinks:"; const linkDomains = preferences.linkDomain; for (let i = 0; i < linkDomains.length; i++) { const linkDomain = linkDomains[i]; // add link domain to associated domain domainList.push(pre...
javascript
function updateAssociatedDomains(preferences) { const domainList = []; const prefix = "applinks:"; const linkDomains = preferences.linkDomain; for (let i = 0; i < linkDomains.length; i++) { const linkDomain = linkDomains[i]; // add link domain to associated domain domainList.push(pre...
[ "function", "updateAssociatedDomains", "(", "preferences", ")", "{", "const", "domainList", "=", "[", "]", ";", "const", "prefix", "=", "\"applinks:\"", ";", "const", "linkDomains", "=", "preferences", ".", "linkDomain", ";", "for", "(", "let", "i", "=", "0"...
determine which Branch Link Domains to append
[ "determine", "which", "Branch", "Link", "Domains", "to", "append" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/ios/updateAssociatedDomains.js#L138-L164
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-camera/src/windows/CameraProxy.js
function () { window.removeEventListener("focus", savePhotoOnFocus); // call only when the app is in focus again savePhoto(cameraPicture, { destinationType: destinationType, targetHeight: targetHeight, targetWidth: targetWidth, encodingType: encodi...
javascript
function () { window.removeEventListener("focus", savePhotoOnFocus); // call only when the app is in focus again savePhoto(cameraPicture, { destinationType: destinationType, targetHeight: targetHeight, targetWidth: targetWidth, encodingType: encodi...
[ "function", "(", ")", "{", "window", ".", "removeEventListener", "(", "\"focus\"", ",", "savePhotoOnFocus", ")", ";", "// call only when the app is in focus again", "savePhoto", "(", "cameraPicture", ",", "{", "destinationType", ":", "destinationType", ",", "targetHeigh...
define focus handler for windows phone 10.0
[ "define", "focus", "handler", "for", "windows", "phone", "10", ".", "0" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-camera/src/windows/CameraProxy.js#L754-L764
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/cordova/lib/check_reqs.js
function (id, name, version, installed) { this.id = id; this.name = name; this.installed = installed || false; this.metadata = { version: version }; }
javascript
function (id, name, version, installed) { this.id = id; this.name = name; this.installed = installed || false; this.metadata = { version: version }; }
[ "function", "(", "id", ",", "name", ",", "version", ",", "installed", ")", "{", "this", ".", "id", "=", "id", ";", "this", ".", "name", "=", "name", ";", "this", ".", "installed", "=", "installed", "||", "false", ";", "this", ".", "metadata", "=", ...
Object thar represents one of requirements for current platform. @param {String} id The unique identifier for this requirements. @param {String} name The name of requirements. Human-readable field. @param {String} version The version of requirement installed. In some cases could be an array of strings ...
[ "Object", "thar", "represents", "one", "of", "requirements", "for", "current", "platform", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/cordova/lib/check_reqs.js#L387-L394
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
function (type, data, bNoDetach) { var evt = createEvent(type, data); if (typeof documentEventHandlers[type] !== 'undefined') { if (bNoDetach) { documentEventHandlers[type].fire(evt); } else { setTimeout(function () { // Fire de...
javascript
function (type, data, bNoDetach) { var evt = createEvent(type, data); if (typeof documentEventHandlers[type] !== 'undefined') { if (bNoDetach) { documentEventHandlers[type].fire(evt); } else { setTimeout(function () { // Fire de...
[ "function", "(", "type", ",", "data", ",", "bNoDetach", ")", "{", "var", "evt", "=", "createEvent", "(", "type", ",", "data", ")", ";", "if", "(", "typeof", "documentEventHandlers", "[", "type", "]", "!==", "'undefined'", ")", "{", "if", "(", "bNoDetac...
Method to fire event from native code bNoDetach is required for events which cause an exception which needs to be caught in native code
[ "Method", "to", "fire", "event", "from", "native", "code", "bNoDetach", "is", "required", "for", "events", "which", "cause", "an", "exception", "which", "needs", "to", "be", "caught", "in", "native", "code" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L218-L235
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
function (callbackId, args) { cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); }
javascript
function (callbackId, args) { cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); }
[ "function", "(", "callbackId", ",", "args", ")", "{", "cordova", ".", "callbackFromNative", "(", "callbackId", ",", "true", ",", "args", ".", "status", ",", "[", "args", ".", "message", "]", ",", "args", ".", "keepCallback", ")", ";", "}" ]
Called by native code when returning successful result from an action.
[ "Called", "by", "native", "code", "when", "returning", "successful", "result", "from", "an", "action", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L270-L272
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
function (callbackId, args) { // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. // Derive success from status. cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); }
javascript
function (callbackId, args) { // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. // Derive success from status. cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); }
[ "function", "(", "callbackId", ",", "args", ")", "{", "// TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.", "// Derive success from status.", "cordova", ".", "callbackFromNative", "(", "callbackId", ",", "false", ",", "args", ".", "status", ...
Called by native code when returning error result from an action.
[ "Called", "by", "native", "code", "when", "returning", "error", "result", "from", "an", "action", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L277-L281
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
recursiveMerge
function recursiveMerge (target, src) { for (var prop in src) { if (src.hasOwnProperty(prop)) { if (target.prototype && target.prototype.constructor === target) { // If the target object is a constructor override off prototype. clobber(target.prototype, prop, src[...
javascript
function recursiveMerge (target, src) { for (var prop in src) { if (src.hasOwnProperty(prop)) { if (target.prototype && target.prototype.constructor === target) { // If the target object is a constructor override off prototype. clobber(target.prototype, prop, src[...
[ "function", "recursiveMerge", "(", "target", ",", "src", ")", "{", "for", "(", "var", "prop", "in", "src", ")", "{", "if", "(", "src", ".", "hasOwnProperty", "(", "prop", ")", ")", "{", "if", "(", "target", ".", "prototype", "&&", "target", ".", "p...
Merge properties from one object onto another recursively. Properties from the src object will overwrite existing target property. @param target Object to merge properties into. @param src Object to merge properties from.
[ "Merge", "properties", "from", "one", "object", "onto", "another", "recursively", ".", "Properties", "from", "the", "src", "object", "will", "overwrite", "existing", "target", "property", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L590-L605
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
function (type, sticky) { this.type = type; // Map of guid -> function. this.handlers = {}; // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. this.state = sticky ? 1 : 0; // Used in sticky mode to remember args passed to fire(). this.fireArgs = null; // Used by onHasSubscribersC...
javascript
function (type, sticky) { this.type = type; // Map of guid -> function. this.handlers = {}; // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. this.state = sticky ? 1 : 0; // Used in sticky mode to remember args passed to fire(). this.fireArgs = null; // Used by onHasSubscribersC...
[ "function", "(", "type", ",", "sticky", ")", "{", "this", ".", "type", "=", "type", ";", "// Map of guid -> function.", "this", ".", "handlers", "=", "{", "}", ";", "// 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.", "this", ".", "state", "=", "sticky", ...
Custom pub-sub "channel" that can have functions subscribed to it This object is used to define and control firing of events for cordova initialization, as well as for custom events thereafter. The order of events during page load and Cordova startup is as follows: onDOMContentLoaded* Internal event that is r...
[ "Custom", "pub", "-", "sub", "channel", "that", "can", "have", "functions", "subscribed", "to", "it", "This", "object", "is", "used", "to", "define", "and", "control", "firing", "of", "events", "for", "cordova", "initialization", "as", "well", "as", "for", ...
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L666-L679
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
function (h, c) { var len = c.length; var i = len; var f = function () { if (!(--i)) h(); }; for (var j = 0; j < len; j++) { if (c[j].state === 0) { throw Error('Can only use join with sticky channels.'); } c[j].subs...
javascript
function (h, c) { var len = c.length; var i = len; var f = function () { if (!(--i)) h(); }; for (var j = 0; j < len; j++) { if (c[j].state === 0) { throw Error('Can only use join with sticky channels.'); } c[j].subs...
[ "function", "(", "h", ",", "c", ")", "{", "var", "len", "=", "c", ".", "length", ";", "var", "i", "=", "len", ";", "var", "f", "=", "function", "(", ")", "{", "if", "(", "!", "(", "--", "i", ")", ")", "h", "(", ")", ";", "}", ";", "for"...
Calls the provided function only after all of the channels specified have been fired. All channels must be sticky channels.
[ "Calls", "the", "provided", "function", "only", "after", "all", "of", "the", "channels", "specified", "have", "been", "fired", ".", "All", "channels", "must", "be", "sticky", "channels", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L685-L698
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/platforms/android/platform_www/cordova.js
handlePluginsObject
function handlePluginsObject (moduleList) { // if moduleList is not defined or empty, we've nothing to do if (!moduleList || !moduleList.length) { return; } // Loop through all the modules and then through their clobbers and merges. for (var i = 0, module; module = moduleList[i]; i++) { // ...
javascript
function handlePluginsObject (moduleList) { // if moduleList is not defined or empty, we've nothing to do if (!moduleList || !moduleList.length) { return; } // Loop through all the modules and then through their clobbers and merges. for (var i = 0, module; module = moduleList[i]; i++) { // ...
[ "function", "handlePluginsObject", "(", "moduleList", ")", "{", "// if moduleList is not defined or empty, we've nothing to do", "if", "(", "!", "moduleList", "||", "!", "moduleList", ".", "length", ")", "{", "return", ";", "}", "// Loop through all the modules and then thr...
Handler for the cordova_plugins.js content. See plugman's plugin_loader.js for the details of this object.
[ "Handler", "for", "the", "cordova_plugins", ".", "js", "content", ".", "See", "plugman", "s", "plugin_loader", ".", "js", "for", "the", "details", "of", "this", "object", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/platforms/android/platform_www/cordova.js#L1962-L1987
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js
createPromptDialog
function createPromptDialog (title, message, buttons, defaultText, callback) { var isPhone = cordova.platformId === 'windows' && WinJS.Utilities.isPhone; var isWindows = !!cordova.platformId.match(/windows/); createCSSElem('notification.css'); var dlgWrap = document.createElement('div'); dlgWrap....
javascript
function createPromptDialog (title, message, buttons, defaultText, callback) { var isPhone = cordova.platformId === 'windows' && WinJS.Utilities.isPhone; var isWindows = !!cordova.platformId.match(/windows/); createCSSElem('notification.css'); var dlgWrap = document.createElement('div'); dlgWrap....
[ "function", "createPromptDialog", "(", "title", ",", "message", ",", "buttons", ",", "defaultText", ",", "callback", ")", "{", "var", "isPhone", "=", "cordova", ".", "platformId", "===", "'windows'", "&&", "WinJS", ".", "Utilities", ".", "isPhone", ";", "var...
Windows does not provide native UI for promp dialog so we use some simple html-based implementation until it is available
[ "Windows", "does", "not", "provide", "native", "UI", "for", "promp", "dialog", "so", "we", "use", "some", "simple", "html", "-", "based", "implementation", "until", "it", "is", "available" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js#L56-L129
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/lib/xmlHelper.js
readXmlAsJson
function readXmlAsJson(file) { let xmlData; let xmlParser; let parsedData; try { xmlData = fs.readFileSync(file); xmlParser = new xml2js.Parser(); xmlParser.parseString(xmlData, (err, data) => { if (!err && data) { parsedData = data; } }); } catch (...
javascript
function readXmlAsJson(file) { let xmlData; let xmlParser; let parsedData; try { xmlData = fs.readFileSync(file); xmlParser = new xml2js.Parser(); xmlParser.parseString(xmlData, (err, data) => { if (!err && data) { parsedData = data; } }); } catch (...
[ "function", "readXmlAsJson", "(", "file", ")", "{", "let", "xmlData", ";", "let", "xmlParser", ";", "let", "parsedData", ";", "try", "{", "xmlData", "=", "fs", ".", "readFileSync", "(", "file", ")", ";", "xmlParser", "=", "new", "xml2js", ".", "Parser", ...
read from xml file
[ "read", "from", "xml", "file" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/lib/xmlHelper.js#L14-L32
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/cordova1/plugins/branch-cordova-sdk/src/scripts/lib/xmlHelper.js
writeJsonAsXml
function writeJsonAsXml(file, content, options) { const xmlBuilder = new xml2js.Builder(options); const changedXmlData = xmlBuilder.buildObject(content); let isSaved = true; try { fs.writeFileSync(file, changedXmlData); } catch (err) { isSaved = false; throw new Error(`BRANCH SDK:...
javascript
function writeJsonAsXml(file, content, options) { const xmlBuilder = new xml2js.Builder(options); const changedXmlData = xmlBuilder.buildObject(content); let isSaved = true; try { fs.writeFileSync(file, changedXmlData); } catch (err) { isSaved = false; throw new Error(`BRANCH SDK:...
[ "function", "writeJsonAsXml", "(", "file", ",", "content", ",", "options", ")", "{", "const", "xmlBuilder", "=", "new", "xml2js", ".", "Builder", "(", "options", ")", ";", "const", "changedXmlData", "=", "xmlBuilder", ".", "buildObject", "(", "content", ")",...
write to xml file
[ "write", "to", "xml", "file" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/cordova1/plugins/branch-cordova-sdk/src/scripts/lib/xmlHelper.js#L35-L48
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-globalization/www/firefoxos/l10n_date.js
relativeParts
function relativeParts (seconds) { seconds = Math.abs(seconds); var descriptors = {}; var units = [ 'years', 86400 * 365, 'months', 86400 * 30, 'weeks', 86400 * 7, 'days', 86400, 'hours', 3600, 'minutes', 60 ]; ...
javascript
function relativeParts (seconds) { seconds = Math.abs(seconds); var descriptors = {}; var units = [ 'years', 86400 * 365, 'months', 86400 * 30, 'weeks', 86400 * 7, 'days', 86400, 'hours', 3600, 'minutes', 60 ]; ...
[ "function", "relativeParts", "(", "seconds", ")", "{", "seconds", "=", "Math", ".", "abs", "(", "seconds", ")", ";", "var", "descriptors", "=", "{", "}", ";", "var", "units", "=", "[", "'years'", ",", "86400", "*", "365", ",", "'months'", ",", "86400...
Returns the parts of a number of seconds
[ "Returns", "the", "parts", "of", "a", "number", "of", "seconds" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-globalization/www/firefoxos/l10n_date.js#L110-L136
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-globalization/www/firefoxos/l10n_date.js
prettyDate
function prettyDate (time, useCompactFormat, maxDiff) { maxDiff = maxDiff || 86400 * 10; // default = 10 days switch (time.constructor) { case String: // timestamp time = parseInt(time); break; case Date: time = time.getTime(); break; ...
javascript
function prettyDate (time, useCompactFormat, maxDiff) { maxDiff = maxDiff || 86400 * 10; // default = 10 days switch (time.constructor) { case String: // timestamp time = parseInt(time); break; case Date: time = time.getTime(); break; ...
[ "function", "prettyDate", "(", "time", ",", "useCompactFormat", ",", "maxDiff", ")", "{", "maxDiff", "=", "maxDiff", "||", "86400", "*", "10", ";", "// default = 10 days", "switch", "(", "time", ".", "constructor", ")", "{", "case", "String", ":", "// timest...
Returns a translated string which respresents the relative time before or after a date. @param {String|Date} time before/after the currentDate. @param {String} useCompactFormat whether to use a compact display format. @param {Number} maxDiff returns a formatted date if the diff is greater.
[ "Returns", "a", "translated", "string", "which", "respresents", "the", "relative", "time", "before", "or", "after", "a", "date", "." ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-globalization/www/firefoxos/l10n_date.js#L145-L180
train
BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
examples/phonegap1/plugins/cordova-plugin-file/www/blackberry10/resolveLocalFileSystemURI.js
resolve
function resolve(success, fail, path, fsType, sandbox, options, size) { options = options || { create: false }; size = size || info.MAX_SIZE; if (size > info.MAX_SIZE) { //bb10 does not respect quota; fail at unreasonably large size fail(FileError.QUOTA_EXCEEDED_ERR); } else if (path.ind...
javascript
function resolve(success, fail, path, fsType, sandbox, options, size) { options = options || { create: false }; size = size || info.MAX_SIZE; if (size > info.MAX_SIZE) { //bb10 does not respect quota; fail at unreasonably large size fail(FileError.QUOTA_EXCEEDED_ERR); } else if (path.ind...
[ "function", "resolve", "(", "success", ",", "fail", ",", "path", ",", "fsType", ",", "sandbox", ",", "options", ",", "size", ")", "{", "options", "=", "options", "||", "{", "create", ":", "false", "}", ";", "size", "=", "size", "||", "info", ".", "...
validate parameters and set sandbox
[ "validate", "parameters", "and", "set", "sandbox" ]
252f591fcc833ac9fe7fb0f535d351e0879a873c
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/252f591fcc833ac9fe7fb0f535d351e0879a873c/examples/phonegap1/plugins/cordova-plugin-file/www/blackberry10/resolveLocalFileSystemURI.js#L111-L129
train