samesame
Simple, Lightweight type checking of multiple arguments
Table of Contents
About
This module uses the Object.prototype.toString()
method to provide better type checking and supports comparing the types of multiple values.
Install
cdn:
<!-- Or -->
npm or yarn:
$ npm install --save samesame# OR $ yarn add samesame
Usage
const samesame = // true // true // true // false // true // true // true // false // true // true
The module exports a single function
that can take multiple arguments and returns boolean
value.
Supported type strings that can be passed as an argument are:
Array
Object
String
Date
RegExp
Function
Boolean
Number
Null
Undefined
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT