nmsn

Results 78 comments of nmsn

相关介绍 - https://juejin.cn/post/6945277725066133534 - https://www.bilibili.com/video/BV1QL411Q73G/?share_source=copy_web&vd_source=8d8d854d3279104f57a7a7665ffe64ee

||Map|Object| |---|---|---| |意外的键|Map 默认情况不包含任何键。只包含显式插入的键。|一个 Object 有一个原型,原型链上的键名有可能和你自己在对象上的设置的键名产生冲突。`备注:虽然可以用 Object.create(null) 来创建一个没有原型的对象,但是这种用法不太常见。`| |键的类型|一个 Map 的键可以是任意值,包括函数、对象或任意基本类型。|一个 Object 的键必须是一个 String 或是 Symbol。| |键的顺序|Map 中的键是有序的。因此,当迭代的时候,一个 Map 对象以插入的顺序返回键值。|虽然 Object 的键目前是有序的,但并不总是这样,而且这个顺序是复杂的。因此,最好不要依赖属性的顺序。自 ECMAScript 2015 规范以来,对象的属性被定义为是有序的;ECMAScript 2020 则额外定义了继承属性的顺序。参见 [OrdinaryOwnPropertyKeys](https://tc39.es/ecma262/#sec-ordinaryownpropertykeys) 和 [EnumerateObjectProperties](https://tc39.es/ecma262/#sec-enumerate-object-properties)...

https://github.com/mortal-cultivation-biography/daydayup/issues/26 使用 Map 的键的顺序的特性实现的 LRU

https://juejin.cn/post/6846687590616137742

https://gist.github.com/jagregory/710671 1. Fork their repo on Github 2. In your local, rename your origin remote to upstream git remote rename origin upstream 3. Add a new origin git remote add...

https://blog.logrocket.com/getinitialprops-vs-getserversideprops-nextjs/ ## getStaticProps 能够在 build 阶段就执行预渲染,会被打包到静态文件当中,可以进行 CDN 可以发起请求,更多的使用在 CMS 之类的无权限的静态资源请求上面 ## getInitialProps/getServerSideProps - getInitialProps 是一直以来页面初始化使用的方法 - getServerSideProps 在 v9.3.0 版本之后出现的提供更好功能和语义的方法 ### getInitialProps getInitialProps 会在首次加载的情况下,在服务端执行,后续通过 `next/link`、`next/router` 进入的页面将会在客户端执行 getInitialProps 是页面组件的静态方法,通过使用 ```jsx Index.getInitialProps...

https://github.com/rollup/rollup/issues/1555#issuecomment-322862209

https://juejin.cn/post/6869950884231675912

https://github.com/nmsn/blog/issues/36

softbind 实现:https://github.com/shfshanyue/Daily-Question/issues/33#issuecomment-1237624135 > bind 函数多次调用会已第一次绑定的 this 为准,softbind 已最后一次绑定传入的this为准;