0.0.1 • Published 2 years ago
get-constructor-name v0.0.1
get-constructor-name
Get the Name of a JavaScript Function's Constructor. Returns String or Undefined.
features
- guaranteed to return string or undefined
- doesn't throw errors
install
npm install get-constructor-name
usage
import getConstructorName from "get-constructor-name";
const arrayBuffer = new ArrayBuffer();
getConstructorName(arrayBuffer) // ArrayBuffer
getConstructorName(100) // undefined
getConstructorName(null) // undefined
0.0.1
2 years ago