0.0.3 • Published 10 months ago

nuxt-parallel-limit v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

nuxt-parallel-limit

Run multiple fetch with limited concurrency

npm version npm downloads License Nuxt

Installation

Install and add nuxt-parallel-limit to your nuxt.config.

npm install -D nuxt-parallel-limit
yarn add -D nuxt-parallel-limit
pnpm add -D nuxt-parallel-limit
export default defineNuxtConfig({
  modules: ['nuxt-parallel-limit'],
})

Configuration

You can pass configuration to the module in the nuxt.config like following:

export default defineNuxtConfig({
  modules: ['nuxt-parallel-limit'],
  parallelLimit: {
    patterns: [
      {
        pattern: 'https://jsonplaceholder.typicode.com',
        limit: 2
      }
    ]
  },
})

pattern:

  • Type: string
  • Details: The pattern specifies a regular expression the fetch url should match. If the fetch url matches the specified pattern, the fetch will be limited by the limit attribute.

limit:

  • Type: number
  • Details: Limit the maximum number of concurrent.

Development

  • Clone this repository
  • Install dependencies using pnpm install
  • Stub module with pnpm dev:prepare
  • Run pnpm dev to start playground in development mode

License

Made with ❤️

Published under the MIT License.

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago