Skip to content

wbhob/is-constructor

Repository files navigation

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 */);

About

A little utility to check if an object is a constructor

Resources

Stars

Watchers

Forks

Packages

No packages published