17 lines
423 B
JavaScript
Raw Permalink Normal View History

2026-05-31 13:21:13 +02:00
//#region src/compat/object/values.ts
/**
* Creates an array of the own enumerable property values of `object`.
*
* @param {any} object The object to query.
* @returns {any[]} Returns an array of property values.
* @example
* const obj = { a: 1, b: 2, c: 3 };
* values(obj); // => [1, 2, 3]
*/
function values(object) {
if (object == null) return [];
return Object.values(object);
}
//#endregion
exports.values = values;