Registry / lodash._basevalues

lodash._basevalues

JSON →
library3.0.0jsnpmunverified

This package exports the internal `baseValues` function from Lodash v3.0.0 as a standalone Node.js module. It provides a low-level, optimized utility for extracting property values from an object, primarily designed for internal use within the larger Lodash library ecosystem. As a v3 module, it precedes the significant architectural changes introduced in Lodash v4, where modularization strategies shifted towards `lodash-es` and direct path imports from the main `lodash` package for improved tree-shaking and modern JavaScript compatibility. Consequently, `lodash._basevalues` is now largely superseded and is not actively maintained, making it unsuitable for new projects aiming for compatibility with modern Lodash versions or ES module environments. Its release cadence is tied to the legacy Lodash v3 development cycle.

npm install lodash._basevalues
INSTALL
IMPORT
SIG · LODASH._BASEVALUES
L
lodash._basevalues
javascriptv3.0.0
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.

baseValues
const baseValues = require('lodash._basevalues');
This package is a CommonJS module from Lodash v3, designed for `require()`.
baseValues (ESM attempt)
import baseValues from 'lodash._basevalues';
This package is a CommonJS module. Direct ES module default imports are not supported without specific transpilation or interop settings, and typically result in a `TypeError`.
baseValues (ESM namespace import)
import * as baseValuesModule from 'lodash._basevalues'; const baseValues = baseValuesModule.default;
While this pattern allows importing the CommonJS module object in ESM, `lodash._basevalues` is not designed for modern tree-shaking. The actual function is then accessed via the `.default` property.

Demonstrates how to import and use the `baseValues` function to extract property values from various inputs like objects and arrays, showcasing its direct application.

const baseValues = require('lodash._basevalues'); // Example 1: Extracting values from a plain object const myObject = { id: 101, name: 'Widget A', price: 29.99, available: true, tags: ['electronics', 'gadget'] }; const objectValues = baseValues(myObject); console.log('Values from object:', objectValues); // Expected output: [101, 'Widget A', 29.99, true, ['electronics', 'gadget']] (order may vary in older JS engines) // Example 2: Extracting values from an array (treated as an object with numeric keys) const myArray = ['apple', 'banana', 'cherry']; const arrayValues = baseValues(myArray); console.log('Values from array:', arrayValues); // Expected output: ['apple', 'banana', 'cherry'] // Example 3: Handling non-object inputs (Lodash typically returns an empty array) console.log('Values from null:', baseValues(null)); console.log('Values from undefined:', baseValues(undefined));
Debug
Known issues
breakingThis package belongs to the Lodash v3 modular build system. With the release of Lodash v4, the entire modular strategy changed significantly, making this specific package incompatible or redundant with modern `lodash` or `lodash-es` consumption patterns. Direct usage of internal modules like `_basevalues` is generally discouraged and has been superseded by tree-shakable `lodash-es` or specific paths within the main `lodash` package.
fix
For new projects or migrations, prefer `lodash-es` for tree-shaking or use specific function imports from the main `lodash` package (e.g., `import { values } from 'lodash';`). If `baseValues` is strictly needed, consider extracting its logic directly or using `Object.values()` for simple cases.
affects: >=4.0.0
deprecatedThis package is based on Lodash v3 and is not actively maintained. It will not receive updates for new features, bug fixes, or security patches relevant to modern Lodash versions. Relying on an unmaintained internal module can lead to compatibility issues and security vulnerabilities.
fix
Migrate to modern Lodash alternatives (`lodash-es`) or use native JavaScript equivalents (e.g., `Object.values()`) for collecting values from objects. Audit your dependencies to remove unmaintained packages.
affects: >=3.0.0
gotchaAs a CommonJS module, `lodash._basevalues` does not natively support ES module `import` syntax. Attempting to use `import baseValues from 'lodash._basevalues'` will often result in a `TypeError` at runtime, especially in pure ESM environments, or require complex bundler configurations.
fix
Use the CommonJS `require()` syntax: `const baseValues = require('lodash._basevalues');`. If you must use it in an ESM context, you might need `import * as baseValuesModule from 'lodash._basevalues'; const baseValues = baseValuesModule.default;` and ensure your build tooling handles CJS interoperability.
affects: >=3.0.0
gotchaWhile Lodash v4.18.0 and v4.18.1 addressed critical security vulnerabilities (e.g., prototype pollution via `_.unset` / `_.omit`) and `ReferenceError` bugs in the main `lodash` and modular builds, this `_basevalues` package is stuck at v3.0.0. Therefore, it does not benefit from these security and bug fixes, potentially leaving applications vulnerable if used in conjunction with other vulnerable Lodash components or contexts.
fix
Discontinue use of this package and migrate to the latest, actively maintained versions of `lodash` or `lodash-es` to benefit from all security patches and bug fixes.
affects: >=3.0.0
Errors
Common errors & fixes
TypeError: (0 , lodash__basevalues__1.default) is not a function
Attempting to use `import baseValues from 'lodash._basevalues'` in an ES module environment when the package is a CommonJS module exporting a single function.
fix
Use `const baseValues = require('lodash._basevalues');` for CommonJS environments. In ESM, if strict compatibility is required, `import * as baseValuesModule from 'lodash._basevalues'; const baseValues = baseValuesModule.default;` might work, but migration is recommended.
ReferenceError: baseValues is not defined
The `require()` call was not assigned to a variable, or the variable name was misspelled, or the package was not correctly installed/found.
fix
Ensure `const baseValues = require('lodash._basevalues');` is correctly placed and that `lodash._basevalues` is listed in your `package.json` and installed via `npm install`.
Error: Cannot find module 'lodash._basevalues'
The package `lodash._basevalues` is not installed or the path to the module is incorrect.
fix
Run `npm install lodash._basevalues` to install the package. Verify the package name in your `require()` statement matches the installed package.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
lodash._basevalues — npm install lodash._basevalues · libregistry