MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / createLocalCacheLookup

Function createLocalCacheLookup

lib/test/angular/1.4.3/angular-animate.js:692–717  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

690}
691
692function createLocalCacheLookup() {
693 var cache = Object.create(null);
694 return {
695 flush: function() {
696 cache = Object.create(null);
697 },
698
699 count: function(key) {
700 var entry = cache[key];
701 return entry ? entry.total : 0;
702 },
703
704 get: function(key) {
705 var entry = cache[key];
706 return entry && entry.value;
707 },
708
709 put: function(key, value) {
710 if (!cache[key]) {
711 cache[key] = { total: 1, value: value };
712 } else {
713 cache[key].total++;
714 }
715 }
716 };
717}
718
719var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
720 var gcsLookup = createLocalCacheLookup();

Callers 1

angular-animate.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected