PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/lodash/toPairs.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 30 lines | 4 code | 2 blank | 24 comment | 0 complexity | 4ef8f70315e9ef963e2af805a81cb42b MD5 | raw file
 1var createToPairs = require('./_createToPairs'),
 2    keys = require('./keys');
 3
 4/**
 5 * Creates an array of own enumerable string keyed-value pairs for `object`
 6 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
 7 * entries are returned.
 8 *
 9 * @static
10 * @memberOf _
11 * @since 4.0.0
12 * @alias entries
13 * @category Object
14 * @param {Object} object The object to query.
15 * @returns {Array} Returns the key-value pairs.
16 * @example
17 *
18 * function Foo() {
19 *   this.a = 1;
20 *   this.b = 2;
21 * }
22 *
23 * Foo.prototype.c = 3;
24 *
25 * _.toPairs(new Foo);
26 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
27 */
28var toPairs = createToPairs(keys);
29
30module.exports = toPairs;