EASYAIuniappNewUI/node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_toSource.ts
2025-02-08 18:50:38 +08:00

15 lines
274 B
TypeScript

const funcProto = Function.prototype
const funcToString = funcProto.toString
export function toSource(func: any) {
if (func != null) {
try {
return funcToString.call(func)
} catch (e) {}
try {
return `${func}`
} catch (e) {}
}
return ''
}