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

maplex

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maplex

An asynchronous, multiplexed iterable mapper

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
590
decreased by-50.79%
Maintainers
1
Weekly downloads
 
Created
Source

Maplex

A multiplexed mapper

I do a huge amount of work just via map/filter/reduce in js, but the one pattern that has never fit cleanly into this pattern is wanting to produce a single map output from many different parallel arrays, asynchronously (and thus, innately yeilding). This does that.

Usage

    import { Maplex } from 'maplex';
    // or
    const { Maplex } = require('maplex');
    Maplex.map(arrayA, ... arrayN, function(itemA, ... itemN){
        //do your work here and store it in finalItem
        return finalItem;
    }, function(result){
        //do something with your mapped value
    });

If you omit the completion function the results are not gathered, which is useful in streaming cases.

Testing

Just run mocha

Enjoy,

-Abbey Hawk Sparrow

FAQs

Package last updated on 22 Jun 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