![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nodejs
whitehack
这个作者很懒,什么都没留下…
展开
-
go c nodejs csharp 可能不太准确的性能测试
title: go c nodejs csharp 可能不太准确的性能测试comments: truesubtitle: 用斐波那契对 go c nodejs csharp 做性能测试对比,可能不太准确author:nick: smallwhitelink: ‘https://github.com/whtiehack’date: 2019-11-15 18:28:44tags:...原创 2019-11-15 18:55:04 · 582 阅读 · 0 评论 -
javascript 简单检查数组是否有重复值(nodejs )
TS 版// 有重复返回trueexport function checkDuplicationNormal<T>(arr: T[]) { return arr.some((val, idx) => { return arr.includes(val, idx + 1); });}js 版function checkDu...原创 2018-08-02 10:10:11 · 1999 阅读 · 0 评论 -
解决nodejs报错TypeError: ParserIncomingMessage is not a constructor.
当前最新的 node v8.12, v10.11, 在 http模块里有一个bug.bug报错如下:TypeError: ParserIncomingMessage is not a constructorat HTTPParser.parserOnHeadersComplete (_http_common.js:81:21)at socketOnData (_http_server....原创 2018-09-26 10:02:30 · 3626 阅读 · 0 评论 -
nodejs和js里的gbk与utf8编码转换
js 与 nodejs 都有 TextEncoder TextDecoder ,可以进行编码之间的转换nodejs 版本需要 >=8.3.0 才支持 util.TextEncoder,util.TextDecoder gbk 转 utf8new TextDecoder('gbk').decode(new Uint8Array([ 47, 63, 214, 208, 20...原创 2019-06-24 11:27:23 · 17442 阅读 · 0 评论