UNPKG

ramda

Version:

A practical functional library for JavaScript programmers.

22 lines 780 B
var _curry1 = /*#__PURE__*/require("./internal/_curry1.js"); var _toPairs = /*#__PURE__*/require("./internal/_toPairs.js"); /** * Converts an object into an array of key, value arrays. Only the object's * own properties are used. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own properties. * @see R.fromPairs, R.keys, R.values * @example * * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] */ var toPairs = /*#__PURE__*/_curry1(_toPairs); module.exports = toPairs;