code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function success() {
if (debug) {
$log.info(arguments);
}
} | @ngdoc overview
@name angulartics.google.tagmanager.cordova
Enables analytics support for Google Tag Manager (http://google.com/tagmanager)
for Cordova plugin Tag Manager (http://plugins.cordova.io/#/package/com.jareddickson.cordova.tag-manager) | success | javascript | angulartics/angulartics | src/angulartics-gtm-cordova.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-gtm-cordova.js | MIT |
function failure(err) {
if (debug) {
$log.error(err);
}
} | @ngdoc overview
@name angulartics.google.tagmanager.cordova
Enables analytics support for Google Tag Manager (http://google.com/tagmanager)
for Cordova plugin Tag Manager (http://plugins.cordova.io/#/package/com.jareddickson.cordova.tag-manager) | failure | javascript | angulartics/angulartics | src/angulartics-gtm-cordova.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-gtm-cordova.js | MIT |
errorFunction = function(){
throw "Define _LTracker ";
} | @ngdoc overview
@name angulartics.loggly
Enables analytics support for Loggly | errorFunction | javascript | angulartics/angulartics | src/angulartics-loggly.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-loggly.js | MIT |
_getLTracker = function () {
return window._LTracker || { push: errorFunction};
} | @ngdoc overview
@name angulartics.loggly
Enables analytics support for Loggly | _getLTracker | javascript | angulartics/angulartics | src/angulartics-loggly.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-loggly.js | MIT |
associateLead = function(properties){
if(properties.email !== undefined) {
email = properties.email;
email_sha = sha1(Munchkin.sKey + email);
properties.Email = properties.email;
Munchkin.munchkinFunction('associateLead', properties, email_sha);
}
} | @ngdoc overview
@name angulartics.marketo
Enables analytics support for Marketo (http://www.marketo.com)
Will not be considered loaded until the sKey attribute is set on the Munchkin object, like so:
Munchkin.skey = 'my-secret-key';
for event tracking email is a required attribute | associateLead | javascript | angulartics/angulartics | src/angulartics-marketo.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-marketo.js | MIT |
errorFunction = function(){
throw "Define sp ";
} | @ngdoc overview
@name angulartics.splunk
Enables analytics support for with custom collection backend API
using (sp.js as described in http://blogs.splunk.com/2013/10/17/still-using-3rd-party-web-analytics-providers-build-your-own-using-splunk/) | errorFunction | javascript | angulartics/angulartics | src/angulartics-splunk.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-splunk.js | MIT |
_getSp = function () {
return window.sp || { pageview: errorFunction, track: errorFunction };
} | @ngdoc overview
@name angulartics.splunk
Enables analytics support for with custom collection backend API
using (sp.js as described in http://blogs.splunk.com/2013/10/17/still-using-3rd-party-web-analytics-providers-build-your-own-using-splunk/) | _getSp | javascript | angulartics/angulartics | src/angulartics-splunk.js | https://github.com/angulartics/angulartics/blob/master/src/angulartics-splunk.js | MIT |
getMergedEslintConfig = function(filepath) {
return {
configFile: filepath,
baseConfig: '../.eslintrc.json',
rules: {
// Examples don't run in strict mode; accept that for now.
strict: 'off',
// Generated examples may miss the final EOL; ignore that.
'eol-last': 'off',
// Gen... | /*.js';
var ignoredFiles = '!src/angular.bind.js';
var assets = 'app/assets/* | getMergedEslintConfig | javascript | angular/angular.js | docs/gulpfile.js | https://github.com/angular/angular.js/blob/master/docs/gulpfile.js | MIT |
copyComponent = function(component, pattern, base, sourceFolder, packageFile) {
pattern = pattern || '/**/*';
base = base || '';
sourceFolder = sourceFolder || '../node_modules';
packageFile = packageFile || 'package.json';
var version = require(path.resolve(sourceFolder, component, packageFile)).version;
r... | /*.js';
var ignoredFiles = '!src/angular.bind.js';
var assets = 'app/assets/* | copyComponent | javascript | angular/angular.js | docs/gulpfile.js | https://github.com/angular/angular.js/blob/master/docs/gulpfile.js | MIT |
function extractTitleWords(title) {
var match = /ng([A-Z]\w*)/.exec(title);
if (match) {
title = title + ' ' + match[1].toLowerCase();
}
return title;
} | @dgProcessor generateKeywordsProcessor
@description
This processor extracts all the keywords from each document and creates
a new document that will be rendered as a JavaScript file containing all
this data. | extractTitleWords | javascript | angular/angular.js | docs/config/processors/keywords.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/keywords.js | MIT |
function extractWords(text, words, keywordMap) {
var tokens = text.toLowerCase().split(/[.\s,`'"#]+/mg);
_.forEach(tokens, function(token) {
var match = token.match(KEYWORD_REGEX);
if (match) {
var key = match[1];
if (!keywordMap[key]) {
keywordMap[key] = tru... | @dgProcessor generateKeywordsProcessor
@description
This processor extracts all the keywords from each document and creates
a new document that will be rendered as a JavaScript file containing all
this data. | extractWords | javascript | angular/angular.js | docs/config/processors/keywords.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/keywords.js | MIT |
function processAllVersionsResponse(versions) {
var latestMap = {};
// When the docs are built on a tagged commit, yarn info won't include the latest release,
// so we add it manually based on the local version.json file.
var missesCurrentVersion = !currentVersion.isSnapshot && !versio... | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | processAllVersionsResponse | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function makeOption(version, group, label) {
return {
version: version,
label: label || 'v' + version.raw,
group: group || 'v' + version.major + '.' + version.minor,
docsUrl: createDocsUrl(version)
};
} | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | makeOption | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function createDocsUrl(version) {
var url = 'https://code.angularjs.org/' + version.version + '/docs';
// Versions before 1.0.2 had a different docs folder name
if (version.major === 1 && version.minor === 0 && version.patch < 2) {
url += '-' + version.version;
}
return... | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | createDocsUrl | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function reverse(fn) {
return function(left, right) { return -fn(left, right); };
} | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | reverse | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function sortObject(obj, cmp) {
return Object.keys(obj).map(function(key) { return obj[key]; }).sort(cmp);
} | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | sortObject | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function semverIsStable(version) {
var semverObj = version.version;
return semverObj === null ? false : !semverObj.prerelease.length;
} | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | semverIsStable | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function createSnapshotStableLabel(version) {
var label = version.label.replace(/.$/, 'x') + '-snapshot';
return label;
} | @dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS | createSnapshotStableLabel | javascript | angular/angular.js | docs/config/processors/versions-data.js | https://github.com/angular/angular.js/blob/master/docs/config/processors/versions-data.js | MIT |
function createFolder(folder) {
return qfs.isDirectory(folder).then(function(isDir) {
if (!isDir) return qfs.makeDirectory(folder).then(function() {
console.log('Created directory %j', folder);
});
});
} | Make a folder under current directory.
@param folder {string} name of the folder to be made | createFolder | javascript | angular/angular.js | i18n/src/closureSlurper.js | https://github.com/angular/angular.js/blob/master/i18n/src/closureSlurper.js | MIT |
function convertDatetimeData(dataObj) {
var datetimeFormats = {};
datetimeFormats.MONTH = dataObj.MONTHS;
datetimeFormats.SHORTMONTH = dataObj.SHORTMONTHS;
datetimeFormats.STANDALONEMONTH = dataObj.STANDALONEMONTHS;
datetimeFormats.DAY = dataObj.WEEKDAYS;
datetimeFormats.SHORTDAY = dataObj.SHORTWEEKDAYS;
... | after obtaining data from closure files, use converter to massage the data into the formats
we want | convertDatetimeData | javascript | angular/angular.js | i18n/src/converter.js | https://github.com/angular/angular.js/blob/master/i18n/src/converter.js | MIT |
function ensureDecimalSep(pattern) {
return (pattern.indexOf(DECIMAL_SEP) !== -1)
? pattern : pattern.replace(LAST_ZERO_RE, '$1' + DECIMAL_SEP + '$2');
} | Helper function for parser.
Ensures that `pattern` (e.g #,##0.###) contains a DECIMAL_SEP, which is necessary for further
parsing. If a pattern does not include one, it is added after the last ZERO (which is the last
thing before the `posSuf` - if any). | ensureDecimalSep | javascript | angular/angular.js | i18n/src/parser.js | https://github.com/angular/angular.js/blob/master/i18n/src/parser.js | MIT |
function parsePattern(pattern) {
var p = {
minInt: 1,
minFrac: 0,
maxFrac: 0,
posPre: '',
posSuf: '',
negPre: '',
negSuf: '',
gSize: 0,
lgSize: 0
};
var patternParts = pattern.split(PATTERN_SEP),
... | main function for parser
@param str {string} pattern to be parsed (e.g. #,##0.###). | parsePattern | javascript | angular/angular.js | i18n/src/parser.js | https://github.com/angular/angular.js/blob/master/i18n/src/parser.js | MIT |
getPackage = function() {
// Search up the folder hierarchy for the first package.json
var packageFolder = path.resolve('.');
while (!fs.existsSync(path.join(packageFolder, 'package.json'))) {
var parent = path.dirname(packageFolder);
if (parent === packageFolder) { break; }
packageFolder = parent;
... | Load information about this project from the package.json
@return {Object} The package information | getPackage | javascript | angular/angular.js | lib/versions/version-info.js | https://github.com/angular/angular.js/blob/master/lib/versions/version-info.js | MIT |
getGitRepoInfo = function() {
var GITURL_REGEX = /^https:\/\/github.com\/([^/]+)\/(.+).git$/;
var match = GITURL_REGEX.exec(currentPackage.repository.url);
var git = {
owner: match[1],
repo: match[2]
};
return git;
} | Parse the github URL for useful information
@return {Object} An object containing the github owner and repository name | getGitRepoInfo | javascript | angular/angular.js | lib/versions/version-info.js | https://github.com/angular/angular.js/blob/master/lib/versions/version-info.js | MIT |
getPreviousVersions = function() {
// If we are allowing remote requests then use the remote tags as the local clone might
// not contain all commits when cloned with git clone --depth=...
// Otherwise just use the tags in the local repository
var repo_url = currentPackage.repository.url;
var query = NO_REMO... | Get a collection of all the previous versions sorted by semantic version
@return {Array.<SemVer>} The collection of previous versions | getPreviousVersions | javascript | angular/angular.js | lib/versions/version-info.js | https://github.com/angular/angular.js/blob/master/lib/versions/version-info.js | MIT |
getCdnVersion = function() {
return _(previousVersions)
.filter(function(tag) {
return semver.satisfies(tag, currentPackage.branchVersion);
})
.reverse()
.reduce(function(cdnVersion, version) {
if (!cdnVersion) {
if (NO_REMOTE_REQUESTS) {
// We do not want to make any rem... | Get a collection of all the previous versions sorted by semantic version
@return {Array.<SemVer>} The collection of previous versions | getCdnVersion | javascript | angular/angular.js | lib/versions/version-info.js | https://github.com/angular/angular.js/blob/master/lib/versions/version-info.js | MIT |
getSnapshotVersion = function() {
var version = _(previousVersions)
.filter(function(tag) {
return semver.satisfies(tag, currentPackage.branchVersion);
})
.last();
if (!version) {
// a snapshot version before the first tag on the branch
version = semver(currentPackage.branchPattern.replac... | Get the unstable snapshot version
@return {SemVer} The snapshot version | getSnapshotVersion | javascript | angular/angular.js | lib/versions/version-info.js | https://github.com/angular/angular.js/blob/master/lib/versions/version-info.js | MIT |
function deleteOldSnapshotZip(object) {
const bucketId = object.bucket;
const filePath = object.name;
const contentType = object.contentType;
const bucket = storage.bucket(bucketId);
const snapshotFolderMatch = filePath.match(snapshotRegex);
if (!snapshotFolderMatch || contentType !== 'application/zip') ... | The build folder contains a zip file that is unique per build.
When a new zip file is uploaded into snapshot or snapshot-stable,
delete the previous zip file. | deleteOldSnapshotZip | javascript | angular/angular.js | scripts/code.angularjs.org-firebase/functions/index.js | https://github.com/angular/angular.js/blob/master/scripts/code.angularjs.org-firebase/functions/index.js | MIT |
function isArrayLike(obj) {
// `null`, `undefined` and `window` are not array-like
if (obj == null || isWindow(obj)) return false;
// arrays, strings and jQuery/jqLite objects are array like
// * jqLite is either the jQuery or jqLite constructor function
// * we have to check the existence of jqLite first a... | @private
@param {*} obj
@return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
String ...) | isArrayLike | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function forEach(obj, iterator, context) {
var key, length;
if (obj) {
if (isFunction(obj)) {
for (key in obj) {
if (key !== 'prototype' && key !== 'length' && key !== 'name' && obj.hasOwnProperty(key)) {
iterator.call(context, obj[key], key, obj);
}
}
} else if (isArra... | @ngdoc function
@name angular.forEach
@module ng
@kind function
@description
Invokes the `iterator` function once for each item in `obj` collection, which can be either an
object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
is the value of an object property or an arr... | forEach | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function forEachSorted(obj, iterator, context) {
var keys = Object.keys(obj).sort();
for (var i = 0; i < keys.length; i++) {
iterator.call(context, obj[keys[i]], keys[i]);
}
return keys;
} | @ngdoc function
@name angular.forEach
@module ng
@kind function
@description
Invokes the `iterator` function once for each item in `obj` collection, which can be either an
object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
is the value of an object property or an arr... | forEachSorted | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function reverseParams(iteratorFn) {
return function(value, key) {iteratorFn(key, value);};
} | when using forEach the params are value, key, but it is often useful to have key, value.
@param {function(string, *)} iteratorFn
@returns {function(*, string)} | reverseParams | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function nextUid() {
return ++uid;
} | A consistent way of creating unique IDs in angular.
Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before
we hit number precision issues in JavaScript.
Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M
@returns {number} an unique alpha-numeric string | nextUid | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function setHashKey(obj, h) {
if (h) {
obj.$$hashKey = h;
} else {
delete obj.$$hashKey;
}
} | Set or clear the hashkey for an object.
@param obj object
@param h the hashkey (!truthy to delete the hashkey) | setHashKey | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function baseExtend(dst, objs, deep) {
var h = dst.$$hashKey;
for (var i = 0, ii = objs.length; i < ii; ++i) {
var obj = objs[i];
if (!isObject(obj) && !isFunction(obj)) continue;
var keys = Object.keys(obj);
for (var j = 0, jj = keys.length; j < jj; j++) {
var key = keys[j];
var src = ... | Set or clear the hashkey for an object.
@param obj object
@param h the hashkey (!truthy to delete the hashkey) | baseExtend | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function extend(dst) {
return baseExtend(dst, slice.call(arguments, 1), false);
} | @ngdoc function
@name angular.extend
@module ng
@kind function
@description
Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
by passing an empty object as the targ... | extend | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function hasCustomToString(obj) {
return isFunction(obj.toString) && obj.toString !== toString;
} | @ngdoc function
@name angular.identity
@module ng
@kind function
@description
A function that returns its first argument. This function is useful when writing code in the
functional style.
```js
function transformer(transformationFn, value) {
return (transformationFn || angular.identity)(value);
};
... | hasCustomToString | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isObject(value) {
// http://jsperf.com/isobject4
return value !== null && typeof value === 'object';
} | @ngdoc function
@name angular.isObject
@module ng
@kind function
@description
Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
considered to be objects. Note that JavaScript arrays are objects.
@param {*} value Reference to check.
@returns {boolean} True if `value` is an `Objec... | isObject | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isBlankObject(value) {
return value !== null && typeof value === 'object' && !getPrototypeOf(value);
} | Determine if a value is an object with a null prototype
@returns {boolean} True if `value` is an `Object` with a null prototype | isBlankObject | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isDate(value) {
return toString.call(value) === '[object Date]';
} | @ngdoc function
@name angular.isDate
@module ng
@kind function
@description
Determines if a value is a date.
@param {*} value Reference to check.
@returns {boolean} True if `value` is a `Date`. | isDate | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isArray(arr) {
return Array.isArray(arr) || arr instanceof Array;
} | @ngdoc function
@name angular.isArray
@module ng
@kind function
@description
Determines if a reference is an `Array`.
@param {*} value Reference to check.
@returns {boolean} True if `value` is an `Array`. | isArray | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isError(value) {
var tag = toString.call(value);
switch (tag) {
case '[object Error]': return true;
case '[object Exception]': return true;
case '[object DOMException]': return true;
default: return value instanceof Error;
}
} | @description
Determines if a reference is an `Error`.
Loosely based on https://www.npmjs.com/package/iserror
@param {*} value Reference to check.
@returns {boolean} True if `value` is an `Error`. | isError | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isRegExp(value) {
return toString.call(value) === '[object RegExp]';
} | Determines if a value is a regular expression object.
@private
@param {*} value Reference to check.
@returns {boolean} True if `value` is a `RegExp`. | isRegExp | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isWindow(obj) {
return obj && obj.window === obj;
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isWindow | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isScope(obj) {
return obj && obj.$evalAsync && obj.$watch;
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isScope | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isFile(obj) {
return toString.call(obj) === '[object File]';
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isFile | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isFormData(obj) {
return toString.call(obj) === '[object FormData]';
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isFormData | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isBlob(obj) {
return toString.call(obj) === '[object Blob]';
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isBlob | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isBoolean(value) {
return typeof value === 'boolean';
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isBoolean | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isPromiseLike(obj) {
return obj && isFunction(obj.then);
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isPromiseLike | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isTypedArray(value) {
return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isTypedArray | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isArrayBuffer(obj) {
return toString.call(obj) === '[object ArrayBuffer]';
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | isArrayBuffer | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
trim = function(value) {
return isString(value) ? value.trim() : value;
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | trim | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
escapeForRegexp = function(s) {
return s
.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g, '\\$1')
// eslint-disable-next-line no-control-regex
.replace(/\x08/g, '\\x08');
} | Checks if `obj` is a window object.
@private
@param {*} obj Object to check
@returns {boolean} True if `obj` is a window obj. | escapeForRegexp | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function isElement(node) {
return !!(node &&
(node.nodeName // We are a direct element.
|| (node.prop && node.attr && node.find))); // We have an on and find method part of jQuery API.
} | @ngdoc function
@name angular.isElement
@module ng
@kind function
@description
Determines if a reference is a DOM element (or wrapped jQuery element).
@param {*} value Reference to check.
@returns {boolean} True if `value` is a DOM element (or wrapped jQuery element). | isElement | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function makeMap(str) {
var obj = {}, items = str.split(','), i;
for (i = 0; i < items.length; i++) {
obj[items[i]] = true;
}
return obj;
} | @param str 'key1,key2,...'
@returns {object} in the form of {key1:true, key2:true, ...} | makeMap | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function nodeName_(element) {
return lowercase(element.nodeName || (element[0] && element[0].nodeName));
} | @param str 'key1,key2,...'
@returns {object} in the form of {key1:true, key2:true, ...} | nodeName_ | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function includes(array, obj) {
return Array.prototype.indexOf.call(array, obj) !== -1;
} | @param str 'key1,key2,...'
@returns {object} in the form of {key1:true, key2:true, ...} | includes | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function arrayRemove(array, value) {
var index = array.indexOf(value);
if (index >= 0) {
array.splice(index, 1);
}
return index;
} | @param str 'key1,key2,...'
@returns {object} in the form of {key1:true, key2:true, ...} | arrayRemove | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function equals(o1, o2) {
if (o1 === o2) return true;
if (o1 === null || o2 === null) return false;
// eslint-disable-next-line no-self-compare
if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
if (t1 === t2 && t1 === 'object') {
if (isArray... | @ngdoc function
@name angular.equals
@module ng
@kind function
@description
Determines if two objects or two values are equivalent. Supports value types, regular
expressions, arrays and objects.
Two objects or values are considered equivalent if at least one of the following is true:
* Both objects or values pass `=... | equals | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
csp = function() {
if (!isDefined(csp.rules)) {
var ngCspElement = (window.document.querySelector('[ng-csp]') ||
window.document.querySelector('[data-ng-csp]'));
if (ngCspElement) {
var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
ngCspElement.getAtt... | @ngdoc function
@name angular.equals
@module ng
@kind function
@description
Determines if two objects or two values are equivalent. Supports value types, regular
expressions, arrays and objects.
Two objects or values are considered equivalent if at least one of the following is true:
* Both objects or values pass `=... | csp | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function noUnsafeEval() {
try {
// eslint-disable-next-line no-new, no-new-func
new Function('');
return false;
} catch (e) {
return true;
}
} | @ngdoc function
@name angular.equals
@module ng
@kind function
@description
Determines if two objects or two values are equivalent. Supports value types, regular
expressions, arrays and objects.
Two objects or values are considered equivalent if at least one of the following is true:
* Both objects or values pass `=... | noUnsafeEval | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
jq = function() {
if (isDefined(jq.name_)) return jq.name_;
var el;
var i, ii = ngAttrPrefixes.length, prefix, name;
for (i = 0; i < ii; ++i) {
prefix = ngAttrPrefixes[i];
el = window.document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]');
if (el) {
name = el.getAttribute(prefix + 'j... | @ngdoc directive
@module ng
@name ngJq
@element ANY
@param {string=} ngJq the name of the library available under `window`
to be used for angular.element
@description
Use this directive to force the angular.element library. This should be
used to force either jqLite by leaving ng-jq blank or setting the name of
the j... | jq | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function concat(array1, array2, index) {
return array1.concat(slice.call(array2, index));
} | @ngdoc directive
@module ng
@name ngJq
@element ANY
@param {string=} ngJq the name of the library available under `window`
to be used for angular.element
@description
Use this directive to force the angular.element library. This should be
used to force either jqLite by leaving ng-jq blank or setting the name of
the j... | concat | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function sliceArgs(args, startIndex) {
return slice.call(args, startIndex || 0);
} | @ngdoc directive
@module ng
@name ngJq
@element ANY
@param {string=} ngJq the name of the library available under `window`
to be used for angular.element
@description
Use this directive to force the angular.element library. This should be
used to force either jqLite by leaving ng-jq blank or setting the name of
the j... | sliceArgs | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function bind(self, fn) {
var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
if (isFunction(fn) && !(fn instanceof RegExp)) {
return curryArgs.length
? function() {
return arguments.length
? fn.apply(self, concat(curryArgs, arguments, 0))
: fn.apply(self... | @ngdoc function
@name angular.bind
@module ng
@kind function
@description
Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
`fn`). You can supply optional `args` that are prebound to the function. This feature is also
known as [partial application](http://en.wikipedia.org/wiki... | bind | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function toJsonReplacer(key, value) {
var val = value;
if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
val = undefined;
} else if (isWindow(value)) {
val = '$WINDOW';
} else if (value && window.document === value) {
val = '$DOCUMENT';
} else if (isScope(value)) {... | @ngdoc function
@name angular.bind
@module ng
@kind function
@description
Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
`fn`). You can supply optional `args` that are prebound to the function. This feature is also
known as [partial application](http://en.wikipedia.org/wiki... | toJsonReplacer | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function toJson(obj, pretty) {
if (isUndefined(obj)) return undefined;
if (!isNumber(pretty)) {
pretty = pretty ? 2 : null;
}
return JSON.stringify(obj, toJsonReplacer, pretty);
} | @ngdoc function
@name angular.toJson
@module ng
@kind function
@description
Serializes input into a JSON-formatted string. Properties with leading $$ characters will be
stripped since AngularJS uses this notation internally.
@param {Object|Array|Date|string|number|boolean} obj Input to be serialized into JSON.
@param... | toJson | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function fromJson(json) {
return isString(json)
? JSON.parse(json)
: json;
} | @ngdoc function
@name angular.fromJson
@module ng
@kind function
@description
Deserializes a JSON string.
@param {string} json JSON string to deserialize.
@returns {Object|Array|string|number} Deserialized JSON string. | fromJson | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function timezoneToOffset(timezone, fallback) {
// Support: IE 9-11 only, Edge 13-15+
// IE/Edge do not "understand" colon (`:`) in timezone
timezone = timezone.replace(ALL_COLONS, '');
var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
return isNumberNaN(requestedTimezoneO... | @ngdoc function
@name angular.fromJson
@module ng
@kind function
@description
Deserializes a JSON string.
@param {string} json JSON string to deserialize.
@returns {Object|Array|string|number} Deserialized JSON string. | timezoneToOffset | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function addDateMinutes(date, minutes) {
date = new Date(date.getTime());
date.setMinutes(date.getMinutes() + minutes);
return date;
} | @ngdoc function
@name angular.fromJson
@module ng
@kind function
@description
Deserializes a JSON string.
@param {string} json JSON string to deserialize.
@returns {Object|Array|string|number} Deserialized JSON string. | addDateMinutes | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function convertTimezoneToLocal(date, timezone, reverse) {
reverse = reverse ? -1 : 1;
var dateTimezoneOffset = date.getTimezoneOffset();
var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));
} | @ngdoc function
@name angular.fromJson
@module ng
@kind function
@description
Deserializes a JSON string.
@param {string} json JSON string to deserialize.
@returns {Object|Array|string|number} Deserialized JSON string. | convertTimezoneToLocal | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function startingTag(element) {
element = jqLite(element).clone().empty();
var elemHtml = jqLite('<div></div>').append(element).html();
try {
return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
elemHtml.
match(/^(<[^>]+>)/)[1].
replace(/^<([\w-]+)/, function(match... | @returns {string} Returns the string representation of the element. | startingTag | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function tryDecodeURIComponent(value) {
try {
return decodeURIComponent(value);
} catch (e) {
// Ignore any invalid uri component.
}
} | Tries to decode the URI component without throwing an exception.
@private
@param str value potential URI component to check.
@returns {boolean} True if `value` can be decoded
with the decodeURIComponent function. | tryDecodeURIComponent | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function parseKeyValue(/**string*/keyValue) {
var obj = {};
forEach((keyValue || '').split('&'), function(keyValue) {
var splitPoint, key, val;
if (keyValue) {
key = keyValue = keyValue.replace(/\+/g,'%20');
splitPoint = keyValue.indexOf('=');
if (splitPoint !== -1) {
key = keyValu... | Parses an escaped url query string into key-value pairs.
@returns {Object.<string,boolean|Array>} | parseKeyValue | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function encodeUriSegment(val) {
return encodeUriQuery(val, true).
replace(/%26/gi, '&').
replace(/%3D/gi, '=').
replace(/%2B/gi, '+');
} | We need our custom method because encodeURIComponent is too aggressive and doesn't follow
http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
segments:
segment = *pchar
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
pct-encoded = "%" HEXDIG H... | encodeUriSegment | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function encodeUriQuery(val, pctEncodeSpaces) {
return encodeURIComponent(val).
replace(/%40/gi, '@').
replace(/%3A/gi, ':').
replace(/%24/g, '$').
replace(/%2C/gi, ',').
replace(/%3B/gi, ';').
replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'... | This method is intended for encoding *key* or *value* parts of query component. We need a custom
method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
encoded per http://tools.ietf.org/html/rfc3986:
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-enc... | encodeUriQuery | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function getNgAttribute(element, ngAttr) {
var attr, i, ii = ngAttrPrefixes.length;
for (i = 0; i < ii; ++i) {
attr = ngAttrPrefixes[i] + ngAttr;
if (isString(attr = element.getAttribute(attr))) {
return attr;
}
}
return null;
} | This method is intended for encoding *key* or *value* parts of query component. We need a custom
method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
encoded per http://tools.ietf.org/html/rfc3986:
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-enc... | getNgAttribute | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function allowAutoBootstrap(document) {
var script = document.currentScript;
if (!script) {
// Support: IE 9-11 only
// IE does not have `document.currentScript`
return true;
}
// If the `currentScript` property has been clobbered just return false, since this indicates a probable attack
if (!(s... | This method is intended for encoding *key* or *value* parts of query component. We need a custom
method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
encoded per http://tools.ietf.org/html/rfc3986:
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-enc... | allowAutoBootstrap | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function angularInit(element, bootstrap) {
var appElement,
module,
config = {};
// The element `element` has priority over any other element.
forEach(ngAttrPrefixes, function(prefix) {
var name = prefix + 'app';
if (!appElement && element.hasAttribute && element.hasAttribute(name)) {
a... | @ngdoc directive
@name ngApp
@module ng
@element ANY
@param {angular.Module} ngApp an optional application
{@link angular.module module} name to load.
@param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be
created in "strict-di" mode. This means that the application will... | angularInit | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function bootstrap(element, modules, config) {
if (!isObject(config)) config = {};
var defaultConfig = {
strictDi: false
};
config = extend(defaultConfig, config);
var doBootstrap = function() {
element = jqLite(element);
if (element.injector()) {
var tag = (element[0] === window.document) ... | @ngdoc function
@name angular.bootstrap
@module ng
@description
Use this function to manually start up AngularJS application.
For more information, see the {@link guide/bootstrap Bootstrap guide}.
AngularJS will detect if it has been loaded into the browser more than once and only allow the
first loaded script to be ... | bootstrap | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
doBootstrap = function() {
element = jqLite(element);
if (element.injector()) {
var tag = (element[0] === window.document) ? 'document' : startingTag(element);
// Encode angle brackets to prevent input from being sanitized to empty string #8683.
throw ngMinErr(
'btstrpd',
... | @ngdoc function
@name angular.bootstrap
@module ng
@description
Use this function to manually start up AngularJS application.
For more information, see the {@link guide/bootstrap Bootstrap guide}.
AngularJS will detect if it has been loaded into the browser more than once and only allow the
first loaded script to be ... | doBootstrap | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function reloadWithDebugInfo() {
window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;
window.location.reload();
} | @ngdoc function
@name angular.reloadWithDebugInfo
@module ng
@description
Use this function to reload the current application with debug information turned on.
This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.
See {@link ng.$compileProvider#debugInfoEnabled} for more. | reloadWithDebugInfo | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function getTestability(rootElement) {
var injector = angular.element(rootElement).injector();
if (!injector) {
throw ngMinErr('test',
'no injector found for element argument to getTestability');
}
return injector.get('$$testability');
} | @name angular.getTestability
@module ng
@description
Get the testability service for the instance of AngularJS on the given
element.
@param {DOMElement} element DOM element which is the root of AngularJS application. | getTestability | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function snake_case(name, separator) {
separator = separator || '_';
return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
return (pos ? separator : '') + letter.toLowerCase();
});
} | @name angular.getTestability
@module ng
@description
Get the testability service for the instance of AngularJS on the given
element.
@param {DOMElement} element DOM element which is the root of AngularJS application. | snake_case | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function bindJQuery() {
var originalCleanData;
if (bindJQueryFired) {
return;
}
// bind to jQuery if present;
var jqName = jq();
jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)
!jqName ? undefined : // use jqLite
... | @name angular.getTestability
@module ng
@description
Get the testability service for the instance of AngularJS on the given
element.
@param {DOMElement} element DOM element which is the root of AngularJS application. | bindJQuery | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function UNSAFE_restoreLegacyJqLiteXHTMLReplacement() {
JQLite.legacyXHTMLReplacement = true;
} | @ngdoc function
@name angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement
@module ng
@kind function
@description
Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like
`<div /><span />` to `<div></div><span></span>` instead of `<div><span></span></div>`.
The new behavior is a security fix. Thus, if ... | UNSAFE_restoreLegacyJqLiteXHTMLReplacement | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function assertArg(arg, name, reason) {
if (!arg) {
throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required'));
}
return arg;
} | throw error if the argument is falsy. | assertArg | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function assertArgFn(arg, name, acceptArrayAnnotation) {
if (acceptArrayAnnotation && isArray(arg)) {
arg = arg[arg.length - 1];
}
assertArg(isFunction(arg), name, 'not a function, got ' +
(arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
return arg;
} | throw error if the argument is falsy. | assertArgFn | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function assertNotHasOwnProperty(name, context) {
if (name === 'hasOwnProperty') {
throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
}
} | throw error if the name given is hasOwnProperty
@param {String} name the name to test
@param {String} context the context in which the name is used, such as module or directive | assertNotHasOwnProperty | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function getter(obj, path, bindFnToScope) {
if (!path) return obj;
var keys = path.split('.');
var key;
var lastInstance = obj;
var len = keys.length;
for (var i = 0; i < len; i++) {
key = keys[i];
if (obj) {
obj = (lastInstance = obj)[key];
}
}
if (!bindFnToScope && isFunction(obj)) ... | Return the value accessible from the object by path. Any undefined traversals are ignored
@param {Object} obj starting object
@param {String} path path to traverse
@param {boolean} [bindFnToScope=true]
@returns {Object} value as accessible by path | getter | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function getBlockNodes(nodes) {
// TODO(perf): update `nodes` instead of creating a new object?
var node = nodes[0];
var endNode = nodes[nodes.length - 1];
var blockNodes;
for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {
if (blockNodes || nodes[i] !== node) {
if (!blockNodes) {... | Return the DOM siblings between the first and last node in the given array.
@param {Array} array like object
@returns {Array} the inputted object or a jqLite collection containing the nodes | getBlockNodes | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function createMap() {
return Object.create(null);
} | Creates a new object without a prototype. This object is useful for lookup without having to
guard against prototypically inherited properties via hasOwnProperty.
Related micro-benchmarks:
- http://jsperf.com/object-create2
- http://jsperf.com/proto-map-lookup/2
- http://jsperf.com/for-in-vs-object-keys2
@returns {Ob... | createMap | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function stringify(value) {
if (value == null) { // null || undefined
return '';
}
switch (typeof value) {
case 'string':
break;
case 'number':
value = '' + value;
break;
default:
if (hasCustomToString(value) && !isArray(value) && !isDate(value)) {
value = value.toS... | Creates a new object without a prototype. This object is useful for lookup without having to
guard against prototypically inherited properties via hasOwnProperty.
Related micro-benchmarks:
- http://jsperf.com/object-create2
- http://jsperf.com/proto-map-lookup/2
- http://jsperf.com/for-in-vs-object-keys2
@returns {Ob... | stringify | javascript | angular/angular.js | src/Angular.js | https://github.com/angular/angular.js/blob/master/src/Angular.js | MIT |
function hashKey(obj, nextUidFn) {
var key = obj && obj.$$hashKey;
if (key) {
if (typeof key === 'function') {
key = obj.$$hashKey();
}
return key;
}
var objType = typeof obj;
if (objType === 'function' || (objType === 'object' && obj !== null)) {
key = obj.$$hashKey = objType + ':' + ... | Computes a hash of an 'obj'.
Hash of a:
string is string
number is number as string
object is either result of calling $$hashKey function on the object or uniquely generated id,
that is also assigned to the $$hashKey property of the object.
@param obj
@returns {string} hash string such that the same input w... | hashKey | javascript | angular/angular.js | src/apis.js | https://github.com/angular/angular.js/blob/master/src/apis.js | MIT |
function NgMapShim() {
this._keys = [];
this._values = [];
this._lastKey = NaN;
this._lastIndex = -1;
} | Computes a hash of an 'obj'.
Hash of a:
string is string
number is number as string
object is either result of calling $$hashKey function on the object or uniquely generated id,
that is also assigned to the $$hashKey property of the object.
@param obj
@returns {string} hash string such that the same input w... | NgMapShim | javascript | angular/angular.js | src/apis.js | https://github.com/angular/angular.js/blob/master/src/apis.js | MIT |
function cssKebabToCamel(name) {
return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));
} | Converts kebab-case to camelCase.
There is also a special case for the ms prefix starting with a lowercase letter.
@param name Name to normalize | cssKebabToCamel | javascript | angular/angular.js | src/jqLite.js | https://github.com/angular/angular.js/blob/master/src/jqLite.js | MIT |
function fnCamelCaseReplace(all, letter) {
return letter.toUpperCase();
} | Converts kebab-case to camelCase.
There is also a special case for the ms prefix starting with a lowercase letter.
@param name Name to normalize | fnCamelCaseReplace | javascript | angular/angular.js | src/jqLite.js | https://github.com/angular/angular.js/blob/master/src/jqLite.js | MIT |
function kebabToCamel(name) {
return name
.replace(DASH_LOWERCASE_REGEXP, fnCamelCaseReplace);
} | Converts kebab-case to camelCase.
@param name Name to normalize | kebabToCamel | javascript | angular/angular.js | src/jqLite.js | https://github.com/angular/angular.js/blob/master/src/jqLite.js | MIT |
function jqLiteIsTextNode(html) {
return !HTML_REGEXP.test(html);
} | Converts kebab-case to camelCase.
@param name Name to normalize | jqLiteIsTextNode | javascript | angular/angular.js | src/jqLite.js | https://github.com/angular/angular.js/blob/master/src/jqLite.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.