otype

Get the type of any object

Usage no npm install needed!

<script type="module">
  import otype from 'https://cdn.skypack.dev/otype';
</script>

README

otype

Travis (.com) codecov coverage npm semantic-release

Motivation

Reuse

Installation

$ npm install --save otype

Usage

const otype = require("otype");

console.log(otype(1)); // Outputs: "Number"
console.log(otype(Null)); // Outputs: "Null"
console.log(otype()); // Outputs: "Undefined"
console.log(otype("a", true, Symbol("sym"))); // Outputs: ["String", "Boolean", "Symbol"]

License

MIT © wmik