# shakti-node

> Call shakti code from inside node and get result back into node.

Latest version **0.0.6** (published 2020-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install shakti-node
pnpm add shakti-node
yarn add shakti-node
bun add shakti-node
```

## 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.6 |
| Published | 2020-01-11 |
| First published | 2020-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 13.4 |
| Dependencies | 5 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | richardgill |

## Links

- npm: https://www.npmjs.com/package/shakti-node
- Repository: https://github.com/quicktick/shakti-node
- npm.io page: https://npm.io/package/shakti-node

## Dependencies (5)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.3
- [@kparc/k](https://npm.io/package/@kparc/k.md) ^1.2.0

## Recent versions

- 0.0.6 (latest) — 2020-01-11
- 0.0.5 — 2020-01-10
- 0.0.4 — 2020-01-10
- 0.0.3 — 2020-01-10
- 0.0.2 — 2020-01-10
- 0.0.1 — 2020-01-10

## README

# shakti-node

Run [Shakti](https://shakti.com/) code and get the results inside node.

[![CircleCI](https://circleci.com/gh/quicktick/shakti-node/tree/master.svg?style=svg)](https://circleci.com/gh/quicktick/shakti-node/tree/master)


```
runShakti('result: 1 2 3')
# [1,2,3]
```

Assign your output to a variable `result` in your shakti code.

Any shakti errors are thrown in node

## Usage

Import it:

```
const { runShakti } = require('shakti-node')
// or
import {runShakti} from 'shakti-node'
```

and then:

```
runShakti('result: 1 2 3')
# [1,2,3]
```

```
runShaktiFromFile('./myFile.k')
```

```
runShaktiCommand('result: 1 2 3')
# {stderror: '', stdout: '', code: 1}
```

```
runShakti('`hello + 1')
# throws type error
```

## Common errors

### `Error: No valid exports main found for`

You need to run your program with `--experimental-conditional-exports` flag passed to node.

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