0.2.2 • Published 11 years ago

typedjs v0.2.2

Weekly downloads
10
License
-
Repository
github
Last release
11 years ago

node-typedjs

This is the TypedJS module for node.js

TypedJS lets you annotate your JavaScript functions with Haskell-like type signatures and then runs a set of automated tests against those functions.

For more information visit the TypedJS GitHub repo

Install

In your project

npm install typedjs

Globally to check all your projects

npm install typedjs -g

API

Adding single tests and running them

var typedjs = require('typedjs');
typedjs.addTest('foo :: Number -> Number', function foo(n) {
  return n;
});
typedjs.runTests(); // will output to console.log

You can also use a callback if you prefer

typedjs.runTests(function (data) {
  // the data that would've been passed to console.log
  // is sent here instead.
});

Running against a file

var typedjs = require('typedjs');
var path = require('path');
typedjs.runTests(path.join(__dirname, 'myFile.js'), function (data) {
  // this is an optional callback
  // data will be sent to console.log by default.
});

Comes with an executable

$ typedjs your_file.js

Credits

License

MIT-LICENSE

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.0.9

12 years ago

0.0.7

12 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago