/
githubmirror
/
angular.js
Обзор
Документация
Войти
/
githubmirror
/
angular.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.6.5
src/loader.prefix
34 строки
1 KB
Georgios Kalpakas
fix(angular-loader): do not depend on "closure" globals that may not be available
27 апр 2017, 22:47
27 апр 2017, 22:47
a3226d0
Код
Авторство
О чём код?
/** * @license AngularJS v"NG_VERSION_FULL" * (c) 2010-2017 Google, Inc. http://angularjs.org * License: MIT */ 'use strict'; (function() { // NOTE: // These functions are copied here from `src/Angular.js`, because they are needed inside the // `angular-loader.js` closure and need to be available before the main `angular.js` script has // been loaded. function isFunction(value) {return typeof value === 'function';} function isDefined(value) {return typeof value !== 'undefined';} function isNumber(value) {return typeof value === 'number';} function isObject(value) {return value !== null && typeof value === 'object';} function isScope(obj) {return obj && obj.$evalAsync && obj.$watch;} function isUndefined(value) {return typeof value === 'undefined';} function isWindow(obj) {return obj && obj.window === obj;} function sliceArgs(args, startIndex) {return Array.prototype.slice.call(args, startIndex || 0);} 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)) { val = '$SCOPE'; } return val; }