Function deepSeal

  • Recursively seals an objects and all own non-function sub-objects.

    Note that the input object is being mutated.

    Since

    12.0.0

    See

    • deepFreeze
    • Object.seal

    Example

    const a = {a: {b: 2}, b: [1, {foo: "foo"}], c: 2};

    deepSeal(a)
    // => object and all sub-objects are sealed.

    Parameters

    • object: object

      Object to recursively seal.

    Returns void

Generated using TypeDoc