0.0.5 • Published 5 years ago

wtf-is-this v0.0.5

Weekly downloads
29
License
MIT
Repository
github
Last release
5 years ago

WTF is this?

wtf-is-this is a basic JS validation and helper library

Why?

We tried different packages while building our apps, eventually we find out either those are too big or to limited for us to use..

Installation

yarn add wtf-is-this or npm install wtf-is-this --save

Usage

import is from "wtf-is-this" or import { isString } from "wtf-is-this"

Available Helpers

Depends on how you import...

is.string(val) or isString(val)

is.object(val) or isObject(val)

is.date(val) or isDate(val)

is.fn(val) or isFunction(val)

is.array(val) or isArray(val)

is.float(val) or isFloat(val)

is.integer(val) or isInteger(val)

is.number(val) or isNumber(val)

is.regexp(val) or isRegExp(val)

is.boolean(val) or isBoolean(val)

is.empty(val) or isEmpty(val)

is.ISO8601(val) or isISO8601(val)

is.color(val) or isColor(val)

is.null(val) or isNull(val)

method names explains themselves...


Contribute

Pull requests are welcome and please submit bugs 🐛.

Contact