文章
一些小技巧让JS代码更优雅
今天翻了翻一年多前写的代码,感觉当年年轻的自己写下的代码真是图样啊(然而现在也没好到哪里去/w\)。近期看了好多函数式编程以及设计模式的书和文章,于是想分享一些让JS代码更优雅的小技巧。一、善用函数式编程假设我们有这样的需求,需要先把数组<codefoo</cod
Lodash 中 assign,extend 和 merge 的区别
简介我们经常在别人的代码中看见<codeassign</code,<codeextend</code,<codemerge</code函数,这三个函数用起来很相似,都是合并源对象的属性到目标对象中。既然都是合并对象,为什么还分三个不同的函数呢?它们之间到底有什么区别呢
Underscore和Lo-Dash中的Collections _.each
_.each遍历集合,对集合中的每个元素执行回调。APILoDash_.forEach(collection,callbackidentity,thisArg)Aliases_each_Argument
Lodash 中文文档 (v3.10.1) - “Number” 方法
Lodash中文文档(v3.10.1)“Number”方法<blockquote<pTranslatedby<ahref"https://link.segmentfault.com/?enctDEnD9xxEDb8YQvBNmVhKA%3D%3D.Wp1YYA
Lodash 4.0.0 更新文档
Lodash4.0.0更新文档<subv4.0.0</sub_2016年1月12日_—Diff(https://link.segmentfault.com/?enc8hkVVYBfvYZV8UhtwGuQgw%3D%3D.CAb7
Lodash 中文文档 (v3.10.1) - “Math” 方法
Lodash中文文档(v3.10.1)“Math”方法<blockquote<pTranslatedby<ahref"https://link.segmentfault.com/?encrpO3esAyT6r1poB8xmUzsw%3D%3D.qt71nYRY
Lodash 中文文档 (v3.10.1) - “Lang” 方法
Lodash中文文档(v3.10.1)“Lang”方法<blockquote<pTranslatedby<ahref"https://link.segmentfault.com/?encc2KL6LvU8UZ6l%2BaqXEHuOQ%3D%3D.TISAiE
Lodash 中文文档 (v3.10.1) - “Function” 方法
Lodash中文文档(v3.10.1)“Function”方法<blockquote<pTranslatedby<ahref"https://link.segmentfault.com/?encTVRJnh5OeTnWpAjSyWKhzQ%3D%3D.h9gH
Lodash 中文文档 (v3.10.1) - “Date” 方法
Lodash中文文档(v3.10.1)“Date”方法<blockquote<pTranslatedby<ahref"https://link.segmentfault.com/?enc23AZYtByUc5dFkiIjsnWdg%3D%3D.4yf9%2FF
Lodash 中文文档 (v3.10.1) - “Collection” 方法
Lodash中文文档(v3.10.1)“Collection”方法<blockquote<pTranslatedby<ahref"https://link.segmentfault.com/?enc7IfYfRvE%2FTyiiBlBXKN4XQ%3D%3D.
已加载文章中没有匹配内容,试试其他关键词或清空搜索。