没有合适的资源?快使用搜索试试~ 我知道了~
arrgh.js:无痛动态函数参数
共20个文件
js:11个
editorconfig:1个
gitignore:1个
需积分: 5 0 下载量 79 浏览量
2021-06-24
17:14:25
上传
评论
收藏 21KB ZIP 举报
温馨提示
Arrgh.js - 无痛动态函数参数 你知道那种痛吗? JavaScript 中的动态类型很棒,它为创建 API 提供的灵活性也很棒。 然而,在 ES5 中没有命名参数,以及 JavaScript 处理函数参数的严格方式,它引入了很多代码异味。 看这个简单的例子: function addDataAttribute ( nodeList , attributeName , value ) { // Type check on our dynamic argument... let's face it... ugly as hell if ( typeof nodeList !== 'string' || ! Array . isArray ( nodeList ) || ! nodeList instanceof NodeList ) {
资源推荐
资源详情
资源评论
收起资源包目录
arrgh_js-master.zip (20个子文件)
arrgh.js-master
.travis.yml 85B
Gulpfile.js 2KB
package.json 2KB
test
arrgh.spec.js 2KB
arrgh-util.spec.js 348B
LICENSE 483B
dist
commonjs
arrgh-util.js 1KB
arrgh.js 3KB
arrgh-browser.js 278B
browser
arrgh.min.js 2KB
arrgh.js 17KB
arrgh.min.js.map 9KB
src
arrgh-util.js 953B
arrgh.js 3KB
arrgh-browser.js 146B
.gitignore 47B
README.md 2KB
.jshintrc 421B
.editorconfig 415B
.gitattributes 11B
共 20 条
- 1
资源评论
参丸
- 粉丝: 14
- 资源: 4658
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功