Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-lodash

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-lodash

Lodash for Nuxt

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
increased by5.48%
Maintainers
1
Weekly downloads
 
Created
Source

Lodash for Nuxt

Version License Types

💡 About

Lodash auto-import module for Nuxt.

📦 Install

npm i nuxt-lodash -D

🔨 Config

NameDefaultDescription
prefixuseString to prepend before each Lodash function (false to disable)
prefixSkip['is']Functions that starts with keywords in this array will be skipped by prefix
exclude[]Array of Lodash functions to exlude from auto-imports
alias[]Array of array pairs to rename specific Lodash functions (prefix is still added)

💻 Usage

import { defineNuxtConfig } from 'nuxt3';

export default defineNuxtConfig({
  buildModules: ['nuxt-lodash'],
  lodash: {
    prefix: 'use',
    prefixSkip: ['is'],
    exclude: ['map'],
    alias: [
      ['camelCase', 'stringToCamelCase'], // => useStringToCamelCase
      ['kebabCase', 'stringToKebabCase'], // => useStringToKebabCase
    ]
  }
});

💻 Example

<template>
  <div>{{ text }}</div>
</template>
<script setup>
  const text = useToUpper('it works!');
</script>

📄 License

MIT License © 2021 - Michal Čípa

Keywords

FAQs

Package last updated on 29 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc