# find-used-lodash

> Use esprima to find and detect used lodash packages

Latest version **1.2.0** (published 2015-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-used-lodash
pnpm add find-used-lodash
yarn add find-used-lodash
bun add find-used-lodash
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2015-05-14 |
| First published | 2014-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gilad Peleg |
| Maintainers | pgilad |
| Keywords | lodash, underscore, build, npm, esprima, parse |

## Links

- npm: https://www.npmjs.com/package/find-used-lodash
- Repository: https://github.com/pgilad/find-used-lodash
- Issues: https://github.com/pgilad/find-used-lodash/issues
- npm.io page: https://npm.io/package/find-used-lodash

## Dependencies (2)

- [esprima](https://npm.io/package/esprima.md) ^2.2.0
- [estraverse](https://npm.io/package/estraverse.md) ^4.1.0

## Recent versions

- 1.2.0 (latest) — 2015-05-14
- 1.1.0 — 2014-11-11
- 1.0.0 — 2014-10-27
- 0.2.0 — 2014-10-22
- 0.1.11 — 2014-07-26
- 0.1.10 — 2014-07-15
- 0.1.9 — 2014-05-29
- 0.1.8 — 2014-04-06
- 0.1.7 — 2014-03-02
- 0.1.6 — 2014-02-23
- 0.1.5 — 2014-02-23
- 0.1.4 — 2014-02-22
- 0.1.3 — 2014-02-22
- 0.1.2 — 2014-02-22
- 0.1.1 — 2014-02-22

## README

# find-used-lodash
> Use Esprima to find and detect used Lodash packages

[![NPM Version](http://img.shields.io/npm/v/find-used-lodash.svg?style=flat)](https://npmjs.org/package/find-used-lodash)
[![NPM Downloads](http://img.shields.io/npm/dm/find-used-lodash.svg?style=flat)](https://npmjs.org/package/find-used-lodash)
[![Build Status](http://img.shields.io/travis/pgilad/find-used-lodash.svg?style=flat)](https://travis-ci.org/pgilad/find-used-lodash)

Useful for preparing an array to pass to a build task in order to build only used packages.

* Please see [Lodash](http://lodash.com/) for usable packages.
* Checkout [Lodash custom build tool](http://lodash.com/custom-builds) for possible uses.

**Important notice** Chained Lodash packages are currently not detected.

## Install

```
npm install --save-dev find-used-lodash
```

## Example

### General Usage

```js
var findUsedLodash = require('find-used-lodash');

console.log(findUsedLodash('_.each(["a", "b"], doSomething)');
//=> ['each']
```

### Use in a build task (grunt,gulp)...

```js
var findUsedLodash = require('find-used-lodash');

var fileContents = fs.readFileSync('targetFile.js', 'utf8'); //or get it from file stream
var results = findUsedLodash(fileContents);

var commaResults = results.join(',');

//then execute lodash command line with **lodash include=commaResults**
```

## Options

```js
@param {String} jsFileContents - the js file contents as a string
@return {String[]} array of used Lodash packages.
```

## License

MIT @[Gilad Peleg](http://giladpeleg.com)

---
_Source: https://npm.io/package/find-used-lodash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
