1.0.2 • Published 6 years ago

is-constructor v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

is-constructor

This is a utility I wrote to deem if something is a constructor. It's checks are fairly verbose, so I'd welcome the opportunity to see PRs with suggestions on better checking if something is a constructor.

Usage

ES5/NodeJS:

var isConstructor = require('is-constructor');

isConstructor(/* your thing to test */);

ES6/TypeScript:

import * as isConstructor from 'is-constructor';

isConstructor(/* your thing to test */);