Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 3, 2024 via pnpm

fastq 1.15.0

Fast, in memory work queue
Package summary
Share
0
issues
2
licenses
1
ISC
1
MIT
Package created
14 Jun 2015
Version published
1 Jan 2023
Maintainers
1
Total deps
2
Direct deps
1
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
fastq@1.15.0

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
reusify@1.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of fastq 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
reusify1.0.44.02 kBMIT
prod

Visualizations

Frequently Asked Questions

What does fastq do?

FastQ is a popular npm package that offers a high performance, in-memory work queue. Its main purpose is to manage tasks efficiently in a fast queueing system, which is especially beneficial for Node.js applications where managing asynchronous operations is critical. Elegant in its simplicity, FastQ outperforms several other task queue packages according to benchmarks provided on its official repository.

How do you use fastq?

To use FastQ, start by installing the package using npm with the command npm i fastq --save. After installation, you can import it into your application and create a queue. You should define a worker function and the level of concurrency for the tasks. FastQ provides both a callback API and a promise API. The tasks will be processed by the worker function in accordance with the queue.

A basic usage example is as follows:

'use strict'
const queue = require('fastq')(worker, 1)
queue.push(42, function (err, result) {
  if (err) { throw err }
  console.log('the result is', result)
})
function worker (arg, cb) {
  cb(null, arg * 2)
}

In this example, a worker function is defined which doubles the argument passed to it. The push method is used to add a task (in this case, the number 42) to the queue. The second argument to the push method is a callback function which is executed once the task is processed.

FastQ can also be used with TypeScript and offers methods to pause, resume, check if the queue is idle, get the length of the queue, and much more.

Where are the fastq docs?

The complete FastQ documentation can be found in its official GitHub repository at https://github.com/mcollina/fastq. This documentation provides a comprehensive guide for installation, usage, API details, and several usage examples for various scenarios. FastQ's APIs, such as push, unshift, pause, resume and many more, are particularly detailed in the documentation.