specs-scalar

scalar specs module

npm install specs-scalar
2 downloads in the last week
4 downloads in the last month

Scalar Specs

Basic module to test equality against scalar types in specs.

Scalar types are : null, boolean, number and string.

Install

npm install specs-scalar

Usage

var assert = require('assert');
var specs = require('specs');

var engine = specs.engine('object', 'array', 'scalar');

var spec = engine.compile(42);

assert(spec(42));

the object and array modules are not strictly required, only the {} and [] analysers are (see test.js for a standalone example).

npm loves you