@doubco/wtf
is a basic JS validation and helper library
We tried different packages while building our apps, eventually we find out either those are too big or to limited for us to use..
yarn add @doubco/wtf
or npm install @doubco/wtf --save
import is from "@doubco/wtf"
or import { isString } from "@doubco/wtf"
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 explain themselves...
Pull requests are welcome and please submit bugs 🐛.
- Follow @doubco on Twitter
- Follow @doubco on Instagram
- Email mailto:[email protected]