Checks if the given value is a native function.
$ npm install --save is-native
var isNative = require('is-native');
var obj = { a: 1 };
var arr = [1, 2, 3];
isNative(obj.valueOf); // => true
isNative(arr.push); // => true
isNative(Math.min); // => true
isNative(console.log); // => true
isNative(function () { console.log(123); });
// => false
isNative(); // => false
isNative(obj); // => false
isNative(arr); // => false
isNative(/x/); // => false
isNative(new Date); // => false
isNative(new Error); // => false
- to-source-code - Converts function to its source code.
- is-nil - Checks if the given value is null or undefined.
- is-null - Checks if the given value is null.
- is-window - Checks if the given value is a window object.
- is-index - Checks if the given value is a valid array-like index.
- is-length - Checks if the given value is a valid array-like length.
- is-array-like - Checks if the given value is an array or an array-like object.
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.