This package provides the `_.pairs` function from the Lodash utility library, specifically from the Lodash v3 era, as a standalone Node.js module. The `_.pairs` function converts an object into an array of `[key, value]` pairs. While originally part of a strategy for modularizing Lodash functions, this `lodash.pairs` package is at version 3.0.1 and was last published over a decade ago. It is considered deprecated in favor of direct imports from the main `lodash` package (which is currently at v4.18.1 and actively maintained) or, preferably, `lodash-es` for modern, tree-shakable ES Module environments. Relying on this older, single-function module can lead to outdated behavior, missed bug fixes, and potential security vulnerabilities present in the main Lodash library that have since been addressed in v4.x. Modern applications should use `lodash-es` or specific imports from `lodash` itself for optimized bundle sizes and access to the latest features and patches.
npm install lodash.pairsVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to convert an object into an array of key-value pairs using `_.pairs` from `lodash-es`.
Migrate to `lodash` v4+ and import `pairs` directly from `lodash-es` (for ESM) or `lodash/pairs` (for CJS) to benefit from active maintenance, bug fixes, and security updates.
Replace `require('lodash.pairs')` with `import { pairs } from 'lodash-es';` in ESM projects or `import pairs from 'lodash/pairs';` in CJS projects to leverage modern tooling and Lodash v4+ features.Immediately update your dependencies to use the actively maintained `lodash` or `lodash-es` package and ensure you are on the latest versions to receive all security updates.
Ensure you are importing `pairs` correctly for your module system. For ES Modules: `import { pairs } from 'lodash-es';`. For CommonJS using the main `lodash` package: `const { pairs } = require('lodash');` (if using Lodash v4+ with a bundler that can cherry-pick) or `const pairs = require('lodash/pairs');`. For this specific `lodash.pairs` module (deprecated): `const pairs = require('lodash.pairs');`.If your project uses ESM, you must use `import` statements. Replace `require('lodash.pairs')` with `import { pairs } from 'lodash-es';` or `import pairs from 'lodash/pairs';` (after installing `lodash` or `lodash-es`). Alternatively, if you must use the old `lodash.pairs` package, convert your file to CommonJS or use an interop solution.No dependency data recorded yet.