Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fix-obj

eoyo3MIT1.0.10TypeScript support: included

npm package

functional, object

readme

  1. 对象子结构 subObj. `js const obj = { nice: { good: { better: '好', worse: '差' }, bad: { } } }

const b = { nice: { good: { better: '好' } } }


2. 同key映射.
```js
const a = {
  text: 'liu',
  type: 'big',
}
const b = {
  text: '刘',
  type: 'big'
}
  1. 对象转置/数组转置. `js // 3. 对象转置/数组转置. const a = [ { id: '11', name: 'nihao' }, { id: '12', name: 'dalao' } ]

const b = { id: ['11', '12'], name: ['nihao', 'dalao'] }


4. 状态路径选择.

```js
// 例如用于构建权限的映射表的配置数据.
const config  = {
  attendee : {
    inMeeting: [0, 1]
    endMeeting: [0, 3],
  },
  compere: {
    inMeeting: [0, 1]
    endMeeting: [1, 1],
  }
}