@add1ed/std
v0.17.0
Published
A collection of useful functions, including minimised version of lodash, immer, debug.
Downloads
339
Readme
@add1ed/std
A collection of useful functions, including minimised version of lodash, immer, debug, ...
tl;dr
Use lodash functions:
const _ = require("@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"