You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
316 B
14 lines
316 B
"use strict";
|
|
|
|
/**
|
|
* Returns a display name for a value from a constructor
|
|
* @param {object} value A value to examine
|
|
* @returns {(string|null)} A string or null
|
|
*/
|
|
function className(value) {
|
|
const name = value.constructor && value.constructor.name;
|
|
return name || null;
|
|
}
|
|
|
|
module.exports = className;
|