Socket
Socket
Sign inDemoInstall

it-all

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-all

Collects all values from an (async) iterable and returns them as an array


Version published
Maintainers
1
Created

What is it-all?

The 'it-all' npm package is a utility that collects all items from an async iterable into an array. It is particularly useful when working with streams or other asynchronous data sources where you need to gather all the data into a single array for further processing.

What are it-all's main functionalities?

Collecting async iterable into an array

This feature allows you to collect all items from an async iterable into an array. The code sample demonstrates how to use 'it-all' to gather values from an async generator function into a single array.

const itAll = require('it-all');

async function example() {
  const asyncIterable = async function* () {
    yield 1;
    yield 2;
    yield 3;
  };

  const result = await itAll(asyncIterable());
  console.log(result); // [1, 2, 3]
}

example();

Other packages similar to it-all

FAQs

Package last updated on 02 Mar 2023

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