用于为您的功能管道增加安全性的工具集
请阅读以获得更深入的解释。
此实用为您的功能管道添加了/。
注意:在此处以可运行的形式查看此文件:
安装
yarn add handrail -S
要么
npm i handrail -S
采用
这是一个多合一示例,我们可以在不修改原始函数的情况下使不安全函数更安全:
import { guideRail , fold } from 'handrail'
import pipe from 'ramda/src/pipe'
// here are two potential error cases
const over21 = ( { age } ) => age > 20
const hasMoney = ( { cash } ) => cash - 5 >= 0
// and these are the cases we pass to
, 相关下载链接:
https://download.csdn.net/download/weixin_42117267/20443641?utm_source=bbsseo