1 | import _curry1 from "./internal/_curry1.js";
|
2 | /**
|
3 | * Returns a list containing the names of all the properties of the supplied
|
4 | * object, including prototype properties.
|
5 | * Note that the order of the output array is not guaranteed to be consistent
|
6 | * across different JS platforms.
|
7 | *
|
8 | * @func
|
9 | * @memberOf R
|
10 | * @since v0.2.0
|
11 | * @category Object
|
12 | * @sig {k: v} -> [k]
|
13 | * @param {Object} obj The object to extract properties from
|
14 | * @return {Array} An array of the object's own and prototype properties.
|
15 | * @see R.keys, R.valuesIn
|
16 | * @example
|
17 | *
|
18 | * const F = function() { this.x = 'X'; };
|
19 | * F.prototype.y = 'Y';
|
20 | * const f = new F();
|
21 | * R.keysIn(f); //=> ['x', 'y']
|
22 | */
|
23 |
|
24 | var keysIn =
|
25 | /*#__PURE__*/
|
26 | _curry1(function keysIn(obj) {
|
27 | var prop;
|
28 | var ks = [];
|
29 |
|
30 | for (prop in obj) {
|
31 | ks[ks.length] = prop;
|
32 | }
|
33 |
|
34 | return ks;
|
35 | });
|
36 |
|
37 | export default keysIn; |
\ | No newline at end of file |