This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://developer.chrome.com/docs/extensions/reference/api/tabGroups | |
| // Chrome 浏览器分组颜色 RGB 色值 | |
| // Chrome browser tab group color RGB | |
| const colorMap = { | |
| grey: "#d5d7d8", | |
| blue: "#81acf3", | |
| red: "#ea8279", | |
| yellow: "#facf62", | |
| green: "#7cc08c", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/tldraw/tldraw-yjs-example | |
| import { | |
| InstancePresenceRecordType, | |
| TLAnyShapeUtilConstructor, | |
| TLInstancePresence, | |
| TLRecord, | |
| TLStoreWithStatus, | |
| computed, | |
| createPresenceStateDerivation, | |
| createTLStore, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var foo = () => arguments[0]; | |
| foo(); // arguments is not defined | |
| function bar() { | |
| return arguments[0]; | |
| } | |
| bar(); // undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let arr = (...params) => console.log(params); | |
| arr(1, 2, 3) | |
| // [1, 2, 3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let foobar = (param1, param2 = "param2") => { | |
| console.log(param1); | |
| console.log(param2); | |
| } | |
| foobar(1); | |
| // 1 | |
| // param2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var FooBar = () => {}; | |
| console.log(FooBar.prototype); | |
| // undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let Clock = () => { | |
| this.sec = 0; | |
| setInterval(() => { | |
| this.sec ++; | |
| }, 1000) | |
| } | |
| var newClock = new Clock(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| function Clock() { | |
| var _this = this; | |
| this.sec = 0; | |
| setInterval(function () { | |
| _this.sec++; | |
| }, 1000); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Clock(){ | |
| this.sec = 0; | |
| setInterval(() => { | |
| this.sec ++; | |
| }, 1000) | |
| } | |
| var newClock = new Clock(); |