Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
537 bytes
|
Line | |
---|
1 | var arrayMap = require('./_arrayMap');
|
---|
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 | */
|
---|
12 | function baseToPairs(object, props) {
|
---|
13 | return arrayMap(props, function(key) {
|
---|
14 | return [key, object[key]];
|
---|
15 | });
|
---|
16 | }
|
---|
17 |
|
---|
18 | module.exports = baseToPairs;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.