specs-scalar
v0.1.0
Published
scalar specs module
Downloads
5
Readme
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).