# fix-obj

> npm package

Latest version **1.0.10** (published 2019-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install fix-obj
pnpm add fix-obj
yarn add fix-obj
bun add fix-obj
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2019-01-17 |
| First published | 2019-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 37.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | liumiao |
| Maintainers | eoyo |
| Keywords | functional, object |

## Links

- npm: https://www.npmjs.com/package/fix-obj
- npm.io page: https://npm.io/package/fix-obj

## Recent versions

- 1.0.10 (latest) — 2019-01-17
- 1.0.9 — 2019-01-17
- 1.0.8 — 2019-01-17
- 1.0.7 — 2019-01-17
- 1.0.6 — 2019-01-17
- 1.0.5 — 2019-01-17
- 1.0.4 — 2019-01-15
- 1.0.3 — 2019-01-15
- 1.0.2 — 2019-01-09
- 1.0.1 — 2019-01-09
- 1.0.0 — 2019-01-09

## 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'
}
```


3. 对象转置/数组转置.
```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],
  }
}
```

---
_Source: https://npm.io/package/fix-obj · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
