摘要:
//定义函数 获取对象的构造函数(类)名 function getObjectClass(obj) { return Object.prototype.toString.call(obj).slice(8, -1) } function deepClone(obj) { if (getObjectC 阅读全文
摘要:
const fs = require('fs'); const promise = new Promise((resolve, reject) => { fs.open('./c.txt', 'w', (err, fd) => { if (!err) { resolve(fd); }else { r 阅读全文
摘要:
Function.prototype.call2 = function (context, ...args) { var context = context || window; //改变this指向 context.__proto__.fn = this; //调用函数 var res = con 阅读全文