source: node_modules/ramda/es/valuesIn.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 872 bytes
Line 
1import _curry1 from "./internal/_curry1.js";
2/**
3 * Returns a list of all the properties, including prototype properties, of the
4 * supplied object.
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} -> [v]
13 * @param {Object} obj The object to extract values from
14 * @return {Array} An array of the values of the object's own and prototype properties.
15 * @see R.values, R.keysIn
16 * @example
17 *
18 * const F = function() { this.x = 'X'; };
19 * F.prototype.y = 'Y';
20 * const f = new F();
21 * R.valuesIn(f); //=> ['X', 'Y']
22 */
23
24var valuesIn =
25/*#__PURE__*/
26_curry1(function valuesIn(obj) {
27 var prop;
28 var vs = [];
29
30 for (prop in obj) {
31 vs[vs.length] = obj[prop];
32 }
33
34 return vs;
35});
36
37export default valuesIn;
Note: See TracBrowser for help on using the repository browser.