toPairsIn

最后更新于:2022-04-02 00:05:51

## toPairsIn + [link](./toPairsIn "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L11749 "View in source.") + [npm](https://www.npmjs.com/package/lodash.topairsin "See the npm package.") ``` _.toPairsIn(object) ``` 创建一个对象自身和继承的可枚举属性的键值对数组。 ### 参数 1. object (Object) 要检索的对象 ### 返回值 (Array) 返回键值对的数组 ### 示例 ``` function Foo() { this.a = 1; this.b = 2; } Foo.prototype.c = 3; _.toPairsIn(new Foo); // => [['a', 1], ['b', 2], ['c', 1]] (无法保证遍历的顺序) ```
';