Remove functions finally not needed in Table module

This commit is contained in:
Tissevert 2020-01-13 22:43:27 +01:00
parent 26020a5539
commit 4ea3b57e1d

View file

@ -4,7 +4,6 @@ import {compare, of, proj} from UnitJS.Fun;
function Table(itemMaker, sortCriterion) {
var items = {};
return {
dump: dump,
get: get,
getAll: getAll,
insert: insert,
@ -12,10 +11,6 @@ function Table(itemMaker, sortCriterion) {
remove: remove
};
function dump() {
return items;
}
function get(key) {
return items[key];
}
@ -37,24 +32,9 @@ function Table(itemMaker, sortCriterion) {
}
}
function update(mapper) {
for(var key in items) {
var newValue = mapper(items[key]);
if(newValue != undefined) {
insert(key, newValue);
} else {
remove(key);
}
}
}
function remove(key) {
delete items[key];
}
function restore(dumped) {
items = dumped;
}
}
return {