New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@shigen/async-array

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shigen/async-array

Wrapper around an `Iterable` or `AsyncIterable` providing the methods from the [Async Iterator Helpers proposal](https://github.com/tc39/proposal-async-iterator-helpers).

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Async Array

Wrapper around an Iterable or AsyncIterable providing the methods from the Async Iterator Helpers proposal.

NPM Version

Usage

// callbacks don't run immediately
const squares = AsyncArray.from([1, 2, 3]).map(async (x) => {
	console.log(x);
	return x * x;
});

// callbacks are called once when the array is consumed with toSync or for await
console.log(await squares.toSync());
	// 1
	// 2
	// 3
	// [1, 4, 9]

// to prevent side effects, callbacks won't run again
console.log(await squares.toSync())
	// [1, 4, 9]

FAQs

Package last updated on 20 Sep 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