yak-lang

1.0.3 • Public • Published

Yak

Yak is the first language of the funject paradigm. If you don't know about it, read about it. The yak-lang module gives you a full Yak interpreter.

Installing

$ npm install yak-lang

Usage

var yak = require('yak-lang');

You can evaluate strings of Yak:

yak.eval('print["Hello, Yak!"]');

Or evaluate entire files:

yak.evalFile('./awesomeness.yak', function (err, result) {
...
});

Both eval and evalFile pass their callbacks any errors and a JavaScript object representing the last Yak expression.

You can also use their synchronous cousins evalSync and evalFileSync:

yak.evalFileSync('./app.yak');

Import

In Yak you can access the require-like funject import:

import['./another.yak']

In another.yak you have access to the require-esque exports:

exports.foo = 'bar'

exports[Math.sin[@x]] := Math.cos[@x]

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i yak-lang

      Weekly Downloads

      0

      Version

      1.0.3

      License

      none

      Last publish

      Collaborators

      • willmurphy