mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-27 12:14:45 +01:00
10 lines
340 B
JavaScript
10 lines
340 B
JavaScript
import getFunctionName from 'get-func-name'
|
|
import { truncate } from './helpers'
|
|
|
|
export default function inspectFunction(func, options) {
|
|
const name = getFunctionName(func)
|
|
if (!name) {
|
|
return options.stylize('[Function]', 'special')
|
|
}
|
|
return options.stylize(`[Function ${truncate(name, options.truncate - 11)}]`, 'special')
|
|
}
|