mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
37 lines
881 B
TypeScript
37 lines
881 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/values.js
|
|
|
|
|
|
import _curry1 from './internal/_curry1.js';
|
|
import keys from './keys.js';
|
|
|
|
|
|
/**
|
|
* Returns a list of all the enumerable own properties of the supplied object.
|
|
* Note that the order of the output array is not guaranteed across different
|
|
* JS platforms.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Object
|
|
* @sig {k: v} -> [v]
|
|
* @param {Object} obj The object to extract values from
|
|
* @return {Array} An array of the values of the object's own properties.
|
|
* @see R.valuesIn, R.keys
|
|
* @example
|
|
*
|
|
* R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]
|
|
*/
|
|
var values = _curry1(function values(obj) {
|
|
var props = keys(obj);
|
|
var len = props.length;
|
|
var vals = [];
|
|
var idx = 0;
|
|
while (idx < len) {
|
|
vals[idx] = obj[props[idx]];
|
|
idx += 1;
|
|
}
|
|
return vals;
|
|
});
|
|
export default values;
|