随笔分类 -  Javascript

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页
摘要: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 阅读(194) 评论(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 阅读(242) 评论(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 阅读(207) 评论(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 阅读(298) 评论(0) 推荐(0)
摘要:Either Functor: Examples: 阅读全文
posted @ 2016-09-08 03:26 Zhentiw 阅读(350) 评论(0) 推荐(1)
摘要:In normal Javascript, we do undefine check or null check: Sometime backend data return may contain or not contain 'name' prop. So let's see how to def 阅读全文
posted @ 2016-09-07 04:00 Zhentiw 阅读(436) 评论(0) 推荐(0)
摘要:Well, this stuff will be a little bit strange if you deal with it first time. Container Object: Just a wrapper / contianer for values No Method No Nou 阅读全文
posted @ 2016-09-06 04:23 Zhentiw 阅读(349) 评论(0) 推荐(0)
摘要:Let's learn how to unit test your JavaScript with Jest, a JavaScript unit testing framework from Facebook. We'll install and optimize Jest for this pr 阅读全文
posted @ 2016-09-03 04:36 Zhentiw 阅读(321) 评论(0) 推荐(0)
摘要:Canvas is great for high performance graphics rendering but by default the results look blocky on phones tablets and laptops with high pixel density o 阅读全文
posted @ 2016-08-22 02:22 Zhentiw 阅读(227) 评论(0) 推荐(0)
摘要:Learn how to use the new Webpack Dashboard from Formidable Labs to display a pretty, useful output for monitoring the status of your webpack builds. T 阅读全文
posted @ 2016-08-17 02:49 Zhentiw 阅读(631) 评论(0) 推荐(0)
摘要:Not only can you provide default values when using ES6 parameter object destructuring, but you can also require the presence of certain properties. No 阅读全文
posted @ 2016-08-09 00:50 Zhentiw 阅读(165) 评论(0) 推荐(0)
摘要:Often buttons need to be handled by JavaScript, and if done improperly it can lead to accessibility issues. In this lesson you will improve a major ne 阅读全文
posted @ 2016-08-05 20:31 Zhentiw 阅读(198) 评论(0) 推荐(0)
摘要:let person = { firstName: "Zhentian", lastName: "Wan" }; /*Object.freeze() makes object cannot be updated, added or deleted*/ let freezePerson = Object.freeze(person); freezePerson.address="Finl... 阅读全文
posted @ 2016-07-25 00:06 Zhentiw 阅读(280) 评论(0) 推荐(0)
摘要:Use map() and Number() to convert to number if possilbe or NaN. 阅读全文
posted @ 2016-07-19 18:29 Zhentiw 阅读(297) 评论(0) 推荐(0)
摘要:In this lesson we look at using color and the basic drawing methods of p5js, and how they can be combined to create a simple graphic on the canvas. 阅读全文
posted @ 2016-07-06 04:20 Zhentiw 阅读(240) 评论(0) 推荐(0)
摘要:If you’re only instrumenting the files in your project that are under test then your code coverage report will be misleading and it will be difficult 阅读全文
posted @ 2016-06-29 01:06 Zhentiw 阅读(201) 评论(0) 推荐(0)
摘要:How much of your code runs during unit testing is an extremely valuable metric to track. Utilizing code the karma-coverage plugin and babel-plugin-__c 阅读全文
posted @ 2016-06-29 00:55 Zhentiw 阅读(257) 评论(0) 推荐(0)
摘要:When writing tests run by Karma for an application that’s bundled with webpack, it’s easiest to integrate webpack and Karma directly together. In this 阅读全文
posted @ 2016-06-28 01:48 Zhentiw 阅读(619) 评论(0) 推荐(0)
摘要:When you have a dependency that has dependencies on global variables (like jQuery or lodash) or assumes that this is bound to window, you can use the  阅读全文
posted @ 2016-06-28 01:33 Zhentiw 阅读(171) 评论(0) 推荐(0)
摘要:Let's try creating a deeper tree structure. This time we have 4 separate arrays each containing lists, videos, boxarts, and bookmarks respectively. Ea 阅读全文
posted @ 2016-06-27 21:54 Zhentiw 阅读(320) 评论(0) 推荐(0)

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页