# swiss-army-eval

> Evaluate code from different languages into JS objects. More versatile and slightly gentler than JavaScript eval.

Latest version **1.0.0** (published 2016-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install swiss-army-eval
pnpm add swiss-army-eval
yarn add swiss-army-eval
bun add swiss-army-eval
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-12-31 |
| First published | 2015-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Justin Morgan |
| Maintainers | justinmorgan |
| Keywords | coffee-script, eval, compile |

## Links

- npm: https://www.npmjs.com/package/swiss-army-eval
- Repository: https://github.com/JustinMorgan/swiss-army-eval
- Issues: https://github.com/JustinMorgan/swiss-army-eval/issues
- npm.io page: https://npm.io/package/swiss-army-eval

## Dependencies (1)

- [coffee-script](https://npm.io/package/coffee-script.md) ^1.9.2

## 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

- 1.0.0 (latest) — 2016-12-31
- 0.3.1 — 2015-05-07
- 0.3.0 — 2015-05-07
- 0.2.5 — 2015-05-06
- 0.2.4 — 2015-05-06
- 0.2.3 — 2015-05-06
- 0.2.0 — 2015-05-06
- 0.1.2 — 2015-05-06
- 0.1.1 — 2015-05-06
- 0.1.0 — 2015-05-06

## README

# swiss-army-eval

Evaluate code from different languages and return JS objects. More versatile and slightly gentler than JavaScript's `eval`.

## Usage
    
```
# Command:                                            # Output:
compile('coffee', '2 + -1')                           # 1
compile("coffee", "(a, b) -> a + b")                  # function(a, b) {return a + b;}
compile("coffee", "(a, b) -> a + b")(2, -1)           # 1

compile('js', "5 - 3")                                # 2
compile("js", "function(a, b) {return a - b;}")       # function(a, b) {return a - b;}
compile("js", "function(a, b) {return a - b;}")(5, 3) # 2

compile("regex", "^[123]+$", "ig")                    # /^[123]+$/gi
compile("regex", "^[123]+$", "ig").exec('3')          # 3
```
  
    
## About

- GitHub: https://github.com/JustinMorgan/swiss-army-eval
- NPM: https://www.npmjs.com/package/swiss-army-eval
- Author: Justin Morgan (https://github.com/JustinMorgan)
- License: Swiss-Army Eval is licensed under the [MIT][mit] license.

[mit]: http://opensource.org/licenses/mit-license.php

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