Jason

Results 65 comments of Jason

[JavaScript深入之call和apply的模拟实现](https://github.com/mqyqingfeng/Blog/issues/11) [JavaScript深入之bind的模拟实现](https://github.com/mqyqingfeng/Blog/issues/12) [JavaScript深入之new的模拟实现](https://github.com/mqyqingfeng/Blog/issues/13) > 可以参考冴羽的博客

### Eslint & Prettier Eslint 是一个linter,支持 auto fix,prettier 是一个 formatter。 eslint 与 prettier 是有一些配置冲突的,可以用相关插件来解决冲突。如 eslint-config-prettier、eslint-plugin-prettier。 eslint-plugin-prettier 插件会调用 prettier 对你的代码风格进行检查,其原理是先使用 prettier 对你的代码进行格式化,然后与格式化之前的代码进行对比,如果过出现了不一致,这个地方就会被 prettier 进行标记。eslint-plugin-prettier 也可以将 prettier 的错误提交给 eslint,通过 eslint 来提示错误。 通过使用...

### CMD/AMD/ES Module

### webpack #### 1. [how-to-write-a-plugin](https://github.com/webpack/docs/wiki/how-to-write-a-plugin) 、[Webpack原理-编写Plugin](https://zhuanlan.zhihu.com/p/32946596) #### 2. Loader 和 Plugin - Webpack 将一切文件视为模块,webpack 原生是只能解析 js 文件,如果想将其他文件也打包的话,就会用到 loader。 Loader的作用是让 webpack 拥有了加载和解析非 JavaScript 文件的能力。 - Plugin可以扩展 webpack 的功能,让 webpack 具有更多的灵活性。 在...

### babel [babel astexplorer](https://astexplorer.net/) [Babel 插件手册](https://github.com/jamiebuilds/babel-handbook/blob/master/translations/zh-Hans/plugin-handbook.md#toc-asts)

### gitlab CI/CD

### 你能手写一个 Promise 吗? 想要手写一个 Promise 则需要了解 Promise/A+ 规范并遵循这个规范。 #### 简易版(入门) 我们是这样来使用 promise: ```js const p1 = new Promise((resolve, reject) => { setTimeout(() => {resolve('success');}, 1000); }) const p2 =...

> 问一下你所描述的setState,它react版本是多少? 16.0.0-alpha.12 ps:之前梳理的不够仔细,有些描述不清楚的,重新 update 了一下(2019年07月25日更新

更多了解: - [Web安全知多少](https://wetest.qq.com/lab/view/136.html) - [常见六大Web安全攻防解析](https://github.com/ljianshu/Blog/issues/56) - [常见 Web 安全攻防总结](https://zoumiaojiang.com/article/common-web-security/)

### 箭头函数和类普通函数、constructor 里 bind 的函数有什么区别 ```js class funcs { constructor() { this.fun_b = this.fun_b.bind(this); } fun_a() { console.log('a'); } fun_b() { console.log('b') } fun_c = () => { console.log('c') }...