Skip to content

Commit 773fbc4

Browse files
committed
dist(*): bump version v0.5.7
1 parent 168f237 commit 773fbc4

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

dist/angular-filter.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Bunch of useful filters for angularJS(with no external dependencies!)
3-
* @version v0.5.6 - 2015-09-23 * @link https://github.com/a8m/angular-filter
3+
* @version v0.5.7 - 2015-10-04 * @link https://github.com/a8m/angular-filter
44
* @author Ariel Mashraki <ariel@mashraki.co.il>
55
* @license MIT License, http://www.opensource.org/licenses/MIT
66
*/
@@ -2101,7 +2101,20 @@ angular.module('a8m.filter-watcher', [])
21012101
* @returns {string}
21022102
*/
21032103
function getHashKey(fName, args) {
2104-
return [fName, angular.toJson(args)]
2104+
function replacerFactory() {
2105+
var cache = [];
2106+
return function(key, val) {
2107+
if(isObject(val) && !isNull(val)) {
2108+
if (~cache.indexOf(val)) return '[Circular]';
2109+
cache.push(val)
2110+
}
2111+
if($window == val) return '$WINDOW';
2112+
if($window.document == val) return '$DOCUMENT';
2113+
if(isScope(val)) return '$SCOPE';
2114+
return val;
2115+
}
2116+
}
2117+
return [fName, JSON.stringify(args, replacerFactory())]
21052118
.join('#')
21062119
.replace(/"/g,'');
21072120
}
@@ -2190,7 +2203,6 @@ angular.module('a8m.filter-watcher', [])
21902203
isMemoized: $$isMemoized,
21912204
memoize: $$memoize
21922205
}
2193-
21942206
}];
21952207
});
21962208

0 commit comments

Comments
 (0)