![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
LuckRain7
这个作者很懒,什么都没留下…
展开
-
五个 JavaScript 小技巧
在这篇文章中,我将介绍一些我在编程时尝试使用的小技巧。这些技巧是我最近在工作中总结的,以及多年来从同事那里偷来的一些小技巧。一下小技巧没没有特定的顺序。1. 提早退出(Early exits)function transformData(rawData) { // 无效用例 if (!rawData) { return []; } // 检查个别个案 if (rawData.length == 1) { return []; } // 实际执行函数 .转载 2020-12-30 20:42:41 · 210 阅读 · 0 评论 -
学习笔记-浏览器内多个标签页之间的通讯
Redux vuex 这个是单页面应用里跨页面状态管理 多页应用 跨页面数据传递本题主要考察多页应用中各个页签之间数据交互的技术手段。实现多页通讯主要有利用浏览器数据存储方式:浏览器数据存储的方式主要用本地存储方式解决,即调用localStorage、Cookie等本地存储方式。服务器方式:主要使用websocket技术使多页签都监听服务器推送事件来获得其他页签发送的数据。浏览器存储:第一种:localStorage:在一个标签页里面使用localStorage.setItem(ke..转载 2020-11-14 12:16:38 · 250 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第42周)
1. mengshukeji/Luckysheet项目地址:https://github.com/mengshukeji/Luckysheet⭐:4,449 | forks:350 | 1,727 stars this weekLuckysheet是一个类似excel的在线电子表格,功能强大,配置简单,完全开源。2. lxk0301/scripts项目地址:https://github.com/lxk0301/scripts⭐:812 | forks:808 | 172 stars thi.原创 2020-11-04 10:26:35 · 785 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第41周)
1. Asabeneh/30-Days-Of-React项目地址:https://github.com/Asabeneh/30-Days-Of-React⭐:2,363 | forks:576 | 658 stars this week30天的React挑战是React的分步学习指南。 这一挑战需要中等水平的HTML,CSS和JavaScript知识。 建议您在开始使用React之前先熟练使用JavaScript。 如果您对JavaScript不满意,请查看30Days Of JavaScript.原创 2020-11-01 17:07:41 · 2084 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第39周)
2020年9月21日-2020年9月28日1. jhipster/generator-jhipster项目地址:https://github.com/jhipster/generator-jhipster⭐:17,357 | forks:3,435 | 71 stars this weekJHipster是一个开发平台,可以快速生成,开发和部署现代Web应用程序和微服务架构。2. CleverProgrammers/react-challenge-amazon-clone项目地址:ht..原创 2020-10-04 20:59:13 · 459 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第38周)
2020年9月14日-2020年9月21日1. jhipster/generator-jhipster项目地址:https://github.com/jhipster/generator-jhipster⭐:17,307 | forks:3,417 | 219 stars this weekJHipster是一个开发平台,可以快速生成,开发和部署现代Web应用程序和微服务架构。2. CleverProgrammers/react-challenge-amazon-clone项目地址:h..原创 2020-09-22 16:36:17 · 406 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第37周)
2020年9月7日-2020年9月14日1. vasanthv/talk项目地址:https://github.com/vasanthv/talk⭐:1,128 | forks:89 | 714 stars this week网络上的群组视频通话。 不需要注册。 不需要下载。2. 30-seconds/30-seconds-of-code项目地址:https://github.com/30-seconds/30-seconds-of-code⭐:61,620 | forks:6,587.原创 2020-09-14 11:41:24 · 2555 阅读 · 0 评论 -
异步编程面试题解析
1、字节跳动面试题async function async1() { console.log("async1 start"); await async2(); console.log("async1 end");}async function async2() { console.log("async2");}console.log("script start");setTimeout(function () { console.log("setTimeout");}, .原创 2020-09-10 11:52:44 · 433 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第36周)
1. oldboyxx/jira_clone项目地址:https://github.com/oldboyxx/jira_clone⭐:5,976 | forks:642 | 174 stars this week使用 React / Babel 和 Node / TypeScript(API)构建的简化的 Jira。2. flybywiresim/a32nx项目地址:https://github.com/flybywiresim/a32nx⭐:1,086 | forks:130 | 364.原创 2020-09-09 15:24:05 · 778 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第35周)
2020年8月24日 - 2020年8月31日1. RocketChat/Rocket.Chat项目地址:https://github.com/RocketChat/Rocket.Chat⭐:28,119 | forks:6,094 | 298 stars this week团队沟通的终极免费开源解决方案。2. tobspr/shapez.io项目地址:https://github.com/tobspr/shapez.io⭐:1,900 | forks:419 | 205 stars .原创 2020-08-31 20:27:13 · 428 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第34周)
1. maratonadev-la/desafio-1-2020项目地址:https://github.com/maratonadev-la/desafio-1-2020⭐:107 | forks:170 | 69 stars this weekAlestra是唯一一家拥有20多年数字转换领导者和10多年企业创新解决方案经验的数字创新提供商。 通过其产品组合,它可以与全球领先的技术制造商结盟,为组织提供托管网络解决方案,协作,网络安全,云和系统集成。2. maratonadev-br/desaf原创 2020-08-24 11:55:39 · 460 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第34周)
2020年8月10日-2020年8月17日1. tailwindlabs/heroicons项目地址:https://github.com/tailwindlabs/heroicons⭐:8,300 | forks:438 | 2,043 stars this weekMIT许可的高质量SVG图标,可用于UI开发。2. facebook/docusaurus项目地址:https://github.com/facebook/docusaurus⭐:18,609 | forks:2,09..原创 2020-08-17 16:46:49 · 499 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第33周)
2020年8月3日 - 2020年8月10日1. facebook/react-native项目地址:https://github.com/facebook/react-native⭐:89,325 | forks:19,796 | 293 stars this week使用 React 构建手机应用程序的框架。2. goldbergyoni/nodebestpractices项目地址:https://github.com/goldbergyoni/nodebestpractices..原创 2020-08-10 21:35:20 · 1849 阅读 · 0 评论 -
[GitHub] JavaScript 趋势榜项目(第31周)
2020年7月20日 - 2020年7月27日1. anuraghazra/github-readme-stats项目地址:https://github.com/anuraghazra/github-readme-stats⭐:3066 | forks:342 | 1436 stars this week⚡ 为您的 GitHub 自述文件动态生成的统计信息2. FortAwesome/Font-Awesome项目地址:https://github.com/FortAwesome/Fon..原创 2020-07-27 16:56:09 · 490 阅读 · 0 评论 -
在 Array.some 中正确使用 async
使用 Promise 检查集合本文译自:How to use async functions with Array.some and every in Javascript - 在第一篇文章中, 我们介绍了async / await 如何帮助执行异步命令 ,但是在异步处理集合时却无济于事。在这篇文章中,当结果为布尔值时,我们将研究 some 和 every 函数用于更有效的 reduce...翻译 2020-04-24 13:38:58 · 433 阅读 · 0 评论 -
如何正确的在 Array.map 使用 async
在 map 中返回Promises,然后等待结果本文译自How to use async functions with Array.map in Javascript - Tamás Sallai 。在前面的文章中,我们介绍了 async / await如何帮助执行异步命令 ,但在异步处理集合时却无济于事。在本文中,我们将研究该map函数,该函数是最常用的函数,它将数据从一种形式转换为另...翻译 2020-04-22 10:35:41 · 1494 阅读 · 0 评论 -
一道关于JavaScript 代码执行顺序的面试题解析
0. 引言:最近写了一些异步递归的代码,着实有点头疼,索性重新研究一下JavaScript 代码执行顺序,并附上一道面试题的解析。1. JavaScript 代码执行顺序首先我们了解几个概念1.1 微任务/宏任务异步队列中包括:微任务(micro-task) 和 宏任务(macro-task)微任务包括: process.nextTick ,Promise ( proces...原创 2020-04-20 11:47:07 · 971 阅读 · 0 评论 -
在 Array.reduce 中正确使用 async
如何使用带有reduce的Promise以及如何在串行和并行处理之间进行选择本文译自How to use async functions with Array.reduce in Javascript - Tamás Sallai 。在第一篇文章中,我们介绍了async / await 如何帮助执行异步命令,但在异步处理集合时却无济于事。在本文中,我们将研究reduce函数,它是功能最...翻译 2020-04-15 16:47:53 · 634 阅读 · 0 评论 -
如何在 Array.filter 中正确使用 Async
本文译自How to use async functions with Array.filter in Javascript - Tamás Sallai 。0. 如何仅保留满足异步条件的元素在第一篇文章中,我们介绍了 async / await 如何帮助处理异步事件,但在异步处理集合时却无济于事。在本文中,我们将研究该filter函数,它可能是支持异步函数的最直观的方法。1. ...转载 2020-04-13 20:57:55 · 863 阅读 · 0 评论 -
如何在 Array.forEach 中正确使用 Async
本文译自How to use async functions with Array.forEach in Javascript - Tamás Sallai 。0. 如何异步遍历元素在第一篇文章中,我们介绍了async / await如何帮助处理异步事件,但在异步处理集合时却无济于事。在本文中,我们将研究该forEach功能,当您需要为集合中的每个元素运行一段代码时,该功能将非常有用。...翻译 2020-04-10 16:36:36 · 1042 阅读 · 0 评论