2.0.1 • Published 4 years ago
oh-my-type v2.0.1
Oh-My-Type
Oh my type! Tiny and robust type checker.
Installing
NPM:
npm install oh-my-type
Yarn:
yarn add oh-my-type
Importing
Using ES6 imports:
import type from 'oh-my-type';
Using CommonJS requires:
const type = require('oh-my-type');
Using
type('string'); // String
type(123); // Number
type(false); // Boolean
type(undefined); // Undefined
type(null); // Null
type(NaN); // NaN
type({}); // Object
type([]); // Array
type(Symbol()); // Symbol
type(() => {}); // Function
type(new Date()); // Date
type(); // Undefined