0.0.6 • Published 6 years ago
shakti-node v0.0.6
shakti-node
Run Shakti code and get the results inside node.
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 errorCommon errors
Error: No valid exports main found for
You need to run your program with --experimental-conditional-exports flag passed to node.