随笔分类 -  Javascript

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 30 下一页
摘要:Learn how to use Object.assign to combine multiple objects together. This pattern is helpful when writing libraries that have a set of default options 阅读全文
posted @ 2016-12-16 18:41 Zhentiw 阅读(469) 评论(0) 推荐(0)
摘要:Let's we want to combine two account accidently have the same name. So, here we can use Semi-group to combine them, because the semi-group have the kn 阅读全文
posted @ 2016-12-15 19:32 Zhentiw 阅读(216) 评论(0) 推荐(0)
摘要:An introduction to concatting items via the formal Semi-group interface. Semi-groups are simply a type with a concat method that are associative. We d 阅读全文
posted @ 2016-12-15 19:19 Zhentiw 阅读(381) 评论(0) 推荐(0)
摘要:For if..else: 阅读全文
posted @ 2016-12-14 02:16 Zhentiw 阅读(248) 评论(0) 推荐(0)
摘要:We define the Either type and see how it works. Then try it out to enforce a null check and branch our code. Now, we try to make Box more useful. We w 阅读全文
posted @ 2016-12-13 03:25 Zhentiw 阅读(259) 评论(0) 推荐(0)
摘要:After understanding how Box is, then we are going to see how to use Box to refacotr code, to un-nested expression. For example, we have code: So how i 阅读全文
posted @ 2016-12-12 03:16 Zhentiw 阅读(410) 评论(0) 推荐(0)
摘要:Mapping abstract values to visual representations is what data visualization is all about, and that’s exactly what D3 scales do. Turning a test score 阅读全文
posted @ 2016-12-02 21:13 Zhentiw 阅读(315) 评论(0) 推荐(0)
摘要:A part of Natural Language Processing (NLP) is processing text by “tokenizing” language strings. This means we can break up a string of text into part 阅读全文
posted @ 2016-11-08 00:37 Zhentiw 阅读(231) 评论(0) 推荐(0)
摘要:The every method returns true or false based on whether or not every item in the array passes the condition you provide in a callback function. In thi 阅读全文
posted @ 2016-11-07 19:22 Zhentiw 阅读(153) 评论(0) 推荐(0)
摘要:The key to being productive with Immutable JS is understanding how to update values that are nested. Using setIn you can place a new value directly in 阅读全文
posted @ 2016-11-07 19:14 Zhentiw 阅读(180) 评论(0) 推荐(0)
摘要:Yarn is a new JavaScript package manager that aims to be speedy, deterministic, and secure. See how easy it is to drop yarn in where you were using np 阅读全文
posted @ 2016-10-13 02:06 Zhentiw 阅读(230) 评论(0) 推荐(0)
摘要:Property access in Javascript can be problematic - especially when dealing with nested Objects and Arrays. Doing it manually and in a safe manner requ 阅读全文
posted @ 2016-10-02 16:38 Zhentiw 阅读(176) 评论(0) 推荐(0)
摘要:Source You can also start a chain of then() method calls via Promise.resolve() and execute the synchronous code inside a callback: An alternative is t 阅读全文
posted @ 2016-10-02 01:53 Zhentiw 阅读(260) 评论(0) 推荐(0)
摘要:Learn how to add, remove and test for CSS classes using the classList API. It's more powerful than using className and doesn't require any dependencie 阅读全文
posted @ 2016-09-18 03:00 Zhentiw 阅读(174) 评论(0) 推荐(0)
摘要:Monads allow you to nest computations. They are a pointed functor that adds mjoin and chain functions to combine other functors. Brian shows a number 阅读全文
posted @ 2016-09-12 04:04 Zhentiw 阅读(328) 评论(0) 推荐(0)
摘要:Functor laws: 1. Identity: 2. Composition: Natural Transformations: "Takes one functor to another without knowing anything about the value". 阅读全文
posted @ 2016-09-12 03:38 Zhentiw 阅读(193) 评论(0) 推荐(0)
摘要:EventStream: You can use RxJS, BaconJS or any reactive programming lib you want: Here using BaconJS; we need to call onValue to subscribe stream. Futu 阅读全文
posted @ 2016-09-11 20:39 Zhentiw 阅读(237) 评论(0) 推荐(0)
摘要:IO functor doesn't like Maybe(), Either() functors. Instead of get a value, it takes a function. API: Examples: 阅读全文
posted @ 2016-09-09 03:45 Zhentiw 阅读(205) 评论(0) 推荐(0)
摘要:Jest comes pre-packaged with the ability to track code coverage for the modules you're testing, but it takes a little extra work to make it track unte 阅读全文
posted @ 2016-09-08 03:32 Zhentiw 阅读(295) 评论(0) 推荐(0)
摘要:Either Functor: Examples: 阅读全文
posted @ 2016-09-08 03:26 Zhentiw 阅读(348) 评论(0) 推荐(1)

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 30 下一页