Socket
Book a DemoInstallSign in
Socket

@crbroughton/nuxt-utils

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crbroughton/nuxt-utils

A collection of useful nuxt utilities and composables

0.2.1
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

nuxt-utils

A collection of utility functions for Nuxt applications.

Installation

npm install @crbroughton/nuxt-utils

Utilities

createStore

Creates a lightweight store using Vue's dependency injection system. Provides a simple way to share state across components without prop drilling.

// Create a store
const [provideCounter, useCounter, createRawCounter] = createStore(
  'counter',
  () => {
    const count = ref(0)
    const increment = () => count.value++
    return { count, increment }
  }
)

// In a parent component
provideCounter()

// In a child component
const { count, increment } = useCounter()

useManualParallelFetch & createUseParallelFetch

Utilities for making parallel API requests and combining results into a single response.

// Option 1: Use with custom fetch functions
const { data } = useManualParallelFetch(
  'dashboard-data',
  {
    user: () => $fetch('/api/user'),
    posts: () => $fetch('/api/posts')
  }
)

// Option 2: Create a configured hook with URL strings
const useParallelFetch = createUseParallelFetch($fetch)

const { data } = useParallelFetch(
  'dashboard-data',
  {
    user: '/api/user',
    posts: '/api/posts'
  }
)

MIT License

FAQs

Package last updated on 28 Jul 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.