# JavaScript
# Flag
对网页行为进行编程,Vanilla JS 就是指JavaScript(ECMAscript)
- ECMAScript支持度检测 https://github.com/ruanyf/es-checker (opens new window)
- 检查JS文件中的ES版本 https://github.com/dollarshaveclub/es-check (opens new window)
- ES6支持情况 https://github.com/compat-table/compat-table (opens new window)
- https://github.com/financial-times/polyfill-service (opens new window)
- https://github.com/taylorhakes/promise-polyfill (opens new window)
Polyfill (opens new window) 是一块代码(通常是 Web 上的 JavaScript) ,用来为旧浏览器提供它没有原生支持的较新的功能
- 服务器实时消息获取的技术方案 (opens new window)
- JS刷新当前页面的几种方法总结 (opens new window)
- js keyup、keypress和keydown事件 详解 (opens new window)
- js中keyup-keypress-keydown以及oninput四个事件 (opens new window)
- keydown,keypress,keyup三者之间的区别 (opens new window)
- 前端三大框架与 YUI 以及 EXT.js 这类组件化框架最大的区别是什么? (opens new window)
- ECMAscript和Javascript的区别 (opens new window)
- KeyboardEvent.keyCode已弃用,MDN已经提供了一个解决方案 (opens new window)
- JS 获取内网 IP 地址(兼容谷歌浏览器) (opens new window)
- https://github.com/wingscloud (opens new window)
- 部署同步 https://github.com/Browsersync/browser-sync (opens new window)
js运行时/js引擎/JavaScript运行时/JavaScript引擎
- 恶意软件分析 https://github.com/HynekPetrak/malware-jail (opens new window)
- 物联网的超轻量级JavaScript引擎 https://github.com/jerryscript-project/jerryscript (opens new window)
- 嵌入式系统的微型JS引擎 https://github.com/cesanta/elk (opens new window)
- https://github.com/boa-dev/boa (opens new window)
- https://github.com/denoland/deno (opens new window)
- https://github.com/servo/servo (opens new window)
- https://github.com/bellard/quickjs (opens new window)
- https://github.com/saghul/txiki.js (opens new window)
- https://github.com/oven-sh/bun (opens new window)
- https://github.com/svaarala/duktape (opens new window)
- https://mujs.com (opens new window)
- https://github.com/gfwilliams/tiny-js (opens new window)
- https://github.com/cesanta/v7 (opens new window)
- https://github.com/zurb/tribute (opens new window)
- https://github.com/chakra-core/ChakraCore (opens new window)
- https://github.com/eclipsesource/J2V8 (opens new window)
- https://github.com/oracle/graaljs (opens new window)
- https://github.com/mozilla/rhino (opens new window)
- https://github.com/gwtproject/gwt (opens new window)
- https://github.com/CanadaHonk/porffor (opens new window)
# 学习
- https://github.com/topics/es6 (opens new window)
- https://github.com/topics/es2016 (opens new window)
- https://github.com/topics/linting (opens new window)
- https://github.com/ruanyf/jstutorial (opens new window)
- https://github.com/revolunet/JSbooks (opens new window)
- https://exploringjs.com (opens new window)
- https://github.com/es5/es5.github.io (opens new window)
- ECMAScript 6入门 https://github.com/ruanyf/es6tutorial (opens new window)
- https://github.com/ericdouglas/ES6-Learning (opens new window)
- https://github.com/lukehoban/es6features (opens new window)
- https://github.com/rse/es6-features (opens new window)
- Learn ES2015 (opens new window)
- 特性列表 https://github.com/daumann/ECMAScript-new-features-list (opens new window)
- https://github.com/sudheerj/ECMAScript-features (opens new window)
- https://github.com/30-seconds (opens new window)
- https://www.javascript.com (opens new window)
- 现代JavaScript教程 https://github.com/javascript-tutorial/zh.javascript.info (opens new window)
- 浏览器脚本教程 https://www.w3school.com.cn/b.asp (opens new window)
- 参考手册 https://www.w3school.com.cn/r.asp (opens new window)
- JavaScript基础知识 https://www.kancloud.cn/yangguangzhang/yangguangzhang--javascript (opens new window)
- https://github.com/2xiao/leetcode-js (opens new window)
- 文档对象模型 (DOM) https://developer.mozilla.org/zh-CN/docs/Glossary/DOM (opens new window)
- https://github.com/Asabeneh/30-Days-Of-JavaScript (opens new window)
- https://github.com/wesbos/JavaScript30 (opens new window)
- https://gaohaoyang.github.io (opens new window)
- 答题 https://github.com/lydiahallie/javascript-questions (opens new window)
- https://github.com/felipefialho/frontend-challenges (opens new window)
- https://github.com/coffe1891/frontend-hard-mode-interview (opens new window)
- https://github.com/icepy/Front-End-Develop-Guide (opens new window)
- https://github.com/you-dont-need (opens new window)
- https://github.com/getify/You-Dont-Know-JS (opens new window)
- https://github.com/Asabeneh/JavaScript-for-Everyone (opens new window)
- 学习代码总结 https://github.com/csxiaoyaojianxian/JavaScriptStudy (opens new window)
- https://github.com/comehope/front-end-daily-challenges (opens new window)
- https://github.com/gothinkster/realworld (opens new window)
- https://github.com/tanpero/JavaScript-Art-Tour (opens new window)
- JS技巧 https://github.com/loverajoel/jstips (opens new window)
- https://www.javascriptcn.com (opens new window) 1212/1024
- https://github.com/superherojs/superherojs (opens new window)
- 单行代码 https://github.com/1milligram/1loc (opens new window)
- ES6、ES7、ES8特性一锅炖(ES6、ES7、ES8学习指南) (opens new window)
- ES6、ES7、ES8、ES9、ES10新特性一览 (opens new window)
- 页面生命周期:DOMContentLoaded,load,beforeunload,unload (opens new window)
模块规范
UMD(Universal Module Definition) https://github.com/umdjs/umd (opens new window)
AMD(Asynchronous Module Definition) https://github.com/amdjs (opens new window)
CMJ(CommonJS) https://github.com/cmdjs (opens new window)
ESM(ECMAScript modules) https://nodejs.org/api/esm.html (opens new window)
/**
* CommonJS 主要是NodeJs使用
* 在一个node执行一个文件时,会给这个文件内生成一个 exports和module对象,而module有一个exports属性。
* exports = module.exports = {};
*/
module.exports.x = x; // 导出模块
module.exports = {};
// 为了方便,Node为每个模块提供一个exports变量,指向module.exports
// 注意,不能直接将exports变量指向一个值,因为这样等于切断了exports与module.exports的联系
//exports.x = x;
var example = require('./example.js'); // 导入模块
/**
* AMD(Asynchronous Module Defination,浏览器端js模块化) 主要是RequireJS使用
*/
//定义模块myModule.js
define(['dependency'],function(){
var name = 'Bily';
function printName(){
console.log(name);
}
return {
printName: printName
}
});
//加载模块
require(['myModule'],function(my){
my.printName();
});
/**
* CMD(Common Module Definition,通用模块定义)
*/
// cmd1.js
define(function(require,exports,module){
// ...
module.exports={
// ...
}
});
// cmd2.js
define(function(require,exports,module){
var cmd2 = require('./cmd1')
// cmd2.xxx 依赖就近书写
module.exports={
// ...
}
});
/**
* ECMAScript6
* export与export default均可用于导出常量、函数、文件、模块等
* 在一个文件或模块中,export、import可以有多个,export default仅有一个
* 通过export方式导出,在导入时要加{ },export default则不需要
* export能直接导出变量表达式,export default不行。
*/
export x = x; // 导出模块
export default {} // 为模块指定默认输出
import { stat, exists, readFile } from 'fs'; // 导入模块
var express = require('express');
Uncaught SyntaxError: Cannot use import statement outside a module
在报错是说无法在模块外部使用
import语句,因为Module的加载实现的是es6语法, 所以在浏览器加载html文件时,需要在script标签中加入type="module"属性。
<script type="module" src="/static/js/index.js"></script>
# 微前端
Micro-frontends
- https://github.com/module-federation/core (opens new window)
- https://github.com/smapiot/piral (opens new window)
- https://github.com/single-spa (opens new window)
- https://github.com/teambit/bit (opens new window)
- https://github.com/systemjs (opens new window)
- https://github.com/opencomponents (opens new window)
- https://github.com/umijs/qiankun (opens new window)
- https://github.com/SAP/luigi (opens new window)
- https://github.com/frintjs/frint (opens new window)
- https://github.com/puzzle-js (opens new window)
# TypeScript
- https://github.com/Microsoft/TypeScript (opens new window)
- 深入理解TypeScript https://jkchao.github.io/typescript-book-chinese (opens new window)
- https://github.com/basarat/typescript-book (opens new window)
- https://github.com/gibbok/typescript-book (opens new window)
- https://github.com/amoilanen/Algorithms-with-TypeScript (opens new window)
- https://github.com/lgarron (opens new window)
- 类型定义 https://github.com/DefinitelyTyped/DefinitelyTyped (opens new window)
- 静态分析 https://github.com/kaleidawave/ezno (opens new window)
- https://github.com/total-typescript/ts-reset (opens new window)
- https://github.com/adobe/spectrum-web-components (opens new window)
- https://github.com/semgrep/semgrep (opens new window)
- https://github.com/opengrep/opengrep (opens new window)
- IO解码/编码 https://github.com/gcanti/io-ts (opens new window)
- 动画 https://github.com/AriaMinaei/theatre (opens new window)
- 表格 https://github.com/gristlabs/grist-core (opens new window)
- https://github.com/rxliuli/liuli-tools (opens new window)
- https://github.com/dsherret/dts-minify (opens new window)
- 可视化图表 https://github.com/VisActor (opens new window)
- WebSockets https://github.com/soketi (opens new window)
- DOM https://github.com/snabbdom/snabbdom (opens new window)
- 数据验证 https://github.com/nvie/decoders (opens new window)
- https://github.com/colinhacks/zod (opens new window)
- 操作docx文件 https://github.com/dolanmiu/docx (opens new window)
- https://github.com/Siemienik/XToolset (opens new window)
- https://github.com/juanjoDiaz/json2csv (opens new window)
- 渐进式 https://github.com/dojo (opens new window)
- https://github.com/trpc/trpc (opens new window)
- SQL查询生成 https://github.com/kysely-org/kysely (opens new window)
- 文件 https://github.com/hughfenghen/opfs-tools (opens new window)
- 3D渲染 https://github.com/Orillusion/orillusion (opens new window)
- TS转JS https://github.com/bloomberg/ts-blank-space (opens new window)
- HTTP https://github.com/lukeed/fetch-event-stream (opens new window)
- 收集事件数据 https://github.com/jitsucom/jitsu (opens new window)
- Node.js运行TypeScript https://github.com/privatenumber/tsx (opens new window)
- TS转JS https://github.com/JohnDeved/awesome-typescript-compilers (opens new window)
- https://github.com/microsoft/TypeScript-Website (opens new window)
- https://github.com/ritz078/transform (opens new window)
- https://github.com/evanw/esbuild (opens new window)
- https://github.com/babel/babel (opens new window)
- https://github.com/oxc-project/oxc (opens new window)
- https://github.com/swc-project/swc-playground (opens new window)
- https://github.com/alangpierce/sucrase (opens new window)
- https://github.com/jerosoler/ts2js (opens new window)
- https://www.gitloop.com/tool/typescript-to-javascript (opens new window)
- https://extendsclass.com/typescript-to-javascript.html (opens new window)
# WebAssembly
- https://github.com/WebAssembly (opens new window)
- https://developer.mozilla.org/zh-CN/docs/WebAssembly (opens new window)
- https://webassembly.org (opens new window)
- https://www.wasm.com.cn (opens new window)
- https://github.com/kripken (opens new window)
- https://github.com/emscripten-core (opens new window)
- https://github.com/emscripten-ports (opens new window)
- https://github.com/AssemblyScript (opens new window)
- https://github.com/kettle11/tangle (opens new window)
- https://github.com/wasm3 (opens new window)
- https://github.com/wasmerio (opens new window)
- https://github.com/wasmi-labs (opens new window)
- https://github.com/fermyon/spin (opens new window)
- https://github.com/finos/perspective (opens new window)
- 哈希函数 https://github.com/Daninet/hash-wasm (opens new window)
- Mozilla:可以用 Rust + WebAssembly 作为 JavaScript 替代
- Google:可以用 Dart + WebAssembly 作为 JavaScript 替代
- Microsoft:可以用 TypeScript/AssemblyScript + WebAssembly 作为 JavaScript 替代
- webAssembly--浏览器第二语言 (opens new window)
- 走进 WebAssembly 的世界 (opens new window)
- WebAssembly 模块化与动态链接 (opens new window)
- 微信小游戏 https://github.com/wechat-miniprogram (opens new window)
- https://github.com/ShizukuIchi/winXP (opens new window)
- Web容器 https://github.com/stackblitz/webcontainer-core (opens new window)
- https://github.com/ktock/container2wasm (opens new window)
- https://github.com/sebastianwessel/quickjs (opens new window)
- Web虚拟机 https://github.com/leaningtech/webvm (opens new window)
- https://github.com/WasmEdge/WasmEdge (opens new window)
- JVM https://github.com/leaningtech/browsercraft (opens new window)
- Rust https://github.com/copy/v86 (opens new window)
- https://github.com/bytecodealliance/wasmtime (opens new window)
- https://github.com/lumen/lumen (opens new window)
- https://github.com/eirproject (opens new window)
- https://github.com/second-state/wasmedge-bindgen (opens new window)
- https://github.com/rustwasm (opens new window)
- C https://github.com/emscripten-core/emscripten (opens new window)
- https://github.com/wasdk/WasmFiddle (opens new window)
- https://github.com/mbebenita/WasmExplorer (opens new window)
- https://github.com/ffmpegwasm/ffmpeg.wasm (opens new window)
- go https://github.com/JohnStarich/go-wasm (opens new window)
- https://github.com/tetratelabs (opens new window)
- python https://github.com/pyodide/pyodide (opens new window)
- TypeScript https://github.com/AssemblyScript (opens new window)
← HTML JavaScript框架 →