会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
TING FENG
When the whole world is about to rain, let's make it clear in our heart together
热爱前端开发,专注于前端
婷风
Hey,Girl,Sharing & Loving
博客园
首页
联系
订阅
管理
2022年2月12日
手动编写一个promise.all函数
摘要: 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 婷风
阅读(152)
评论(0)
推荐(0)
2022年2月11日
编写一个函数来查找字符串数组中的最长公共前缀。
摘要: 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 婷风
阅读(141)
评论(0)
推荐(0)
2021年11月4日
JS实现颜色值格式转换 rgb和十六进制的转换
摘要: 【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 婷风
阅读(1748)
评论(0)
推荐(0)
2019年2月21日
【翻译】追溯“typeof null”的历史
摘要: 我的翻译小站: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 婷风
阅读(485)
评论(1)
推荐(0)
2018年9月12日
【翻译】使用Vuex解决Vue中的身份验证
摘要: 翻译原文链接: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 婷风
阅读(4879)
评论(0)
推荐(3)
下一页
公告