MCPcopy
hub / github.com/lodash/lodash / baseToPairs

Function baseToPairs

lodash.js:1005–1009  ·  view source on GitHub ↗

* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array * of key-value pairs for `object` corresponding to the property names of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for.

(object, props)

Source from the content-addressed store, hash-verified

1003 * @returns {Object} Returns the key-value pairs.
1004 */
1005 function baseToPairs(object, props) {
1006 return arrayMap(props, function(key) {
1007 return [key, object[key]];
1008 });
1009 }
1010
1011 /**
1012 * The base implementation of `_.trim`.

Callers 1

createToPairsFunction · 0.85

Calls 1

arrayMapFunction · 0.85

Tested by

no test coverage detected