![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@blakek/fn-pipe
Advanced tools
Readme
🚰 Compose functions and promises to make a pipeline
Code can become complex when several functions wrap others or reduce()
is
abused for a list of funtions.
This is an alternative that allows creating a pipeline of the functions and calls them in order.
Using Yarn:
$ yarn add @blakek/fn-pipe
…or using npm:
$ npm i --save @blakek/fn-pipe
This example fetches a list of todos from a server, filters for completed todos, and counts the result.
import { fnPipe } from 'fn-pipe';
const userId = 5;
const getCompletedCount = fnPipe([
userId => fetch(`https://jsonplaceholder.typicode.com/todos?userId=${userId}`)
todos => todos.filter(todo => todo.complted),
todos => todos.length
], userId);
getCompletedCount(); //» 12
fnPipe
function fnPipe([fn, ...fns]: Function[], initialValue?: any): Promise<any>;
Node.js and Yarn are required to work with this project.
To install all dependencies, run:
yarn
yarn build | Builds the project to ./dist |
yarn format | Format the source following the Prettier styles |
yarn test | Run project tests |
yarn test --watch | Run project tests, watching for file changes |
MIT
FAQs
🚰 Compose functions and promises to make a pipeline
The npm package @blakek/fn-pipe receives a total of 0 weekly downloads. As such, @blakek/fn-pipe popularity was classified as not popular.
We found that @blakek/fn-pipe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.