Socket
Book a DemoInstallSign in
Socket

promise-filter

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

promise-filter

Filter an array and return a Promise

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
26
36.84%
Maintainers
1
Weekly downloads
 
Created
Source

promise-filter

NPM version build status Test coverage Downloads

Filter an array and return a Promise.

Installation

$ npm install promise-filter

Usage

const filter = require('promise-filter')

Promise.resolve([1, 2, 3])
  .then(filter((val) => val >= 2))
// => [2, 3]

Why?

This module is basically equivalent to bluebird.filter, but it's handy to have the one function you need instead of a kitchen sink. Modularity! Especially handy if you're serving to the browser and need to reduce your javascript bundle size.

Works great in the browser with browserify!

See Also

License

MIT

Keywords

bluebird

FAQs

Package last updated on 11 Jul 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