|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
537 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 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.