aboutsummaryrefslogtreecommitdiffstats
path: root/src/apis.js
diff options
context:
space:
mode:
authorZhenbo Zhang2012-05-09 00:00:38 +0300
committerMisko Hevery2012-09-11 16:38:42 -0700
commitf7a8f17fc72f603de11ca89170bc8d1cad4dae6a (patch)
tree5b49a79faaefd7aa46ec3beb3c1883acada93efd /src/apis.js
parent191efbb558813d4ae9f5b602d5623f1cdc811df3 (diff)
downloadangular.js-f7a8f17fc72f603de11ca89170bc8d1cad4dae6a.tar.bz2
fix(ng-repeat) to work with primitive types
Diffstat (limited to 'src/apis.js')
-rw-r--r--src/apis.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/apis.js b/src/apis.js
index 7b470802..098d9cdd 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -97,5 +97,15 @@ HashQueueMap.prototype = {
return array.shift();
}
}
+ },
+
+ /**
+ * return the first item without deleting it
+ */
+ peek: function(key) {
+ var array = this[key = hashKey(key)];
+ if (array) {
+ return array[0];
+ }
}
};