New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pasync

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pasync

Promise-oriented async

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
423
increased by23.32%
Maintainers
1
Weekly downloads
 
Created
Source

pasync

Version of async that uses promises instead of callbacks.

var pasync = require('pasync');

function getUserById(id) {
	return new Promise(...);
}

var userIds = [1, 2, 3, 4, 5, 6];

pasync.mapLimit(userIds, 2, getUserById).then(function(users) {
	// ...
});

You can also return values instead of promises from the iterator functions, and these will be converted into resolved promises. Exceptions thrown from iterator functions will be converted into rejected promises.

Additionally, this implements error handling for async functions that don't natively have error handling, such as async.filter .

Implemented Functions

  • each
  • eachSeries
  • eachLimit
  • map
  • mapSeries
  • mapLimit
  • filter
  • select
  • filterSeries
  • selectSeries
  • reject
  • rejectSeries
  • reduce
  • inject
  • foldl
  • reduceRight
  • foldr
  • detect
  • detectSeries
  • sortBy
  • some
  • every
  • concat
  • concatSeries
  • series
  • parallel
  • parallelLimit
  • whilst
  • doWhilst
  • until
  • doUntil
  • forever
  • waterfall

FAQs

Package last updated on 05 Mar 2015

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