Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80742 views
1
var baseValues = require('../internal/baseValues'),
2
keysIn = require('./keysIn');
3
4
/**
5
* Creates an array of the own and inherited enumerable property values
6
* of `object`.
7
*
8
* **Note:** Non-object values are coerced to objects.
9
*
10
* @static
11
* @memberOf _
12
* @category Object
13
* @param {Object} object The object to query.
14
* @returns {Array} Returns the array of property values.
15
* @example
16
*
17
* function Foo() {
18
* this.a = 1;
19
* this.b = 2;
20
* }
21
*
22
* Foo.prototype.c = 3;
23
*
24
* _.valuesIn(new Foo);
25
* // => [1, 2, 3] (iteration order is not guaranteed)
26
*/
27
function valuesIn(object) {
28
return baseValues(object, keysIn(object));
29
}
30
31
module.exports = valuesIn;
32
33