UNPKG

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