When the whole world is about to rain, let's make it clear in our heart together

热爱前端开发,专注于前端

摘要: Promise.all = function(iterable) { return new Promise((resolve, reject) => { let result = [] for(const item of iterable) { item.then(data => { result. 阅读全文
posted @ 2022-02-12 15:40 婷风 阅读(120) 评论(0) 推荐(0) 编辑
摘要: function longestCommonPrefix2(strs){ if(!strs || strs.length == 0){ return '' } var temp = strs[0] for(var i=0;i<strs.length;i++){ var j = 0; for(;j<s 阅读全文
posted @ 2022-02-11 11:29 婷风 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 【16进制转换为RGB 】 16进制一般有3位或者6位,如果为3位的话,需要补齐为6位 set16ToRgb(str){ var reg = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/ if(!reg.test(str)){return;} let newStr = ( 阅读全文
posted @ 2021-11-04 16:20 婷风 阅读(1675) 评论(0) 推荐(0) 编辑
摘要: 我的翻译小站:https://www.zcfy.cc/article/the-history-of-typeof-null 翻译原文链接:http://2ality.com/2013/10/typeof-null.html 更新2013-11-05:我发现用C语言能够很好的解释为什么typeof n 阅读全文
posted @ 2019-02-21 17:03 婷风 阅读(466) 评论(1) 推荐(0) 编辑
摘要: 翻译原文链接:https://scotch.io/tutorials/handling-authentication-in-vue-using-vuex 我的翻译小站:https://www.zcfy.cc/article/handling-authentication-in-vue-using-v 阅读全文
posted @ 2018-09-12 15:11 婷风 阅读(4774) 评论(0) 推荐(3) 编辑