随笔分类 -  Javascript

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 31 下一页
摘要:We can execute generators from generators, and delegate the iteration control with the yield* keyword. Yo dawg, I heard you like generators, so I put 阅读全文
posted @ 2018-02-06 21:01 Zhentiw 阅读(176) 评论(0) 推荐(0)
摘要:ES2017 added two new string functions. They are padStart and padEndfunctions. In this lesson, we will understand how to use these functions and a few 阅读全文
posted @ 2018-01-29 00:20 Zhentiw 阅读(353) 评论(0) 推荐(0)
摘要:In Javascript, all function arguments are optional by default. That means if you ever forget to pass a critical parameter, the code will just fail wit 阅读全文
posted @ 2018-01-22 17:35 Zhentiw 阅读(279) 评论(0) 推荐(0)
摘要:Transducers remove the requirement of being lazy to optimize for things like take(10). However, it can still be useful to "bind" a collection to a set 阅读全文
posted @ 2018-01-17 21:44 Zhentiw 阅读(220) 评论(0) 推荐(0)
摘要:A frequent use case when transducing is to apply a transformation to items without changing the type of the collection. In this lesson, we'll create a 阅读全文
posted @ 2018-01-17 20:52 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要:Our transduce function is powerful but requires a lot of boilerplate. It would be nice if we had a way to transduce into arrays and objects without ha 阅读全文
posted @ 2018-01-17 20:24 Zhentiw 阅读(174) 评论(0) 推荐(0)
摘要:So far we've been transducing by manually calling .reduce() on arrays, but we want to be able to transduce over other collection types as well. In thi 阅读全文
posted @ 2018-01-16 20:23 Zhentiw 阅读(238) 评论(0) 推荐(0)
摘要:To make our composition more readable and easier to name we are going to ceate a compose function we can use to avoid having to manually nest our tran 阅读全文
posted @ 2018-01-16 17:44 Zhentiw 阅读(207) 评论(0) 推荐(0)
摘要:Immer is a tiny library that makes it possible to work with immutable data in JavaScript in a much more straight-forward way by operating on a tempora 阅读全文
posted @ 2018-01-15 01:16 Zhentiw 阅读(274) 评论(0) 推荐(0)
摘要:A function's this argument is usually set implicitly, depending on how the function is called. Ordinary function calls, method calls, and constructor 阅读全文
posted @ 2017-12-11 15:54 Zhentiw 阅读(118) 评论(0) 推荐(0)
摘要:In most cases, the value of a function's this argument is determined by how the function is called. This lesson explains what thisrefers to when we ca 阅读全文
posted @ 2017-12-11 15:42 Zhentiw 阅读(221) 评论(0) 推荐(0)
摘要:In this lesson you will create a utility function that allows you to quickly compose behavior of multiple functions to create new behavior. By the end 阅读全文
posted @ 2017-11-30 17:50 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要:Tf-idf, or term frequency-inverse document frequency, is a statistic that indicates how important a word is to the entire document. This lesson will e 阅读全文
posted @ 2017-10-03 20:38 Zhentiw 阅读(410) 评论(0) 推荐(0)
摘要:In this lesson, we will learn how to train a Naive Bayes classifier and a Logistic Regression classifier - basic machine learning algorithms - on JSON 阅读全文
posted @ 2017-10-03 20:23 Zhentiw 阅读(618) 评论(0) 推荐(0)
摘要:In this lesson, we will learn how to train a Naive Bayes classifier or a Logistic Regression classifier - basic machine learning algorithms - in order 阅读全文
posted @ 2017-10-03 19:20 Zhentiw 阅读(230) 评论(0) 推荐(0)
摘要:We can use placeholder for more detail information: The placeholder can be found in data prop: 阅读全文
posted @ 2017-09-30 20:03 Zhentiw 阅读(228) 评论(0) 推荐(0)
摘要:The code we want to trasform: transform to: Code: 阅读全文
posted @ 2017-09-26 18:19 Zhentiw 阅读(418) 评论(0) 推荐(0)
摘要:The rule we want to write is show warning if user using console method: Rule: 'looksLike' & isPrimitive is pretty handy, you can save as until lib. 阅读全文
posted @ 2017-09-26 03:38 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要:What we want to do is checking if user write nested if statements which actually can combine to one: Notice that if statement can write with block sta 阅读全文
posted @ 2017-09-25 21:06 Zhentiw 阅读(331) 评论(0) 推荐(0)
摘要:We want to write a Babel Plugin, which move 'const versionRegex = /(/d+)\.(/d+)\.(/d+)/gi' out of function scope and put it into global scope. Code: A 阅读全文
posted @ 2017-09-24 18:26 Zhentiw 阅读(372) 评论(0) 推荐(0)

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 31 下一页