deep-freeze-es6
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

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

Package Sidebar

Install

npm i deep-freeze-es6

Weekly Downloads

5,515

Version

3.0.2

License

ISC

Unpacked Size

9.04 kB

Total Files

14

Last publish

Collaborators

  • churpeau