aboutsummaryrefslogtreecommitdiffstats
path: root/src/apis.js
diff options
context:
space:
mode:
authorMisko Hevery2013-03-19 22:27:27 -0700
committerMisko Hevery2013-03-29 23:01:52 -0700
commit61f2767ce65562257599649d9eaf9da08f321655 (patch)
treecf9c6809bbee62d19e04961f53d5c89bab9dd663 /src/apis.js
parent5eb968553a1130461ab8704535691e00eb154ac2 (diff)
downloadangular.js-61f2767ce65562257599649d9eaf9da08f321655.tar.bz2
feat(ngRepeat): add support for custom tracking of items
BREAKING CHANGE: It is considered an error to have two items produce the same track by key. (This was tolerated before.)
Diffstat (limited to 'src/apis.js')
-rw-r--r--src/apis.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/apis.js b/src/apis.js
index 0e94e2a5..c5d2b3d3 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -65,47 +65,3 @@ HashMap.prototype = {
return value;
}
};
-
-/**
- * A map where multiple values can be added to the same key such that they form a queue.
- * @returns {HashQueueMap}
- */
-function HashQueueMap() {}
-HashQueueMap.prototype = {
- /**
- * Same as array push, but using an array as the value for the hash
- */
- push: function(key, value) {
- var array = this[key = hashKey(key)];
- if (!array) {
- this[key] = [value];
- } else {
- array.push(value);
- }
- },
-
- /**
- * Same as array shift, but using an array as the value for the hash
- */
- shift: function(key) {
- var array = this[key = hashKey(key)];
- if (array) {
- if (array.length == 1) {
- delete this[key];
- return array[0];
- } else {
- return array.shift();
- }
- }
- },
-
- /**
- * return the first item without deleting it
- */
- peek: function(key) {
- var array = this[hashKey(key)];
- if (array) {
- return array[0];
- }
- }
-};