JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q41123F
  • License MIT

Member of the starry suite—modular functions for iterable objects.

Package Exports

  • starry.filter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (starry.filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Member of the starry suite—modular functions for iterable objects.

npm node

Status

Applies to the whole suite.

Build Status Coverage Status

Usage

function filter<T = any>(
  iterable: Iterable<T>,
  predicate: (item: T) => boolean = x => x as any
  ): Iterable<T>

Returns a new iterable that only contains the elements from iterable that satisfies predicate.

Parameters:

  • iterable: Iterable<T>
  • predicate: (T) => boolean. Default: x => x

Returns: Iterable<T>