摘要: instanceof 是通过原型链判断的,A instanceof B, 在A的原型链中层层查找,是否有原型等于B.prototype,如果一直找到A的原型链的顶端null,仍然不等于B.prototype,那么返回false,否则返回true. function instance(left,rig 阅读全文
posted @ 2019-08-07 21:31 dawn~monster 阅读(3918) 评论(0) 推荐(0) 编辑
摘要: function myPromise(fn){ let status='pending',successCallback=[],failedCallback=[],data=null,reason=null this.then=function(fulfilled,rejected){ if(status=='pending'){ ... 阅读全文
posted @ 2019-07-31 21:04 dawn~monster 阅读(372) 评论(0) 推荐(0) 编辑
摘要: function curr(fn,...args){ retuen args.lengthcurr(fn,...args,...arguments):fn(...args) } 阅读全文
posted @ 2019-07-30 11:36 dawn~monster 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 2 阅读全文
posted @ 2019-07-30 09:50 dawn~monster 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Function.prototype.bind=function(ctx,...lastArgs){ let self=this return (...laterArgs)=>self.apply(ctx,lastArgs.concat(laterArgs)) } 阅读全文
posted @ 2019-07-29 23:10 dawn~monster 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1:[...new Set(arr)] Array.from(new Set(arr)) 2: 阅读全文
posted @ 2019-07-29 21:03 dawn~monster 阅读(73) 评论(0) 推荐(0) 编辑
摘要: function deepClone(obj){ if(obj instanceof RegEpx) return new RegEpx(obj) if(obj instanceof Date) return new Date(obj) if(typeof obj !=='object') return obj let arr=Array.isArr... 阅读全文
posted @ 2019-07-29 18:24 dawn~monster 阅读(158) 评论(0) 推荐(0) 编辑
摘要: function New(fn,...args){ let obj={} obj.__proto__=fn.prototype let result=fn.apply(obj,args) if(typeof result==='object'||typeof result==='function'){ return result ... 阅读全文
posted @ 2019-07-29 17:31 dawn~monster 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 本项目是一个用vue和node以及mysql实现的一个简单的个人博客系统,整体逻辑比较简单。但是可以我们完整的了解一个项目从数据库到后端到前端的实现过程,适合不太懂这一块的朋友们拿来练手。 本项目所用到的技术和工具: 前端:vue,element-ui,axios,webpack,npm或者yarn 阅读全文
posted @ 2019-07-06 16:15 dawn~monster 阅读(7823) 评论(5) 推荐(1) 编辑
摘要: Git是一个分布式的版本控制系统,与集中式的版本控制系统不同的是,每个人都工作在通过克隆建立的本地版本库中。也就是说每个人都拥有一个完整的版本库,查看提交日志、提交、创建里程碑和分支、合并分支、回退等所有操作都直接在本地完成而不需要网络连接。以下是我们经常用到的git命令 git基本命令 git i 阅读全文
posted @ 2019-07-06 15:06 dawn~monster 阅读(95) 评论(0) 推荐(0) 编辑