Registry / serialization / lodash._objecttypes

lodash._objecttypes

JSON →
library2.4.1jsnpmunverified

This package, `lodash._objecttypes`, is an internal utility module extracted from Lo-Dash v2.4.1, released in December 2013. It provided the `objectTypes` variable, an internal structure used by Lo-Dash's core functions for type checking (e.g., `isObject`, `isPlainObject`). It was part of Lo-Dash's modularization strategy in its second major version, where internal components and methods were published as separate npm packages. However, this specific package is not intended for direct external consumption and its internal structure, existence, and API stability were never guaranteed. The main Lodash library has since evolved significantly, with the current stable version being 4.18.1 (as of April 2026), and its internal modularization and distribution methods (like `lodash-es` for ES modules) have changed considerably. This package is no longer maintained as a standalone entity and its functionality is integrated or superseded within modern Lodash versions. Its primary historical differentiator was serving as a foundational internal piece of the Lodash v2 type-checking mechanism.

npm install lodash._objecttypes
INSTALL
IMPORT
SIG · LODASH._OBJECTTYPE
L
lodash._objecttypes
serializationjavascriptv2.4.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.

objectTypes
const objectTypes = require('lodash._objecttypes');
import objectTypes from 'lodash._objecttypes';
This package is CommonJS-only from Lodash v2.x. Attempting to use ES module `import` syntax will result in errors as it does not export a default or named exports in that format.
objectTypes
const objectTypes = require('lodash._objecttypes'); // Then use objectTypes for internal checks, e.g., objectTypes[typeof value]
const objectTypes = require('lodash._objecttypes')();
The `objectTypes` export is an object, not a function. Calling it as a function will result in a TypeError.
type checks
// Prefer using official Lodash methods like _.isObject, _.isString, etc., from the main 'lodash' package. const _ = require('lodash'); _.isObject({});
const internalTypes = require('lodash._objecttypes'); if (internalTypes[typeof myVar]) { /* ... */ }
This package exports internal details. For type checking, always use the robust, public API functions provided by the main `lodash` package, which are properly maintained and handle edge cases.

Demonstrates the CommonJS import and the structure of the `objectTypes` object, illustrating its internal purpose in Lodash v2.

const objectTypes = require('lodash._objecttypes'); // In Lodash v2, 'objectTypes' was used internally for quick type checks. // It typically mapped JavaScript's `typeof` results to booleans. // For example, to check if a value was an 'object' or 'function'. console.log('--- lodash._objecttypes example ---'); console.log('Object types map:', objectTypes); // Example of how it might have been used internally (simplified): function isObjectLike(value) { return objectTypes[typeof value] === true; } console.log(`isObjectLike(null): ${isObjectLike(null)}`); // null is 'object' via typeof console.log(`isObjectLike({}): ${isObjectLike({})}`); console.log(`isObjectLike([]): ${isObjectLike([])}`); console.log(`isObjectLike(() => {}): ${isObjectLike(() => {})}`); console.log(`isObjectLike(123): ${isObjectLike(123)}`); // Note: For actual Lodash usage, always use the main 'lodash' package: // const _ = require('lodash'); // console.log(`_.isObjectLike({}): ${_.isObjectLike({})}`);
Debug
Known issues
breakingThis package is an internal utility from Lodash v2.x (released 2013). Its structure, content, and very existence are not stable and are subject to change or removal without notice in any modern Lodash version (v3, v4, or later). Directly depending on it will almost certainly lead to breakage.
fix
Do not use internal Lodash packages. Rely solely on the public API of the main `lodash` package or its officially modularized versions (e.g., `lodash-es`).
affects: >=3.0.0
deprecatedThe entire pattern of exposing granular internal Lodash components as separate npm packages (like `lodash._objecttypes`) has been deprecated. Modern Lodash (v4.x) integrates such utilities internally or provides ES module versions via `lodash-es` for tree-shaking.
fix
Migrate any direct usage to public Lodash API methods. If you are examining Lodash internals, refer to the source code of the main `lodash` repository for the relevant version.
affects: >=2.5.0
gotchaLodash v2.4.1, which this package is tied to, is affected by numerous known security vulnerabilities (e.g., Prototype Pollution, Code Injection, Regular Expression Denial of Service) that have been patched in later versions of the main `lodash` library. Using any code derived from such an old version, even an internal utility, introduces significant security risks.
fix
Upgrade to the latest stable version of the main `lodash` package (currently 4.18.1 or higher) and leverage its public API. Do not use unmaintained internal modules.
affects: <4.18.1
gotchaThis package is strictly CommonJS (`require()`). It does not provide ES module exports (`import`). Attempting to `import` it will result in syntax errors or runtime issues in modern JavaScript environments unless transpiled.
fix
If you absolutely must inspect or use this internal module (which is strongly discouraged), use `const objectTypes = require('lodash._objecttypes');`.
affects: >=2.4.1
Errors
Common errors & fixes
TypeError: (0, _lodash_objecttypes.default) is not a function
Attempting to use ES module `import objectTypes from 'lodash._objecttypes';` or `import { default as objectTypes } from 'lodash._objecttypes';` when the package is CommonJS and does not have a default export.
fix
Use CommonJS `require` syntax: `const objectTypes = require('lodash._objecttypes');`
Error: Cannot find module 'lodash._objecttypes'
Trying to import this package in a modern Lodash setup, where it is no longer published or included, or if the package manager cannot resolve the ancient version.
fix
This package is abandoned and not part of modern Lodash. Do not use it. Instead, use the public API of the main `lodash` package (e.g., `_.isObjectLike`) or `lodash-es` if you need modular ES imports.
TypeError: require(...) is not a function
After `const objectTypes = require('lodash._objecttypes');`, attempting to call `objectTypes()` as a function. The `objectTypes` variable is an object, not a function.
fix
Access properties of `objectTypes` directly, e.g., `objectTypes[typeof myVar]`. Do not call it as a function.
Upgrade
Version history
2.4.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources