valuesin
valuesIn is a utility function from the Lodash JavaScript library. It returns an array containing the enumerable property values of an object, including both its own properties and inherited properties from its prototype chain.
The function is typically used as _.valuesIn(object). It takes a single argument:
- object: The value to query. If the value is null or undefined, the function returns an empty
The result is an array of the enumerable values found on the object, including inherited properties. Non-enumerable
valuesIn differs from _.values (which returns only the object's own enumerable values) by including inherited enumerable
- _.valuesIn({ a: 1, b: 2 }) yields [1, 2].
- If a object has inherited properties, e.g., const parent = { c: 3 }; const child = Object.create(parent); child.d = 4;
Related lodash functions include _.values (own enumerable values only) and other object utilities that inspect or