iching-broker-level1/node_modules/@sinonjs/commons/lib/class-name.js
Christopher Hase 323cea883d
All checks were successful
ci / build (push) Successful in 1m14s
unit tests part 3
2025-03-31 14:27:20 +02:00

13 lines
316 B
JavaScript

"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;