毕设专用git仓库
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.
 
 
 
 
 
 

9 lines
381 B

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');
}