1.0.2 • Published 9 months ago

unfated-nuxt-lodash v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Unfated Lodash For Nuxt

A different version of Nuxt Lodash to include only desired lodash functions

Quick Setup

  1. Add unfated-nuxt-lodash as development dependency
# Using pnpm
pnpm add -D unfated-nuxt-lodash

# Using yarn
yarn add --dev unfated-nuxt-lodash

# Using npm
npm install --save-dev unfated-nuxt-lodash
  1. Add unfated-nuxt-lodash to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ['unfated-nuxt-lodash']
})

Config

NameDefaultDescription
prefix'_'String to prepend before each Lodash function (false to disable)
upperAfterPrefixtrueIf true it will automatically uppercase first letter after prefix (false to disable)
include[]Array of Lodash functions to include from auto-imports
alias[]Array of array pairs to rename specific Lodash functions (prefix is still added)

Example Config

export default defineNuxtConfig({
  modules: ["unfated-nuxt-lodash"],
  lodash: {
    prefix: "_",
    upperAfterPrefix: true,
    include: ["cloneDeep"],
    alias: [
      ["map", "aliasMap"], // => stringToCamelCase
    ],
  },
});

That's it! You can now use My Module in your Nuxt app ✨

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago