newif
v0.0.6
Published
优雅的解决 if-else 嵌套问题,elegantly solve ifelse nesting
Downloads
2
Readme
优雅的解决 if-else 嵌套循环
//用法
const ifElse = require('newif').init//引入并初始化
//链式调用
ifElse.new(false).run(log,1).next(true).run(log,2).next(true).run(log,3)
.new(4).run(log,4).next(false).run(log,5).next(true).run(log,6)
.new(false).run(log,7).next(true).run(log,8).next(true).run(log,9)
.new(true).run(log,10).next(true).run(log,11).next(true).run(log,12)