# babel-plugin-s2s-initial-state-creater

> create initial state from flow info

Latest version **0.3.6** (published 2018-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-s2s-initial-state-creater
pnpm add babel-plugin-s2s-initial-state-creater
yarn add babel-plugin-s2s-initial-state-creater
bun add babel-plugin-s2s-initial-state-creater
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.6 |
| Published | 2018-08-24 |
| First published | 2017-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 6 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 265 |
| Author | akameco |
| Maintainers | akameco |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-s2s-initial-state-creater
- Repository: https://github.com/akameco/s2s
- npm.io page: https://npm.io/package/babel-plugin-s2s-initial-state-creater

## Dependencies (6)

- [json5](https://npm.io/package/json5.md) ^0.5.1
- [babylon](https://npm.io/package/babylon.md) ^6.18.0
- [s2s-utils](https://npm.io/package/s2s-utils.md) ^0.6.1
- [flow-faker](https://npm.io/package/flow-faker.md) ^0.2.4
- [typed-assign](https://npm.io/package/typed-assign.md) ^0.1.1
- [babel-generator](https://npm.io/package/babel-generator.md) ^6.26.1

## Recent versions

- 0.3.6 (latest) — 2018-08-24
- 0.3.5 — 2018-06-20
- 0.3.3 — 2018-02-18
- 0.3.2 — 2018-01-21
- 0.3.1 — 2017-12-02
- 0.3.0 — 2017-11-12
- 0.2.4 — 2017-11-08
- 0.2.3 — 2017-11-07
- 0.2.2 — 2017-11-05
- 0.2.1 — 2017-10-31
- 0.2.0 — 2017-10-25
- 0.1.1 — 2017-10-21
- 0.1.0 — 2017-10-19

## README

# babel-plugin-s2s-initial-state-creater

> s2s plugin: create initial-state from flow info

## Install

```
$ npm install --save-dev babel-plugin-s2s-initial-state-creater
```

### Example

#### IN:

```js
// @flow
type Count = number
type State = { count: Count, isLoading: boolean }

const initialState: State = {}
```

#### OUT:

```js
// @flow
type Count = number
type State = { count: Count, isLoading: boolean }

const initialState: State = { count: 0, isLoading: false }
```

### Usage

```
{
  ['s2s-initial-state-creater']
}
```

### Options

#### from

type: `string` <br>
required: true

Set target.js path

If you use `s2s`, you **don't** use this option. s2s handle it automatically.

---
_Source: https://npm.io/package/babel-plugin-s2s-initial-state-creater · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
