@.match()
APIMerge
尝试匹配输入
调用方法
- (matches, defintions, matchings) -> result
参数介绍
- matches: [[key ...] ...]可能存在的组合
- defintions: Object<key, {acceptTypes, mergeOptions, autowrapFollowing, mergeAlias, defaultValue}>每个var对应的规则
- acceptTypes: [type ...]可接受的数据类型
- mergeOptions: Object需要进行的额外格式化
- autowrapFollowing: Boolean是否将后续的参数折叠为数组
- mergeAlias: String可以重新定向的新名称
- defaultValue: any默认值
- matchings: [var ...]输入的数据