newif

0.0.6 • Public • Published

优雅的解决 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)

/newif/

    Package Sidebar

    Install

    npm i newif

    Weekly Downloads

    0

    Version

    0.0.6

    License

    ISC

    Unpacked Size

    1.98 kB

    Total Files

    3

    Last publish

    Collaborators

    • ckcoding