Tweakr
    Preparing search index...

    Function unset

    • Removes a property at the given path in an object.

      Parameters

      • obj: any

        Source object

      • path: string

        Dot-separated path

      Returns boolean

      True if property existed and was removed

      const obj = { a: { b: 2 } };
      unset(obj, 'a.b');
      console.log(obj); // { a: {} }

      1.2.0