没有合适的资源?快使用搜索试试~ 我知道了~
type_dispatch:基于参数类型的多方法调度
共6个文件
js:2个
license:1个
md:1个
需积分: 49 0 下载量 70 浏览量
2021-07-03
15:35:40
上传
评论
收藏 4KB ZIP 举报
温馨提示
type_dispatch 允许函数根据参数类型分派到其他函数 用法 var type_dispatch = require ( 'type_dispatch' ) ; function A ( ) { } function B ( ) { this . name = "BBB" ; } A . prototype . method1 = type_dispatch ( [ ] , function ( ) { console . log ( "no args" ) ; } , [ String , B ] , function ( a_string , instanceOfB ) { console . log ( "got two args: " , a_string , instanceOfB ) ; } ) ; var a = new A ( ) ; a
资源推荐
资源详情
资源评论
收起资源包目录
type_dispatch-master.zip (6个子文件)
type_dispatch-master
LICENSE 1KB
test
test.js 1KB
README.md 889B
.gitignore 541B
index.js 2KB
package.json 699B
共 6 条
- 1
资源评论
国服第一奶妈
- 粉丝: 27
- 资源: 4504
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功