conditionally-execute:让您放弃“ if”关键字

时间:2021-04-28 14:26:33
【文件属性】:
文件名称:conditionally-execute:让您放弃“ if”关键字
文件大小:14KB
文件格式:ZIP
更新时间:2021-04-28 14:26:33
JavaScript 有条件地执行 让您放弃“ if”关键字 安装 使用npm安装: npm install conditionaly-execute 用法 const ConditionallyExecute = require ( 'conditionally-execute' ) ; 通过其简单,直接和可理解的设计,开始使用有条件执行是极其容易的。 只需看一下这段代码即可: function thatsTrue ( ) { console . log ( "True!" ) ; } function thatsNotTrue ( ) { console . log ( "False!" ) ; } new ConditionallyExecute ( ) . condition ( 1 === 1 ) . onTrue ( thatsTrue ) . onFalse ( thats
【文件预览】:
conditionally-execute-master
----.gitignore(285B)
----package.json(693B)
----package-lock.json(35KB)
----LICENSE(1KB)
----index.js(671B)
----test.js(4KB)
----.github()
--------workflows()
----README.md(1KB)

网友评论