npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bubblesortt/nuxt-es-toolkit

v1.0.9

Published

Es-toolkit auto import module for Nuxt

Readme

Nuxt-es-toolkit

npm version npm downloads License Types Nuxt 3.x | 4.x

🪄 About

A lightweight Nuxt 3 & 4 module that auto-imports functions from es-toolkit as Nuxt composables with full TypeScript support.


✨ Features

  • Auto-import es-toolkit functions
  • Support custom prefix or no prefix at all
  • Skip prefix automatically for predicate-like names (isX) via prefixSkip
  • Alias any function with type-safe completions
  • Exclude unwanted functions
  • Generated .d.ts for IDE autocomplete
  • Tree-shaking friendly (import only what you use)
  • Zero runtime overhead (handled at build phase)
  • Nuxt 3 & 4 compatible
  • Clean and minimal configuration surface

📦 Install

Using nuxt cli

npx nuxt module add @bubblesortt/nuxt-es-toolkit

or manual

  1. Install @bubblesortt/nuxt-es-toolkit as development dependency:

Using npm:

npm i -D @bubblesortt/nuxt-es-toolkit

Using pnpm:

pnpm add -D @bubblesortt/nuxt-es-toolkit

Using bun:

bun add -d @bubblesortt/nuxt-es-toolkit
  1. Add it to the modules section of your nuxt.config:
export default defineNuxtConfig({
  modules: ["@bubblesortt/nuxt-es-toolkit"],
});
  1. Config it if you need:
export default defineNuxtConfig({
  modules: ["@bubblesortt/nuxt-es-toolkit"],
  esToolkit: {
    // your options here
  }
});

or

export default defineNuxtConfig({
  modules: [
    ["@bubblesortt/nuxt-es-toolkit",
      {
        // your options here
      },
    ],
  ],
});

🧪 Example

When you use Es-toolkit utilities in your Nuxt application, they will be auto-imported

<script setup lang="ts">
  const text = useUpperFirst("hello");
</script>

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

⚙️ Config

| Name | Default | Description | | ------------------ |---------|---------------------------------------------------------------------------------------| | prefix | 'use' | String to prepend before each es-toolkit function (empty string to disable) | | exclude | [] | Array of es-toolkit functions to exclude from auto imports | | alias | [] | Array of array pairs to rename specific es-toolkit functions (prefix is still added) | | prefixSkip | ['is']| Functions that starts with this keywords will be skipped by prefix (false to disable) |


💡 Config example

export default defineNuxtConfig({
  modules: ["@bubblesortt/nuxt-es-toolkit"],
  esToolkit: {
    prefix: "use",
    prefixSkip: ["is"],
    exclude: ["map", "find"],
    alias: [
      ["sum", "total"], // => useTotal
      ["max", "maximum"], // => useMaximum
      ["isDate", "isExactlyDate"], // => isExactlyDate
    ],
  },
});

🧠 TypeScript & DX

  • Auto-generated .d.ts lets your IDE know about added composables instantly (after first nuxt dev run).
  • Works with both server & client usage transparently.
  • Safe to use in strict TS setups.

🚀 Performance

  • Zero additional runtime code: everything is resolved at compile time.
  • Tree-shaking remains effective (only referenced functions are bundled) as long as es-toolkit provides proper ESM exports without side effects.
  • No dynamic imports or proxies.

🔗 Related


🤝 Contribution

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release