x-is-function is a minimalist JavaScript utility designed to accurately determine if a given value is of the type 'function'. As of its latest version 1.0.4, published in 2015, the package is considered abandoned, with no active maintenance or release cadence. It provides a single, dependency-free export, `isFunction`, which performs a basic `typeof value === 'function'` check. Its primary differentiation from more comprehensive utility libraries or direct `typeof` checks in modern JavaScript environments is its historical position as part of a family of single-purpose `x-is-...` modules, emphasizing a focused, tiny API surface for specific type checks. Due to its age, it is primarily a CommonJS module.
npm install x-is-functionVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and use `x-is-function` to check various JavaScript values, including functions, primitives, and objects, confirming its boolean return type.
Prefer `typeof value === 'function'` or use a modern, actively maintained utility library.
For specific function types, use more detailed checks like `value instanceof Function` combined with `Object.prototype.toString.call(value)` or specific `instanceof` checks for async/generator functions if available in your environment.
When using in a pure ESM Node.js environment, consider using `await import('x-is-function')` (which dynamically imports CJS) or stick to `typeof` directly. For browser applications, ensure your bundler properly transpiles and resolves CJS modules.Use `const isFunction = require('x-is-function');` for CommonJS or `import isFunction from 'x-is-function';` for ES Modules (via bundler).For browser usage, use a bundler (like Webpack, Rollup, Parcel) to process the CommonJS module. For pure ESM Node.js, consider `await import('x-is-function')` or rewrite to use `typeof` directly.No dependency data recorded yet.