随笔分类 -  js记录

记录一下js相关的东西.
摘要:js中的二进制 ArrayBuffer Buffer TypedArray DataView Blob FileReader TextEncoder TextDecoder 浏览器环境下有的类: 除了 Buffer 浏览器下没有,其余都有 nodejs环境下有的类: Buffer ArrayBuff 阅读全文
posted @ 2020-08-29 00:04 Dai Hanlong 阅读(467) 评论(0) 推荐(0)
摘要:``` js // 中文 转 unicode function chinese_to_unicode(ch,is16 = false) { let num_ten = ch.charCodeAt(ch); if(is16){ return '0x' + num_ten.toString(16); }else{ return num_ten.toString(); } } // unicode 转 阅读全文
posted @ 2019-10-21 16:20 Dai Hanlong 阅读(241) 评论(0) 推荐(0)
摘要:[TOC] npx 的作用 http://www.ruanyifeng.com/blog/2019/02/npx.html 比较好用的js库 1. 解析大的json文件 big json 2. http/https 下载文件 request 3. 解析xml jxon 4. underscore 包 阅读全文
posted @ 2019-10-11 23:13 Dai Hanlong 阅读(105) 评论(0) 推荐(0)