1.0.2 • Published 6 years ago

betype v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Betype

Betype is a basic JavaScript type checking package. That validate a value against a list of types and evaluate to true if any of the given value evaluate to true.

  • Version 1.0.0

Installation

npm install betype --save

Betype Functions

valueBeType(value, ...types);

instanceBeType(instance, ...types);

Examples

var {valueBeType} = require("betype");

const checkValueType = valueBeType("Wycliffe Peart", "string");

console.log(checkValueType);

Output => true
var {instanceBeType} = require("betype");

const checkInstanceType = instanceBeType({}, Object);

console.log(checkInstanceType);

Output => true
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago