typedas

Determines the type of a variable

typedAs provides a few methods that help determine the type of a given variable. It's fast, easy to use and does nothing more than what is advertised (which is another way of saying that you will not load methods you don't actually need if all you want to do is check for variable types).

Install

$ npm install typedAs

<script src="typedAs.js"></script>

Methods

The methods available are very self-explanatory:

.isString(foo)

.isBool(foo)

.isNumber(foo)

.isInteger(foo)

.isFloat(foo)

.isArray(foo)

.isObject(foo)

.isFunction(foo)

.isUndefined(foo)