摘要: zepto中 //将字符串转成驼峰式的格式 camelize = function (str) { return str.replace(/-+(.)?/g, function (match, chr) { return chr ? chr.toUpperCase() : '' }) } //将字符 阅读全文
posted @ 2019-03-12 16:13 dnoyeb 阅读(738) 评论(0) 推荐(1) 编辑
摘要: 源码中有这样一段: class2type = {}, toString = class2type.toString, function type(obj) { //obj为null或者undefined时,直接返回'null'或'undefined' return obj == null ? Str 阅读全文
posted @ 2019-03-12 15:30 dnoyeb 阅读(793) 评论(0) 推荐(0) 编辑