Home

Awesome

abbrev-kindof npmjs.com The MIT License

Use abbreviations for checking type of given value. Like kindof(val, 'soa') to check that value is string, object or array.

code climate standard code style travis build status coverage status dependency status

Install

npm i abbrev-kindof --save

Usage

For more use-cases see the tests

const abbrevKindof = require('abbrev-kindof')

abbrevKindof

Check type of a val with abbreviations.

Params

Example

// `soa` here means - string, object or array
abbrevKindof(123, 'soa')          //=> false
abbrevKindof('foo bar', 'soa')    //=> true
abbrevKindof({a: 123}, 'soa')     //=> true
abbrevKindof(['c', 'd'], 'soa')   //=> true

Available abbreviations

Using map-types

Related Libs

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github