(fn: unknown)
| 47 | |
| 48 | const NATIVE_FUNCTION_REGEX = /^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/ |
| 49 | function isNativeFunction(fn: unknown): fn is AnyFunction { |
| 50 | return typeof fn === 'function' && NATIVE_FUNCTION_REGEX.test(fn.toString()) |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Create a proxy that overlays one object (`overlay`) on top of another (`target`). |