@extremejs/utils - v1.0.0-beta.23
    Preparing search index...

    Function keys

    • Returns value's keys.

      Parameters

      • value: unknown

      Returns PropertyKey[]

      1.0.0

      keys({ a: 0, b: 1, c: 2 }); // => ["a", "b", "c"]
      
      function Foo() {
      this.a = 1
      this.b = 2
      }

      Foo.prototype.c = 3

      keys(new Foo) // => ["a", "b"] (iteration order is not guaranteed)
      keys("hi") // => ["0", "1"]