NuoHui
NuoHui
node
``` npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ npm config set sharp_dist_base_url https://npm.taobao.org/mirrors/sharp-libvips/ npm config set electron_mirror https://npm.taobao.org/mirrors/electron/ npm config set puppeteer_download_host https://npm.taobao.org/mirrors/ npm config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/ npm config set sentrycli_cdnurl...
```javascript Function.prototype.bind = function (ctx) { const _otherParam = Array.prototype.slice.call(arguments, 1) const _this = this return function customBind () { const _params = Array.prototype.slice.call(arguments) _this.apply(ctx, [].concat(_otherParam, _params)) } } ```
Koa2源码学习
# 第一篇: 图解Hello World学习源码 ## 初衷 个人觉得学习源码需要带着目的去看, 才能达到效果, 但是公司又没有上Node, 没有实践怎么办呢?最近发现通过调试Koa2源码也是个不错的法子。 ## 准备工作 ``` - 安装node - 安装vscode - 学习如何在vscode下调试 ``` 关于Node下调试推荐阅读下:[《Node.js 调试指南》](https://github.com/nswbmw/node-in-debugging)。 我们这里只需要学习[如何在vscode下调试](https://github.com/nswbmw/node-in-debugging/blob/master/4.3%20Visual%20Studio%20Code.md)即可。 具体就不详情说了, 见链接, 有问题我们可以讨论。 ## 从Hello World开始学习 ```...
- array.js ``` /* * not type checking this file because flow doesn't play well with * dynamically accessing methods on Array prototype */ import { def } from '../util/index'...