This package has been deprecated

Author message:

1.0.0

betype
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i betype

Weekly Downloads

4

Version

1.0.2

License

ISC

Last publish

Collaborators

  • wycliffe-peart