{"id":15459,"library":"lodash._basevalues","title":"Lodash Internal baseValues Function","description":"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.","status":"abandoned","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/lodash/lodash","tags":["javascript"],"install":[{"cmd":"npm install lodash._basevalues","lang":"bash","label":"npm"},{"cmd":"yarn add lodash._basevalues","lang":"bash","label":"yarn"},{"cmd":"pnpm add lodash._basevalues","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is a CommonJS module from Lodash v3, designed for `require()`.","symbol":"baseValues","correct":"const baseValues = require('lodash._basevalues');"},{"note":"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`.","wrong":"import baseValues from 'lodash._basevalues';","symbol":"baseValues (ESM attempt)"},{"note":"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.","wrong":"import * as baseValuesModule from 'lodash._basevalues';\nconst baseValues = baseValuesModule.default;","symbol":"baseValues (ESM namespace import)"}],"quickstart":{"code":"const baseValues = require('lodash._basevalues');\n\n// Example 1: Extracting values from a plain object\nconst myObject = {\n  id: 101,\n  name: 'Widget A',\n  price: 29.99,\n  available: true,\n  tags: ['electronics', 'gadget']\n};\n\nconst objectValues = baseValues(myObject);\nconsole.log('Values from object:', objectValues);\n// Expected output: [101, 'Widget A', 29.99, true, ['electronics', 'gadget']] (order may vary in older JS engines)\n\n// Example 2: Extracting values from an array (treated as an object with numeric keys)\nconst myArray = ['apple', 'banana', 'cherry'];\nconst arrayValues = baseValues(myArray);\nconsole.log('Values from array:', arrayValues);\n// Expected output: ['apple', 'banana', 'cherry']\n\n// Example 3: Handling non-object inputs (Lodash typically returns an empty array)\nconsole.log('Values from null:', baseValues(null));\nconsole.log('Values from undefined:', baseValues(undefined));\n","lang":"javascript","description":"Demonstrates how to import and use the `baseValues` function to extract property values from various inputs like objects and arrays, showcasing its direct application."},"warnings":[{"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.","message":"This 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.","severity":"breaking","affected_versions":">=4.0.0"},{"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.","message":"This 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.","severity":"deprecated","affected_versions":">=3.0.0"},{"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.","message":"As 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.","severity":"gotcha","affected_versions":">=3.0.0"},{"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.","message":"While 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.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"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.","cause":"Attempting to use `import baseValues from 'lodash._basevalues'` in an ES module environment when the package is a CommonJS module exporting a single function.","error":"TypeError: (0 , lodash__basevalues__1.default) is not a function"},{"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`.","cause":"The `require()` call was not assigned to a variable, or the variable name was misspelled, or the package was not correctly installed/found.","error":"ReferenceError: baseValues is not defined"},{"fix":"Run `npm install lodash._basevalues` to install the package. Verify the package name in your `require()` statement matches the installed package.","cause":"The package `lodash._basevalues` is not installed or the path to the module is incorrect.","error":"Error: Cannot find module 'lodash._basevalues'"}],"ecosystem":"npm"}