# fundefstr

> Function Definition String

Latest version **0.0.2** (published 2022-06-16) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-06-16 |
| First published | 2022-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vu Anh Hao |
| Maintainers | anhhao.me |
| Keywords | function, string, definition, compile, execute |

## Links

- npm: https://www.npmjs.com/package/fundefstr
- Repository: https://github.com/haova/fundefstr
- Homepage: https://github.com/haova/fundefstr#readme
- Issues: https://github.com/haova/fundefstr/issues
- npm.io page: https://npm.io/package/fundefstr

## Dependencies (1)

- [ramda](https://npm.io/package/ramda.md) ^0.28.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2022-06-16
- 0.0.1 — 2022-06-16

## README

# fundefstr

Function Definition String

## Usage

```js
import { compile } from 'fundefstr';

const exec = compile({
  func_1(params, next, back){
    return [params[0], params[1]]; // as same as: next([params[0], params[1]])
  },

  func_2([ value, counter ], next, back){
    if (counter < 10)
      back([value, counter + 1]);
    else
      next([value, counter]);
  },

  func_3(params, next, back){
    return params;
  }
});

const str = 'func_1,func_2,func_3:param_1,param_2';
const rel = await exec(str, { param_1: 'This is a param', param_2: 0 });

console.log(rel); // ['This is a param', 10]
```

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