# scalemodel

> Replicate a generator function’s code

Latest version **0.1.0** (published 2021-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install scalemodel
pnpm add scalemodel
yarn add scalemodel
bun add scalemodel
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-02-18 |
| First published | 2021-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Patrick Smith |
| Maintainers | burntcaramel |

## Links

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

## Recent versions

- 0.1.0 (latest) — 2021-02-18

## README

<div align="center">
  <h1>🧍🏼‍♂️🚂🧍🏾‍♀️ Scale Model</h1>
  <p>Replicate a generator function’s code</p>
  <a href="https://bundlephobia.com/result?p=scalemodel">
    <img src="https://badgen.net/bundlephobia/minzip/scalemodel@0.1.0" alt="minified and gzipped size">
    <img src="https://badgen.net/bundlephobia/min/scalemodel@0.1.0" alt="minified size">
    <img src="https://badgen.net/bundlephobia/dependency-count/scalemodel@0.1.0" alt="zero dependencies">
  </a>
</div>

## Install

```console
npm add scalemodel
```

## Examples

```javascript
import { toCode } from "scalemodel";

function* Outer() {
  yield Inner;
}

function* Inner() {
  yield ["first", 1];
  yield [2, "second"];
  yield [3, "third", 3];
}

const jsCode = toCode(Outer);

/*
"function* Outer() {
\tyield Inner;
}

function* Inner() {
\tyield ["first",1];
\tyield [2,"second"];
\tyield [3,"third",3];
}"
*/
```

## TODO

- Regular expressions?
- Sets?
- Maps?
- Symbols?
- Minify?

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