export class DMap extends Map {
  constructor() {
    super();
  }
  log() {
    if (__DEV__) {
      console.log("[DCache] ", ...arguments);
    }
  }
  update(key, value) {
    if (typeof key === "string") {
      if (this.get(key)) {
        if (value) {
          this.set(key, value);
        } else {
          this.log(`update . value is undefined or null`);
        }
      } else {
        this.log(`update . ${key} not found`);
      }
    } else {
      this.log("key is undefined or null");
    }
  }
}
