
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 · 422 阅读 · 0 评论 -
npm 学习
npm 的使用 命令概览 zengwe$ npm --help Usage: 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 · 1321 阅读 · 0 评论 -
console 的用法
console 的用法 console.log console.log 就是打印对象,Element打印时就和选中dom检查一样, 可多对象打印 let obj1 = { name: 'zengwe', gender: 'mal', age: 18, other: { career: 'font-end' } } let obj2 = { ...原创 2019-08-14 09:52:05 · 665 阅读 · 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 · 795 阅读 · 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 · 211 阅读 · 0 评论 -
Set、Map、WeakSet 和 WeakMap 的区别
Set MDN:Set 对象允许你存储任何类型的唯一值,无论是原始值或者是对象引用。 let a = new Set(); undefined a.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 · 2348 阅读 · 0 评论 -
包的版本号的含义
版本号 通常在package.json中都有一个三位的版本。 "@angular/animations": "~7.1.0" 各个位置的版本号的含义 第一位 主版本号,俗称大版本升级。标志这大变化,有可能不兼容上一个版本。 第二位 次版本号一般进行常规的新增或修改API,对于下一个大版本号要删除的API给予提示。 最后三位 仅仅是修复bug 偶尔还会看到-×××的tag 如alpha、beta、...原创 2019-01-09 22:24:01 · 1204 阅读 · 0 评论 -
JavaScript 垃圾回收
引用计数 let a = { name: 'zengwe'}; let b = a; // a 对象引用次数加1 a = null; // a 对象引用次数减1 b = null; 引用次数减为0, 此时退出这个环境时变量的内存将被回收 循环引用 function test() { let a = {name: 'zengwe'}; let b = {age: 18}; a.name = ...原创 2018-12-24 22:41:10 · 165 阅读 · 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 · 2038 阅读 · 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 · 4849 阅读 · 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 · 13615 阅读 · 0 评论 -
nodejs 无限递归创建文件夹
nodejs 创建文件夹原创 2017-12-06 19:11:04 · 3375 阅读 · 2 评论 -
javascript中call、apply、bind区别
apply call bind原创 2017-11-30 21:11:30 · 218 阅读 · 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 · 255 阅读 · 0 评论