Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-map

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-map

Transform multiple values asynchronously

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

async-map

Transform multiple values asynchronously

install

npm install async-map

usage

const asyncMap = require('async-map')
const loadImage = require('img-load')

let paths = ['images/foo.png', 'images/bar.png']
asyncMap(paths, loadImage, (err, images) => {
  if (err) throw err
  for (let image of images) {
    document.body.appendChild(image)
  }
})

asyncMap(values, iterator, callback) -> result

Performs iterator on each value in values in parallel, and passes the result into callback when complete.

  • values: An array of values to be transformed
  • iterator(value, callback): Any function that receives a value and a callback, e.g. fs.stat(path, callback)
  • callback(err, result): The function called upon completion or abortion of the mapping process

license

MIT © Brandon Semilla

Keywords

FAQs

Package last updated on 05 Dec 2017

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