![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
米斯特尔曾
在前端这条道上越走越模糊了
展开
-
JavaScript Symbol.iterator
粗略的实现Array的功能interface MyArray<T> { [key: number]: T}class MyArray<T> { constructor() { // Object.defineProperties(this, { // length: { // enumerable: false // } // });原创 2020-11-22 17:13:25 · 364 阅读 · 0 评论 -
npm 学习
npm 的使用命令概览zengwe$ npm --helpUsage: npm <command>where <command> is one of: access, adduser, audit, bin, bugs, c, cache, ci, cit, completion, config, create, ddp, dedupe, dep...原创 2019-08-14 11:34:20 · 1071 阅读 · 0 评论 -
console 的用法
console 的用法console.logconsole.log 就是打印对象,Element打印时就和选中dom检查一样, 可多对象打印let obj1 = { name: 'zengwe', gender: 'mal', age: 18, other: { career: 'font-end' }}let obj2 = { ...原创 2019-08-14 09:52:05 · 589 阅读 · 0 评论 -
JSON.stringify的使用
JSON.stringify 详细使用官方定义interface JSON { /** * Converts a JavaScript Object Notation (JSON) string into an object. * @param text A valid JSON string. * @param reviver A function...原创 2019-07-26 10:22:59 · 719 阅读 · 0 评论 -
JavaScript 各种类型判断
变量function User(){}User.prototype.callName=function(){return 'zengwe'}let num = 123;let str = '123';let bool = true;let und = undefined;let nul = null;let obj = new User();let obj2 = {};let ...原创 2019-03-18 19:26:35 · 163 阅读 · 0 评论 -
Set、Map、WeakSet 和 WeakMap 的区别
SetMDN:Set 对象允许你存储任何类型的唯一值,无论是原始值或者是对象引用。let a = new Set();undefineda.add(1);// 输出 Set(1) {1}a.add(2);// 输出 Set(2) {1, 2}a.add(2);// 输出 Set(2) {1, 2}从代码上可以看出去重但是let b = new Set();b.add(...原创 2019-03-13 23:48:36 · 2284 阅读 · 0 评论 -
包的版本号的含义
版本号通常在package.json中都有一个三位的版本。"@angular/animations": "~7.1.0"各个位置的版本号的含义第一位主版本号,俗称大版本升级。标志这大变化,有可能不兼容上一个版本。第二位次版本号一般进行常规的新增或修改API,对于下一个大版本号要删除的API给予提示。最后三位仅仅是修复bug偶尔还会看到-×××的tag如alpha、beta、...原创 2019-01-09 22:24:01 · 1103 阅读 · 0 评论 -
JavaScript 垃圾回收
引用计数let a = { name: 'zengwe'};let b = a;// a 对象引用次数加1a = null;// a 对象引用次数减1b = null; 引用次数减为0, 此时退出这个环境时变量的内存将被回收循环引用function test() { let a = {name: 'zengwe'}; let b = {age: 18}; a.name = ...原创 2018-12-24 22:41:10 · 127 阅读 · 0 评论 -
npm 私有库搭建- verdaccio (一)
安装npm install -g verdaccio --unsafe-perm加上–unsafe-perm的原因会导致某些权限上的问题,哪怕是用root去执行也是存在权限问题错误信息如下gyp WARN EACCES user &quot;root&quot; does not have permission to access the dev dir &quot;/root/.node-gyp/10.13.0&quot;...原创 2018-12-04 20:55:14 · 1923 阅读 · 0 评论 -
nodejs导出excel----exceljs (1)
导出excel的库exceljs可导出excel,提供了可支持文件路径及文件流的方式去导出使用方法import * as Excel from 'exceljs'; ; // 如果是js则为 var Excel = require('exceljs');import * as Stream from 'stream';import { CellData } from '../m...原创 2018-08-06 22:24:28 · 4699 阅读 · 0 评论 -
javascript中async、await、yield、*的用法
async、await的用法function call(){ console.log('call funtion'); return new Promise(resolve=>{ setTimeout(function(){ console.log('call funtion timeout'); res...原创 2018-03-06 20:25:34 · 13428 阅读 · 0 评论 -
nodejs 无限递归创建文件夹
nodejs创建文件夹原创 2017-12-06 19:11:04 · 3280 阅读 · 2 评论 -
javascript中call、apply、bind区别
apply call bind原创 2017-11-30 21:11:30 · 178 阅读 · 0 评论 -
百度地图应用
百度地图的应用/**文档 http://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html*实例 http://lbsyun.baidu.com/jsdemo.html*类库实例 http://lbsyun.baidu.com/index.php?title=open/library*createBy Zengwe*/var原创 2017-09-08 12:03:32 · 225 阅读 · 0 评论