undersercore 源码分析

Updated 9 months ago

fe-baidu (@hooper-hc) started discussion #27

a year ago · 0 comments


underscore 本身也依赖了不少 js 的原生方法,如下代码所示,underscore 会通过局部变量来保存一些他经常用到的方法或者属性,这样做的好处有如下两点:

局部变量的妙用 (Edit this file)

主要是为了压缩. Array.prototype.push 不具有压缩性, 但是 push 可以压缩成 一个字母, 很常见的减小库体积手段

No description provided.

No comments on this discussion.

to join this conversation on GitBook. Already have an account? Sign in to comment

You’re not receiving notifications from this thread.

1 participant