Skip to content

christophehurpeau/deep-freeze-es6

Repository files navigation

deep-freeze-es6

deep freeze, works with Map and Set

Quick example

import { deepFreeze } from "deep-freeze-es6";

const obj = deepFreeze({
  map: new Map([
    [1, 1],
    [2, 2],
  ]),
});
obj.map.clear(); // Error: map is read-only