variable-type-check

check type of variable

Usage no npm install needed!

<script type="module">
  import variableTypeCheck from 'https://cdn.skypack.dev/variable-type-check';
</script>

README

About

Check the variable type, it's return boolean value (true/false)

Installation

Use the package variable-type-check

npm install variable-type-check

Usage

const typecheck = require('variable-type-check');
/* Pass inside the two params 1st your value and in second it's real type,
it will return a boolean value.
*/ 
typecheck("x", 'String'); // true
typecheck(10, 'String'); // false

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.