decord/source/196_isNativeFunction.js

29 lines
761 B
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 196
// Function ID: 197
// Name: isNativeFunction
// Dependencies: []
// Module 196 (isNativeFunction)
2026-08-04 21:03:28 +00:00
arg5.isNativeFunction = function isNativeFunction(fn) {
let tmp = typeof fn === "function";
if (typeof fn === "function") {
let str = fn.toString();
2026-07-29 08:29:29 +00:00
str = "[native code]";
tmp = str.indexOf("[native code]") > -1;
}
return tmp;
};
arg5.hasNativeConstructor = function hasNativeConstructor(arg0, GeneratorFunction) {
let str = Object.getPrototypeOf(arg0).constructor;
let tmp = str.name === GeneratorFunction;
if (tmp) {
2026-08-04 21:03:28 +00:00
let tmp2 = typeof str === "function";
if (typeof str === "function") {
2026-07-29 08:29:29 +00:00
str = str.toString();
tmp2 = str.indexOf("[native code]") > -1;
}
tmp = tmp2;
}
return tmp;
};