nodejs
whitehack
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
go c nodejs csharp 可能不太准确的性能测试
title: go c nodejs csharp 可能不太准确的性能测试 comments: true subtitle: 用斐波那契对 go c nodejs csharp 做性能测试对比,可能不太准确 author: nick: smallwhite link: ‘https://github.com/whtiehack’ date: 2019-11-15 18:28:44 tags: ...原创 2019-11-15 18:55:04 · 737 阅读 · 0 评论 -
javascript 简单检查数组是否有重复值(nodejs )
TS 版 // 有重复返回true export 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 · 2135 阅读 · 0 评论 -
解决nodejs报错TypeError: ParserIncomingMessage is not a constructor.
当前最新的 node v8.12, v10.11, 在 http模块里有一个bug. bug报错如下: TypeError: ParserIncomingMessage is not a constructor at HTTPParser.parserOnHeadersComplete (_http_common.js:81:21) at socketOnData (_http_server....原创 2018-09-26 10:02:30 · 3778 阅读 · 0 评论 -
nodejs和js里的gbk与utf8编码转换
js 与 nodejs 都有 TextEncoder TextDecoder ,可以进行编码之间的转换 nodejs 版本需要 >=8.3.0 才支持 util.TextEncoder,util.TextDecoder gbk 转 utf8 new TextDecoder('gbk').decode(new Uint8Array([ 47, 63, 214, 208, 20...原创 2019-06-24 11:27:23 · 18370 阅读 · 0 评论
分享