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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
baseCreate
✓ const baseCreate = require('lodash._basecreate');
This package is a CommonJS module from Lodash v3, primarily for internal use.
baseCreate (ESM default)
✓ /* Not directly supported for this legacy CJS module. */
✗ import baseCreate from 'lodash._basecreate';
ESM imports are generally not supported for this specific legacy CommonJS package version (3.0.3) and direct use is discouraged in modern environments.
baseCreate (ESM named)
✓ /* Not directly supported for this legacy CJS module. */
✗ import { baseCreate } from 'lodash._basecreate';
This package exports a single function as the module.exports object in CJS, not named exports. Attempting named ESM imports will fail.
Demonstrates how to use the `baseCreate` function to create new objects with a specified prototype, similar to `Object.create`.
const baseCreate = require('lodash._basecreate');
// Define a prototype object
const animalPrototype = {
type: 'mammal',
sound: 'roar',
makeSound: function() {
console.log(this.sound);
},
greet: function() {
console.log(`Hello, I am a ${this.type} and I say ${this.sound}!`);
}
};
// Create a new object with animalPrototype as its prototype
const lion = baseCreate(animalPrototype);
// Add properties specific to the lion
lion.name = 'Simba';
lion.sound = 'ROAR!';
// Verify the prototype chain and properties
console.log(`Lion's name: ${lion.name}`);
console.log(`Lion's type (from prototype): ${lion.type}`);
lion.makeSound();
lion.greet();
// Demonstrate different prototype for another object
const dogPrototype = {
type: 'canine',
sound: 'bark',
makeSound: function() {
console.log(this.sound);
}
};
const buddy = baseCreate(dogPrototype);
buddy.name = 'Buddy';
buddy.makeSound();
Debug
Known issues
breakingThis package is explicitly from Lodash v3.x. Major changes occurred in Lodash v4.0.0 (released 2015), including API adjustments and internal refactors. Directly depending on `lodash._basecreate@3.0.3` in projects using Lodash v4+ or modern JavaScript environments may lead to incompatibilities or unexpected behavior.fixAvoid direct use of internal Lodash modules. Instead, use the public API `_.create` from the main `lodash` package (e.g., `npm install lodash`). If you truly need `Object.create` behavior, use `Object.create` directly.
affects: >=4.0.0 (main lodash)
gotcha`lodash._basecreate` is an *internal* Lodash module and not part of Lodash's public API contract. Its existence, API signature, or behavior can change without warning or be removed in any future Lodash release. Projects should avoid direct dependencies on internal modules for stability.fixRely on the public `lodash` API, specifically `_.create`, for object creation with prototypes. This ensures forward compatibility and stability.
affects: All versions of `lodash._basecreate`
gotchaThis package is effectively unmaintained as a standalone module, having not received updates since Lodash v3.0.3. It will not benefit from bug fixes, performance improvements, or security patches applied to the main Lodash library (e.g., the prototype pollution fixes in Lodash 4.18.0).fixFor secure and up-to-date functionality, use the `_.create` function from a modern, actively maintained `lodash` package (e.g., `npm install lodash`).
affects: All versions of `lodash._basecreate`
Errors
Common errors & fixes
ReferenceError: baseCreate is not defined
The module was not properly imported or required in a CommonJS context, or an incorrect ESM import was attempted.
fixEnsure you are in a CommonJS environment and use `const baseCreate = require('lodash._basecreate');` at the top of your file. If using ESM, this package is not directly compatible; consider `Object.create` or `_.create` from the main `lodash` package. TypeError: Object.create called on non-object
This error or similar internal `TypeError`s can occur when `baseCreate` (which internally uses `Object.create`) receives an invalid prototype argument, or when this legacy module is used in an environment where its internal dependencies or expectations differ from its original Lodash v3 context.
fixVerify that the argument passed to `baseCreate` is a valid object or `null` for the prototype. More broadly, avoid direct use of `lodash._basecreate`; instead, use the public `_.create` function from a modern, actively maintained `lodash` package to ensure correct internal handling.
Audit
Dependencies
No dependency data recorded yet.