lodash-es
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
Lodash-es is a library that adapts the popular Lodash JavaScript utility library for use with ES (ECMAScript) modules. This allows developers to leverage Lodash's unique toolset and functionality with ES modules, which provide useful features like static structure, better optimizability, and improved interoperability between different JS environments.
To use Lodash-es, it needs to be first installed in your project. This can be achieved usually through npm or yarn. Here's an example of how to install via npm:
npm install lodash-es
Then you can import and use a Lodash function in your ECMAScript module:
import { chunk } from 'lodash-es';
let array = [1, 2, 3, 4, 5, 6];
let chunkedArray = chunk(array, 2);
console.log(chunkedArray); // logs: [[1, 2], [3, 4], [5, 6]]
In this example, lodash-esโs chunk
function is used to split an array into chunks.
The official documentation for Lodash, including all the capabilities available via lodash-es, is available at https://lodash.com/. Please note that while Lodash-es is an ES module export of Lodash, its usage is identical to that of Lodash. For specific lodash-es details, refer to the package source available at https://github.com/lodash/lodash/tree/4.17.21-es.