工具:统计jQuery中各字符串出现次数

源文件(将jQuery源码复制到下面的文本域):

 

 

 

 

点击“统计所有字符出现次数”按钮后发现,字符串“string”竟然出现了44次,多数是诸如以下的代码

typeof selector === "string"
typeof data !== "string"
type === "string"
typeof context === "string"
getByName = typeof name === "string"
// ...

  

如果使用一个变量替换,使用工具压缩时将会进一步减少文件的大小。

 

 

posted on 2012-05-01 10:08  snandy  阅读(3506)  评论(0编辑  收藏  举报