be-of-type

0.0.0 • Public • Published

be-of-type

build status AppVeyor Build Status JavaScript Style Guide


Basic type assertions.


Get it

npm install --save be-of-type

Usage

Most useful as a set of building blocks for setting up narrow and targeted type assertions.

const be = require('be-of-type')
const is = {
  bool: be.boolean,
  buffer: be.buffer,
  nonEmptyStringArray: x => be.array(x) && x.length && x.every(be.string),
  pojo: be.plainObject,
  uInt: x => be.number(x) && x >= 0 && x % 1 === 0
}
 
/*...*/

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i be-of-type

Weekly Downloads

3

Version

0.0.0

License

MIT

Last publish

Collaborators

  • chiefbiiko