{"componentChunkName":"component---node-modules-gatsby-theme-replica-src-templates-category-tsx","path":"/categories/es6","result":{"data":{"allMdx":{"nodes":[{"id":"013dcd1e-4085-58ba-b77e-a6989a7b148f","excerpt":"前几天写测试的时候，有个地方需要检查 Object 的 reference 是否改变，jest 中的 toEqual(value) 是 deep compare，不适用于 reference，于是查看了一下应该使用 toBe(value) 。 toBe  just checks that a value is what you expect. It uses  Object.is  to…","frontmatter":{"title":"Object.is()","date":"2018-04-26T04:25:15.000Z","tags":["ES6","Object","Jest","infinity"]},"fields":{"slug":"/2018/04/26/Object-is/"},"slug":"20180426-Object-is"},{"id":"6ccb419a-db7e-56ad-8bae-46a4e35240e9","excerpt":"JS 里的作用域和 this 一直是一件令人头疼的事情，以前接触的不太多，毕竟面向过程编程的我基本上都不会使用“类”这个概念。 自从开始学习 ES6，很长一段时间都认为箭头函数(Arrow Function) 就是给懒人用的 简写的匿名函数 而已。后来看到有人挑战阮一峰老师 《ECMAScript 6 入门》 中关于箭头函数 this…","frontmatter":{"title":"箭头函数的作用域和this","date":"2016-04-01T08:38:12.000Z","tags":["ES6","箭头函数","this","作用域","词法作用域"]},"fields":{"slug":"/2016/04/01/scope-and-this-of-arrow-function/"},"slug":"20160401-scope-and-this-of-arrow-function"},{"id":"c8838426-ab75-5ddf-ba47-6a74c1f9b273","excerpt":"于是也是入了 ES6 的坑，为什么只有 babel 这种 ES6 转 ES5 的工具，而没有 ES5 转 ES6 的工具呢？可能有，但是我不知道。如果有的话，就能把 5 转成 6，起码看起来逼格高了一大截，也能让我这种还不习惯 ES6 的小白假装会写 ES6… 简单的看了一下相关的概念，觉得还不太理解…就好像最开始看 原型链 一样，花了一年多才慢慢理解继承啊什么的，但 constructor…","frontmatter":{"title":"对generator和yield的一些理解","date":"2016-01-12T09:11:28.000Z","tags":["ES6","generator","yield"]},"fields":{"slug":"/2016/01/12/ES6-generator-yield/"},"slug":"20160112-ES6-generator-yield"}],"totalCount":3}},"pageContext":{"category":"ES6"}},"staticQueryHashes":["2873555300","67573329"]}