Documented Cache

This commit is contained in:
hydrabolt
2015-11-20 16:36:32 +00:00
parent 2d04728edc
commit 10ea6a9336
4 changed files with 47 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ class Cache extends Array {
}
getAll(key, value) {
var found = [];
var found = new Cache(this.discrim);
this.forEach((val, index, array) => {
if (val.hasOwnProperty(key) && val[key] == value) {
found.push(val);