随笔分类 -  Javascript

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 30 下一页
摘要: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 阅读(172) 评论(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 阅读(236) 评论(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 阅读(203) 评论(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 阅读(272) 评论(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 阅读(114) 评论(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 阅读(219) 评论(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 阅读(283) 评论(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 阅读(407) 评论(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 阅读(615) 评论(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 阅读(226) 评论(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 阅读(226) 评论(0) 推荐(0)
摘要:The code we want to trasform: transform to: Code: 阅读全文
posted @ 2017-09-26 18:19 Zhentiw 阅读(417) 评论(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 阅读(285) 评论(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 阅读(330) 评论(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 阅读(369) 评论(0) 推荐(0)
摘要:To write a simple Babel plugin, we can use http://astexplorer.net/ to help us. The plugin we want to write is: We want to trasnform the code which hig 阅读全文
posted @ 2017-09-24 18:24 Zhentiw 阅读(305) 评论(0) 推荐(0)
摘要:In this lesson we will understand the For Of loop in Javascript which was introduced in ES6. The for-of loop lets you iterate of an itterable object ( 阅读全文
posted @ 2017-09-14 01:05 Zhentiw 阅读(219) 评论(0) 推荐(0)
摘要:Array: 1. slice() 2. concat 3. spread opreator: 4. Array.from: Object: Shadow copy: 1. object.assign: 2. spread opreator: Deep copy: From lodash: From 阅读全文
posted @ 2017-05-17 01:56 Zhentiw 阅读(209) 评论(0) 推荐(0)
摘要:Great improvements and optimizations can be made to the output of bundled code. Prepack provides the ability to optimize code at build-time, producing 阅读全文
posted @ 2017-05-05 18:37 Zhentiw 阅读(306) 评论(0) 推荐(0)
摘要:We look at the default Array.prototype.sort behavior and discuss how you can do case insensitive string sorting. 阅读全文
posted @ 2017-04-19 01:10 Zhentiw 阅读(206) 评论(0) 推荐(0)

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