# nuxt-lodash

> Lodash for Nuxt

Latest version **2.5.3** (published 2023-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install nuxt-lodash
pnpm add nuxt-lodash
yarn add nuxt-lodash
bun add nuxt-lodash
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.5.3 |
| Published | 2023-10-22 |
| First published | 2021-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 112 |
| Author | Michal Čípa |
| Maintainers | cipami |
| Keywords | nuxt, nuxt-module, lodash, lodash-es |

## Links

- npm: https://www.npmjs.com/package/nuxt-lodash
- Repository: https://github.com/cipami/nuxt-lodash
- Homepage: https://github.com/cipami/nuxt-lodash#readme
- Issues: https://github.com/cipami/nuxt-lodash/issues
- npm.io page: https://npm.io/package/nuxt-lodash

## Dependencies (3)

- [@nuxt/kit](https://npm.io/package/@nuxt/kit.md) ^3.8.0
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [@types/lodash-es](https://npm.io/package/@types/lodash-es.md) ^4.17.10

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 2.5.3 (latest) — 2023-10-22
- 2.5.2 — 2023-10-22
- 2.5.1 — 2023-10-22
- 2.5.0 — 2023-06-23
- 2.4.1 — 2022-11-17
- 2.4.0 — 2022-10-29
- 2.3.0 — 2022-09-04
- 2.2.0 — 2022-04-21
- 2.1.1 — 2022-01-30
- 2.0.1 — 2022-01-29
- 2.0.0 — 2022-01-29
- 1.3.0 — 2022-01-29
- 1.2.1 — 2021-12-01
- 1.2.0 — 2021-11-28
- 1.1.0 — 2021-11-28
- … 2 more at https://npm.io/package/nuxt-lodash/versions

## README

<h1>Lodash for Nuxt</h1>
 
<p>
  <a href="https://www.npmjs.com/package/nuxt-lodash"><img src="https://badgen.net/npm/v/nuxt-lodash" alt="Version"></a>
  <a href="https://www.npmjs.com/package/nuxt-lodash"><img src="https://badgen.net/npm/license/nuxt-lodash" alt="License"></a>
  <a href="https://www.npmjs.com/package/nuxt-lodash"><img src="https://badgen.net/npm/types/nuxt-lodash" alt="Types"></a>
</p>
   
## 💡 About

[Lodash](https://lodash.com) auto-import module for [Nuxt](https://nuxtjs.org).

## 📦 Install

1. Install `nuxt-lodash` as development dependency:

```bash
npm i nuxt-lodash -D
```

2. Add it to the `modules` section of your `nuxt.config`:

```ts
export default defineNuxtConfig({
  modules: ["nuxt-lodash"],
});
```

## 🚀 Example

Use any [Lodash](https://lodash.com) methods in your Nuxt application, they will be auto-imported!

```html
<script setup>
  const text = useToUpper("it works!");
</script>

<template>
  <div>{{ text }}</div>
</template>
```

## 🔨 Config

| Name               | Default | Description                                                                           |
| ------------------ | ------- | ------------------------------------------------------------------------------------- |
| `prefix`           | `'use'` | String to prepend before each Lodash function (false to disable)                      |
| `prefixSkip`       | `'is'`  | Functions that starts with this keywords will be skipped by prefix (false to disable) |
| `upperAfterPrefix` | `true`  | If true it will automatically uppercase first letter after prefix (false to disable)  |
| `exclude`          | `[]`    | Array of Lodash functions to exclude from auto-imports                                |
| `alias`            | `[]`    | Array of array pairs to rename specific Lodash functions (prefix is still added)      |

## 💻 Example - Config

```ts
export default defineNuxtConfig({
  modules: ["nuxt-lodash"],
  lodash: {
    prefix: "_",
    prefixSkip: ["string"],
    upperAfterPrefix: false,
    exclude: ["map"],
    alias: [
      ["camelCase", "stringToCamelCase"], // => stringToCamelCase
      ["kebabCase", "stringToKebab"], // => stringToKebab
      ["isDate", "isLodashDate"], // => _isLodashDate
    ],
  },
});
```

## 📄 License

[MIT License](https://github.com/cipami/nuxt-lodash/blob/master/LICENSE) © 2021-2022 - [Michal Čípa](https://github.com/cipami)

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