q9
This commit is contained in:
9
node_modules/loupe/lib/function.js
generated
vendored
Normal file
9
node_modules/loupe/lib/function.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { truncate } from './helpers.js';
|
||||
export default function inspectFunction(func, options) {
|
||||
const functionType = func[Symbol.toStringTag] || 'Function';
|
||||
const name = func.name;
|
||||
if (!name) {
|
||||
return options.stylize(`[${functionType}]`, 'special');
|
||||
}
|
||||
return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, 'special');
|
||||
}
|
||||
Reference in New Issue
Block a user