{"id":13483,"library":"lodash.isnull","title":"lodash.isnull","description":"lodash.isnull is a standalone npm package providing the `_.isNull` utility function from the Lodash library. This specific package, currently at version 3.0.0, offers the implementation of `_.isNull` as it existed in Lodash v3. While the main Lodash library has advanced to v4.x, this modular package has not seen a corresponding major update, meaning it does not incorporate newer features, bug fixes, or security patches introduced in Lodash v4. It was designed for environments where importing only specific Lodash functions was desirable to reduce bundle size, prior to widespread adoption of `lodash-es` and modern tree-shaking tools. Release cadence for `lodash.isnull` is effectively halted, as its last update was 11 years ago, aligning with the Lodash v3 era. Its primary differentiator is its singular focus on the `isNull` check, offering a minimal footprint if that's the *only* Lodash utility required and you are explicitly targeting Lodash v3 compatibility.","status":"abandoned","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/lodash/lodash","tags":["javascript","lodash","lodash-modularized","stdlib","util"],"install":[{"cmd":"npm install lodash.isnull","lang":"bash","label":"npm"},{"cmd":"yarn add lodash.isnull","lang":"bash","label":"yarn"},{"cmd":"pnpm add lodash.isnull","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package exports `isNull` as the default export for ES Modules. Named imports like `{ isNull }` will fail. For tree-shaking with modern Lodash versions (v4.x+), prefer `import { isNull } from 'lodash-es'` or `import isNull from 'lodash/isNull'`.","wrong":"import { isNull } from 'lodash.isnull'","symbol":"isNull","correct":"import isNull from 'lodash.isnull'"},{"note":"This is the standard CommonJS import pattern. The package is primarily designed for this module system as indicated by its v3.0.0 release date. Ensure you are not in an ESM-only environment if using `require()`.","symbol":"isNull","correct":"const isNull = require('lodash.isnull');"},{"note":"The `lodash.isnull` package exports only the `isNull` function, not the full `_` object. To access `_.isNull` from the main Lodash object, you need to import the entire `lodash` library. Note that `lodash.isnull@3.0.0`'s behavior corresponds to `lodash@3.x`.","wrong":"const _ = require('lodash.isnull'); // Then use _.isNull","symbol":"_","correct":"const _ = require('lodash'); // Then use _.isNull"}],"quickstart":{"code":"import isNull from 'lodash.isnull';\n\nconsole.log('Checking for null values:');\n\nlet value1 = null;\nlet value2 = undefined;\nlet value3 = 0;\nlet value4 = '';\nlet value5 = false;\nlet value6 = {};\n\nconsole.log(`Is value1 (null) null? ${isNull(value1)}`);\nconsole.log(`Is value2 (undefined) null? ${isNull(value2)}`);\nconsole.log(`Is value3 (0) null? ${isNull(value3)}`);\nconsole.log(`Is value4 ('') null? ${isNull(value4)}`);\nconsole.log(`Is value5 (false) null? ${isNull(value5)}`);\nconsole.log(`Is value6 ({}) null? ${isNull(value6)}`);\n\n// Demonstrating CommonJS usage for older environments\nconst isNullCJS = require('lodash.isnull');\nconsole.log(`\\nCJS check: Is null null? ${isNullCJS(null)}`);","lang":"javascript","description":"This quickstart demonstrates how to import and use the `isNull` function from `lodash.isnull` to check if various values are strictly `null` in both ES Module and CommonJS contexts."},"warnings":[{"fix":"For new projects or compatibility with Lodash v4.x+, consider using `import { isNull } from 'lodash-es'` for tree-shaking, or `import { isNull } from 'lodash'` if you're comfortable with the full library import. Alternatively, use native `value === null` for a strict null check.","message":"This `lodash.isnull` package is version `3.0.0`, corresponding to the `lodash v3` era. The main `lodash` library is currently at `v4.x` and has significant breaking changes between v3 and v4. Using `lodash.isnull@3.0.0` alongside a `lodash v4.x` installation (or `lodash-es`) may lead to inconsistent behavior if `_.isNull`'s implementation changed, or simply mean you're missing bug fixes and new features from the modern Lodash version.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Switch to `import { isNull } from 'lodash-es'` for projects using ES Modules and modern bundlers (like Webpack 4+ or Parcel), or `import isNull from 'lodash/isNull'` if you prefer to import from the main `lodash` package.","message":"The modular `lodash.*` packages like `lodash.isnull` are largely superseded. For modern JavaScript environments, `lodash-es` is the recommended way to import individual Lodash functions with efficient tree-shaking, resulting in smaller bundle sizes. Direct imports like `import isNull from 'lodash/isNull'` (which requires installing the main `lodash` package) also provide tree-shakable benefits with modern bundlers.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Always use `import isNull from 'lodash.isnull'` when importing this specific package as an ES Module. If you need named imports, consider `lodash-es` instead (`import { isNull } from 'lodash-es'`).","message":"This package exports `isNull` as a default export in ES Module contexts (e.g., `import isNull from 'lodash.isnull'`). Attempting to use a named import (`import { isNull } from 'lodash.isnull'`) will result in an error, as there is no named export for `isNull`.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Migrate away from `lodash.isnull@3.0.0` to ensure your application benefits from current security patches. The recommended approach is to use `lodash-es` or direct imports from `lodash` (v4.18.1 or higher) to ensure you are on a securely maintained version of the library. Alternatively, consider using the native JavaScript strict equality check `value === null` which provides the same core functionality and eliminates the dependency.","message":"Several security vulnerabilities, including prototype pollution and arbitrary code injection, have been identified and patched in `lodash v4.x`. As `lodash.isnull@3.0.0` is based on `lodash v3`, it will not receive these critical security updates. While `_.isNull` itself is a simple function and might not directly expose these vulnerabilities, relying on an outdated `lodash` version can pose broader security risks in your application's dependency tree.","severity":"gotcha","affected_versions":"<4.18.1 (for main lodash)"}],"env_vars":null,"search_vec":"'11':113 '3.0.0':23 'adopt':90 'advanc':41 'ago':115 'align':116 'bug':61 'bundl':85 'cadenc':102 'check':132 'compat':152 'correspond':51 'current':20 'design':72 'desir':82 'differenti':124 'effect':106 'environ':74 'era':121 'es':94 'exist':31 'explicit':148 'featur':60 'fix':62 'focus':128 'footprint':136 'function':12,80 'halt':107 'implement':26 'import':76 'incorpor':58 'introduc':66 'isnul':10,28,131 'javascript':153 'last':110 'librari':16,39 'lodash':15,33,38,68,79,93,119,142,150,154,156 'lodash-':92 'lodash-modular':155 'lodash.isnull':1,2,104 'main':37 'major':52 'mean':54 'minim':135 'modern':96 'modular':45,157 'newer':59 'npm':6 'offer':24,133 'packag':7,19,46 'patch':65 'primari':123 'prior':87 'provid':8 'reduc':84 'releas':101 'requir':144 'secur':64 'seen':49 'shake':99 'singular':127 'size':86 'specif':18,78 'standalon':5 'stdlib':158 'target':149 'tool':100 'tree':98 'tree-shak':97 'updat':53,111 'util':11,143,159 'v3':34,120,151 'v4':69 'v4.x':43 'version':22 'widespread':89 'year':114","created_at":"2026-04-20T01:54:43.722236+00:00","updated_at":"2026-04-20T01:54:43.722236+00:00","problems":[{"fix":"Change the import statement to `import isNull from 'lodash.isnull';`","cause":"Attempting to import `isNull` as a named export (`import { isNull } from 'lodash.isnull'`) when it is provided as a default export.","error":"TypeError: lodash_isnull_1.isNull is not a function"},{"fix":"For ES Module environments, use `import isNull from 'lodash.isnull';`. If targeting modern Lodash features, consider `import { isNull } from 'lodash-es';`.","cause":"Using `require('lodash.isnull')` in an ES Module environment without a compatibility layer or proper transpilation.","error":"ReferenceError: require is not defined"},{"fix":"Review your `package.json` and `npm ls lodash` (or `npm ls lodash.isnull`) to identify which dependencies are pulling in outdated `lodash` versions. Update those dependencies or, if possible, upgrade to `lodash-es` or the latest `lodash` package (v4.18.1 or higher) directly.","cause":"This warning indicates that an older, unmaintained version of the *main* `lodash` library (or one of its modular packages from the same era) is being used. While this specific `lodash.isnull` package is at `3.0.0`, this warning refers to dependencies that might pull in even older `lodash` versions, highlighting the general issue of outdated `lodash` usage.","error":"npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://lodash.com/","github":"https://github.com/lodash/lodash","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/lodash.isnull","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}