node/tools/eslint/node_modules/@babel/helpers/lib/helpers/isNativeFunction.js
Node.js GitHub Bot 3ad38e4938
tools: update eslint to 9.7.0
PR-URL: https://github.com/nodejs/node/pull/53839
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-16 00:33:10 +00:00

15 lines
335 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _isNativeFunction;
function _isNativeFunction(fn) {
try {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
} catch (_e) {
return typeof fn === "function";
}
}
//# sourceMappingURL=isNativeFunction.js.map