type-component

Cross-browser type assertions (less broken typeof)

npm install type-component
69 downloads in the last day
590 downloads in the last week
1 691 downloads in the last month
# type

  Type assertions aka less-broken `typeof`.

## Example

```js
var type = require('type');

var obj = new Date;
if (type(obj) == 'date') ...
```

## API

```js
type(new Date) == 'date'
type({}) == 'object'
type(null) == 'null'
type(undefined) == 'undefined'
type("hey") == 'string'
type(true) == 'boolean'
type(false) == 'boolean'
type(12) == 'number'
type(type) == 'function'
type(/asdf/) == 'regexp'
type((function(){ return arguments })()) == 'arguments'
type([]) == 'array'
```

## License

  MIT
npm loves you