This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
'use strict';
7
7
(function() {
8
+ // NOTE:
9
+ // These functions are copied here from `src/Angular.js`, because they are needed inside the
10
+ // `angular-loader.js` closure and need to be available before the main `angular.js` script has
11
+ // been loaded.
8
12
function isFunction(value) {return typeof value === 'function';}
9
13
function isDefined(value) {return typeof value !== 'undefined';}
10
14
function isNumber(value) {return typeof value === 'number';}
11
15
function isObject(value) {return value !== null && typeof value === 'object';}
12
16
function isScope(obj) {return obj && obj.$evalAsync && obj.$watch;}
17
+ function isUndefined(value) {return typeof value === 'undefined';}
13
18
function isWindow(obj) {return obj && obj.window === obj;}
14
19
function sliceArgs(args, startIndex) {return Array.prototype.slice.call(args, startIndex || 0);}
15
20
function toJsonReplacer(key, value) {
Original file line number Diff line number Diff line change 2
2
3
3
/* exported toDebugString */
4
4
5
- // This file is also included in `angular-loader`, so `copy()` might not always be available in the
6
- // closure. In such cases, it is lazily retrieved as `angular.copy()` when needed.
7
- var copyFn ;
8
-
9
5
function serializeObject ( obj , maxDepth ) {
10
6
var seen = [ ] ;
11
7
12
8
// There is no direct way to stringify object until reaching a specific depth
13
9
// and a very deep object can cause a performance issue, so we copy the object
14
10
// based on this specific depth and then stringify it.
15
11
if ( isValidObjectMaxDepth ( maxDepth ) ) {
16
- if ( ! copyFn ) {
17
- copyFn = copy || angular . copy ;
18
- }
19
- obj = copyFn ( obj , null , maxDepth ) ;
12
+ // This file is also included in `angular-loader`, so `copy()` might not always be available in
13
+ // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed.
14
+ obj = angular . copy ( obj , null , maxDepth ) ;
20
15
}
21
16
return JSON . stringify ( obj , function ( key , val ) {
22
17
val = toJsonReplacer ( key , val ) ;
You can’t perform that action at this time.
0 commit comments