isclass
v1.0.0
Published
Checks whether a value is class
Downloads
16
Maintainers
Readme
What it's for?
This is Node.js library that checks whether a value is class
Install
npm:
$ npm install isclass --save
yarn:
$ yarn add isclass
Example
const isClass = require('isclass');
console.log(isClass("hello world")); // > false
console.log(isClass(function() {})); // > false
console.log(isClass(async function() {})); // > false
console.log(isClass(class {})); // > true
console.log(isClass(() => {})); // > false
console.log(isClass(async () => {})); // > false
console.log(isClass(123)); // > false
console.log(isClass({})); // > false
console.log(isClass([])); // > false