Skip to content

Use BType in your Node projects for fun and profit

Notifications You must be signed in to change notification settings

mattbasta/btype-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

btype-hook

A way to use BType seamlessly in your Node project.

Installing

npm install --save btype-hook
require('btype-hook');

Usage

Just require() BType files from your JavaScript.

# fib.bt
func int:main() {
    func int:fib(int:n) {
        if (n < 2) {
            return n;
        } else {
            return fib(n - 1) + fib(n - 2);
        }
    }

    return fib(10);
}
export main;

// index.js

// You only need to do this once.
require('btype-hook');

// Require a .bt file
var module = require('./myBTypeModule.bt');
// All of the exports are available on the module.
module.main(); // 55

About

Use BType in your Node projects for fun and profit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published