@add1ed/std
v0.8.1
Published
A collection of useful functions, including minimised version of lodash, immer, debug.
Downloads
120
Readme
@add1ed/std
A collection of useful functions, including minimised version of lodash, immer, debug, ...
tl;dr
Use lodash functions:
import _ from "@add1ed/std");
const list = ["olives", "anchovies", "capers"];
const isVowel = x => "aeiou".includes(x);
const result =
_.pipe(
_.filter(x => isVowel(x[0])),
_.map(x => x.toUpperCase()),
_.drop(1),
_.first
)(list);
console.log(result); // prints "ANCHOVIES"