随笔分类 -  Javascript

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 31 下一页
摘要: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 阅读(307) 评论(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 阅读(223) 评论(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 阅读(210) 评论(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 阅读(310) 评论(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 阅读(210) 评论(0) 推荐(0)
摘要:Testing your sites on mobile devices is a critical part of the development process. Webpack dev server enables you to visit the server from any device 阅读全文
posted @ 2017-04-18 03:16 Zhentiw 阅读(344) 评论(0) 推荐(0)
摘要:In this lesson, we will look at Greensock's Draggable API. We will implement a scrollable <div>container and explore some options available. DOC 阅读全文
posted @ 2017-04-14 22:56 Zhentiw 阅读(225) 评论(0) 推荐(0)
摘要:Function composition allows us to build up powerful functions from smaller, more focused functions. In this lesson we'll demystify how function compos 阅读全文
posted @ 2017-04-05 04:02 Zhentiw 阅读(234) 评论(0) 推荐(0)
摘要:forkJoin: When all observables complete emit the last value from each. 阅读全文
posted @ 2017-03-21 23:59 Zhentiw 阅读(478) 评论(0) 推荐(0)
摘要:We often want to check if an array includes a specific item. It's been common to do this with the Array.prototype.indexOf method, but now we have a si 阅读全文
posted @ 2017-02-17 18:58 Zhentiw 阅读(225) 评论(0) 推荐(0)
摘要:Dealing with the special NaN value can be tricky in JavaScript. It behaves like a number and not a number at the same time. This lesson explains how t 阅读全文
posted @ 2017-02-06 02:46 Zhentiw 阅读(195) 评论(0) 推荐(0)
摘要:const _pipe = (f, g) => (...args) => g(f(...args)) export const pipe = (...fns) => fns.reduce(_pipe) import {partial, pipe} from './utils' const add = (a, b) => a + b const addThree = (a, b, c)... 阅读全文
posted @ 2017-02-02 19:44 Zhentiw 阅读(247) 评论(0) 推荐(0)
摘要:The Chrome console allows you to format messages using CSS properties. This lesson walks you through the syntax of formatting your logs with css then 阅读全文
posted @ 2017-01-31 16:40 Zhentiw 阅读(197) 评论(0) 推荐(0)
摘要:What is Isomorphisms?We have a value x, then apply function 'to' and 'from' to value 'x', the result we should still get 'x'. So Isomorphisms is kind 阅读全文
posted @ 2017-01-23 15:15 Zhentiw 阅读(224) 评论(0) 推荐(0)
摘要:Most provides many means for creating streams, the simplest of which is the offunction. In this lesson, we demonstrate the use of of to lift a single 阅读全文
posted @ 2017-01-12 11:42 Zhentiw 阅读(208) 评论(0) 推荐(0)
摘要:If you want to check whether a key is inside an Object or Array, you can use 'in': Object: Array: 阅读全文
posted @ 2017-01-11 21:37 Zhentiw 阅读(241) 评论(0) 推荐(0)
摘要:By default, Travis will build all branches, tags, and Pull Requests. Because we're building our master branch before we release, we don't need Travis 阅读全文
posted @ 2016-12-23 19:00 Zhentiw 阅读(146) 评论(0) 推荐(0)
摘要:We take our Promise.all() analogy further by using traversable on a Map(). Then we use two traversals in the same workflow. Traverse is good for maint 阅读全文
posted @ 2016-12-22 20:38 Zhentiw 阅读(188) 评论(0) 推荐(0)
摘要:We find a couple of DOM nodes that may or may not exist and run a calculation on the page height using applicatives. For example we want to get the ma 阅读全文
posted @ 2016-12-21 18:15 Zhentiw 阅读(181) 评论(0) 推荐(0)
摘要:We see what it means to curry a function, then walk through several examples of curried functions and their use cases. For example we have an 'add' fu 阅读全文
posted @ 2016-12-20 21:10 Zhentiw 阅读(272) 评论(0) 推荐(0)

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