reorganize directory and file structure
This commit is contained in:
parent
1d826ea8d4
commit
48390b8556
99 changed files with 1155 additions and 1629 deletions
18
lib/util/defaultmap.js
Normal file
18
lib/util/defaultmap.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
// export class DefaultMap {
|
||||
// constructor(defaultValue, ...rest) {
|
||||
// this.defaultValue = defaultValue;
|
||||
// this.m = new Map(rest);
|
||||
// }
|
||||
// getdefault(key, addToMapping = false) {
|
||||
// return this.m.get(key) || (() => {
|
||||
// const val = this.defaultValue(key);
|
||||
// if (addToMapping)
|
||||
// this.m.set(key, val);
|
||||
// return val;
|
||||
// })();
|
||||
// }
|
||||
// entries() {
|
||||
// return this.m.entries();
|
||||
// }
|
||||
// }
|
||||
Loading…
Add table
Add a link
Reference in a new issue