a6f882bc45a5ea8f410a787067f8cf542253e42a
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / toPairsIn.js
1 var baseToPairs = require('./_baseToPairs'),
2     keysIn = require('./keysIn');
3
4 /**
5  * Creates an array of own and inherited enumerable key-value pairs for `object`.
6  *
7  * @static
8  * @memberOf _
9  * @category Object
10  * @param {Object} object The object to query.
11  * @returns {Array} Returns the new array of key-value pairs.
12  * @example
13  *
14  * function Foo() {
15  *   this.a = 1;
16  *   this.b = 2;
17  * }
18  *
19  * Foo.prototype.c = 3;
20  *
21  * _.toPairsIn(new Foo);
22  * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
23  */
24 function toPairsIn(object) {
25   return baseToPairs(object, keysIn(object));
26 }
27
28 module.exports = toPairsIn;