Registry / lodash.isundefined

lodash.isundefined

JSON →
library3.0.1jsnpmunverified

This package, `lodash.isundefined` (version 3.0.1), provides the `_.isUndefined` utility function from the Lodash library as a standalone Node.js CommonJS module. It is designed to check if a value is strictly `undefined`, returning `true` for `undefined` and `false` for all other values, including `null`. While the main Lodash library is actively maintained and currently at version 4.18.x with frequent releases, this specific modular package has not been updated since its 3.0.1 release, aligning with Lodash v3.x. Its key differentiator was providing a lightweight option compared to importing the entire Lodash library, but modern bundlers often make `lodash-es` (or direct `lodash` imports with tree-shaking) a more efficient alternative for specific functions.

npm install lodash.isundefined
INSTALL
IMPORT
SIG · LODASH.ISUNDEFINED
L
lodash.isundefined
javascriptv3.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

isUndefined
const isUndefined = require('lodash.isundefined');
import isUndefined from 'lodash.isundefined';
This package (v3.0.1) is CommonJS-only and does not support ES module imports directly. For ES modules, import from `lodash-es` or the main `lodash` package.
isUndefined (modern ES)
import { isUndefined } from 'lodash-es';
import { isUndefined } from 'lodash.isundefined';
For modern applications using ES modules and tree-shaking, importing `isUndefined` directly from `lodash-es` is the recommended approach for Lodash v4+.
isUndefined (modern CJS)
const { isUndefined } = require('lodash');
const isUndefined = require('lodash.isundefined');
For current Node.js environments (Lodash v4+), it's more common to import the named function from the main `lodash` package instead of using the older `lodash.isundefined` module.

Demonstrates how to import `isUndefined` using CommonJS and check various values for being strictly undefined.

const isUndefined = require('lodash.isundefined'); const value1 = undefined; const value2 = null; const value3 = 'hello'; const value4 = {}; console.log(`Is value1 (${value1}) undefined? ${isUndefined(value1)}`); // true console.log(`Is value2 (${value2}) undefined? ${isUndefined(value2)}`); // false console.log(`Is value3 ('${value3}') undefined? ${isUndefined(value3)}`); // false console.log(`Is value4 (${JSON.stringify(value4)}) undefined? ${isUndefined(value4)}`); // false // Demonstrating the equivalent with modern Lodash v4+ // This would typically involve installing 'lodash' or 'lodash-es' // const { isUndefined: modernIsUndefined } = require('lodash'); // console.log(`Modern check: Is value1 undefined? ${modernIsUndefined(value1)}`);
Debug
Known issues
breakingThis `lodash.isundefined` package is locked at version 3.0.1, which corresponds to Lodash v3.x. The main Lodash library transitioned to v4.0.0 with significant breaking changes. Relying on this older version means you are not compatible with modern Lodash's API or benefits.
fix
Migrate to using `isUndefined` directly from the `lodash` (CommonJS) or `lodash-es` (ES Modules) packages, which are at v4.x and are actively maintained and updated.
affects: <=3.0.1
deprecatedStandalone modular packages like `lodash.isundefined` have largely been superseded by native JavaScript features (`typeof value === 'undefined'`) or by modern bundler capabilities (tree-shaking) when importing from the main `lodash` or `lodash-es` packages. This package itself is not actively maintained.
fix
For checking `undefined`, consider using the native `typeof value === 'undefined'` or import `isUndefined` from the full `lodash` or `lodash-es` package for better long-term support and integration.
affects: >=3.0.1
gotchaThe phrase 'modern build' in the README refers to the modularization approach at the time of Lodash v3, not to being compatible or up-to-date with the latest Lodash v4 releases. This can be misleading for new users.
fix
Always check the actual version number and the parent library's current status and release history. For up-to-date Lodash utilities, prefer the main `lodash` or `lodash-es` packages.
affects: >=3.0.1
gotchaWhile `isUndefined` itself is a simple utility, using an older v3.0.1 package means missing out on general bug fixes, performance improvements, and security patches that have been applied to the core `lodash` library since its v4 release. Although no direct security vulnerabilities for `isUndefined` are known, general library health is a factor.
fix
Adopt the latest versions of `lodash` or `lodash-es` to benefit from ongoing maintenance and security updates across the entire library.
affects: <=3.0.1
Errors
Common errors & fixes
TypeError: isUndefined is not a function
Attempting to use ES module import syntax (`import`) for the CommonJS-only `lodash.isundefined` v3.0.1 package in an environment that enforces strict module types.
fix
Use CommonJS `require`: `const isUndefined = require('lodash.isundefined');`. Alternatively, use `import { isUndefined } from 'lodash-es';` if you need ES module syntax and are using Lodash v4+.
ReferenceError: require is not defined
Attempting to use `require('lodash.isundefined')` in an ES Module context (e.g., a file with `"type": "module"` in `package.json` or `.mjs` extension) without proper transpilation or loader configuration.
fix
If working in an ES Module environment, use `import { isUndefined } from 'lodash-es';` or `import { isUndefined } from 'lodash';` (for v4+). If you must use `require` in an ESM context, you might need a wrapper or dynamic import: `const isUndefined = await import('lodash.isundefined')).default;` (though not directly applicable here as it exports a single function, not a default object).
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
lodash.isundefined — npm install lodash.isundefined · libregistry