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

 

 

 

 

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

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

  

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

 

 

相关文章:

  • 2022-12-23
  • 2021-11-08
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
相关资源
相似解决方案