@seeessence/unit
Version:
```bash npm install seeessence/unit ```
22 lines (19 loc) • 504 B
JavaScript
var unit = require('./index.js');
var assert = require('assert');
unit('hello world').pipe(
unit('hello world'),
unit(/^hello.?world$/),
unit('hello world', 'message'),
unit.not({hello: 'world'}),
unit.not(null),
unit(null)
);
unit({hello: 'world'}).pipe(
unit({hello: 'world'}),
unit(function(object) {
assert.ok(object.hasOwnProperty('hello'));
}),
unit.not('hello world'),
unit.not(/^hello.?world$/),
unit.not('hello world', 'not message')
);