@nevware21/ts-utils
    Preparing search index...

    Function objIsSealed

    • The objIsSealed() method determines if an object is sealed. An object is sealed if it is not extensible and if all its properties are non-configurable (but potentially still writable).

      Parameters

      • obj: any

        The object to check if it is sealed.

      Returns boolean

      A Boolean indicating whether or not the given object is sealed.

      0.12.0

      const obj = { a: 1 };
      console.log(objIsSealed(obj)); // false

      const sealed = objSeal({ b: 2 });
      console.log(objIsSealed(sealed)); // true

      // Frozen objects are also sealed
      const frozen = objFreeze({ c: 3 });
      console.log(objIsSealed(frozen)); // true