is-es-class

0.1.2 • Public • Published

is-es-class

Coverage Status build status

Social Media Photo by Markus Winkler on Unsplash

The only reasonable way to understand if a class has been defined, or transpiled, as such.

Explained in this StackOverflow answer.

// const isESClass = require('is-es-class');
import isESClass from 'is-es-class';

isESClass(class {});        // ✅
isESClass(function () {});  // ❌
isESClass(() => {});        // ❌
isESClass({m(){}}.m);       // ❌

Readme

Keywords

Package Sidebar

Install

npm i is-es-class

Weekly Downloads

21

Version

0.1.2

License

ISC

Unpacked Size

3.23 kB

Total Files

6

Last publish

Collaborators

  • webreflection