1.0.5 • Published 6 months ago

@andreseloysv/filtermap v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

filterMap

Transforms an array of elements into a new array of elements based on specified filter and mapping functions.

Installation

npm install @andreseloysv/filtermap

Usage

Javascript

const filterMap = require('@andreseloysv/filtermap')

// Example usage:
const numbers = [1, 2, undefined, 3];
const result = filterAndMap(numbers, x => x < 3, x => `Number: ${x}`);
// result will be ['Number: 1', 'Number: 2']

Typescript

import { filterMap } from '@andreseloysv/filtermap';

const numbers = [1, 2, undefined, 3];
const result = filterAndMap(numbers, x => x < 3, x => `Number: ${x}`);
// result will be ['Number: 1', 'Number: 2']
1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago