Socket
Socket
Sign inDemoInstall

yak-lang

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yak-lang

The first language of the funject paradigm.


Version published
Maintainers
1
Install size
88.1 kB
Created

Readme

Source

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]

FAQs

Last updated on 18 Aug 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc