@franzzemen/deep-freeze
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Read Me

Implements a recursive "deep freeze" using Object.freeze. Default behavior is to throw on cyclical children, but can also be set to ignore.

Install

npm i @franzzemen/deep-freeze

Usage

This package is published for an ECMAScript module loader. For CommonJS see below.

ECMAScript

import {deepFreeze} from '@franzzemen/deep-freeze';
const object = {};
deepFreeze(object);

CommonJS

import('@franzzemen/deep-freeze')
    .then(package => {
        const object = {};
        package.deepFreeze(object);
    }

/@franzzemen/deep-freeze/

    Package Sidebar

    Install

    npm i @franzzemen/deep-freeze

    Weekly Downloads

    4

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.28 kB

    Total Files

    4

    Last publish

    Collaborators

    • franzzemen