JSPM

  • Created
  • Published
  • Downloads 1043254
  • Score
    100M100P100Q178233F
  • License MIT

Argument type validation

Package Exports

  • ow

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ow Build Status

Argument type validation

Install

$ npm install ow

Usage

const ow = require('ow');

const unicorn = input => {
    ow(input, ow.string.minLength(5)););

unicorn(3);
//=> ArgumentError: Expected argument to be of type `string` but received type `number`

unicorn('yo');
//=> ArgumentError: Expected string length to be minimum 10

License

MIT © Sindre Sorhus