source: imaps-frontend/node_modules/lodash-es/_baseToPairs.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 535 bytes
Line 
1import arrayMap from './_arrayMap.js';
2
3/**
4 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
5 * of key-value pairs for `object` corresponding to the property names of `props`.
6 *
7 * @private
8 * @param {Object} object The object to query.
9 * @param {Array} props The property names to get values for.
10 * @returns {Object} Returns the key-value pairs.
11 */
12function baseToPairs(object, props) {
13 return arrayMap(props, function(key) {
14 return [key, object[key]];
15 });
16}
17
18export default baseToPairs;
Note: See TracBrowser for help on using the repository browser.