JSPM

@tanzanite/deep-lock

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q41003F
  • License MIT

Deep freeze, seal or preventExtensions typescript helper function

Package Exports

  • @tanzanite/deep-lock
  • @tanzanite/deep-lock/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tanzanite/deep-lock) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Deep freeze, seal or preventExtensions with typescript types

Usage:

  1. Install package yarn add @tanzanite/deep-lock
  2. Usage:
import deepLock from '@tanzanite/deep-lock';

const obj = { x: 1 }; // { x: number }
const freezed = deepLock({ x: 1 }); // { readonly x: number }