1.0.5 • Published 1 year ago

@andreseloysv/filtermap v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago