πŸ‘¨β€πŸ’» ES6: checks whether a value is class
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
.editorconfig
.gitattributes
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

Header of isClass

isclass  ‒  isarrow  ‒  isasync

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

LICENSE

MIT