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

p-filter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-filter

Filter promises concurrently

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1M
decreased by-11.06%
Maintainers
1
Weekly downloads
 
Created

What is p-filter?

The p-filter npm package is a utility that allows you to filter collections of items using asynchronous predicate functions. It is particularly useful when you need to perform some asynchronous operation to determine whether an item should be included in the resulting array.

What are p-filter's main functionalities?

Asynchronous Filtering

This feature allows you to filter an array asynchronously. The `getIsAnimal` function might perform an asynchronous operation, such as fetching data from an API to determine if the name belongs to an animal. The `pFilter` function will then return a new array containing only the names that are animals.

const pFilter = require('p-filter');
const getIsAnimal = async (name) => { /* ... */ };
const names = ['Sphinx', 'Hydra', 'Human'];
const animals = await pFilter(names, getIsAnimal);

Other packages similar to p-filter

Keywords

FAQs

Package last updated on 04 Apr 2019

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