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
| [AutoProxy 0.2.9] | |
| ! Checksum: j9+lCGr2eTNyrwZCFg8ZzQ | |
| ! Expires: 6h | |
| ! Title: GFWList4LL | |
| ! GFWList with EVERYTHING included | |
| ! Last Modified: Mon, 07 Oct 2024 11:39:43 -0400 | |
| ! | |
| ! HomePage: https://github.com/gfwlist/gfwlist | |
| ! License: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt | |
| ! |
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
| const fs = require("fs"); | |
| const path = require("path"); | |
| const IgnoreFiles = ["node_modules", ".idea", ".vscode", "package-lock.json", "yarn.lock"]; | |
| class RemoveComments { | |
| sourcePath = ""; | |
| targetPath = ""; | |
| constructor(sourcePath, targetPath) { | |
| this.sourcePath = sourcePath; |
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
| import { fileURLToPath } from "node:url" | |
| export const __dirname = () => fileURLToPath(import.meta.url) |
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
| import React from 'react'; | |
| const genContainer = | |
| (name: string): React.FC => | |
| ({ children }) => | |
| ( | |
| <div> | |
| <h1>I'm {name}</h1> | |
| <div style={{ paddingLeft: '10px' }}>{children}</div> | |
| </div> |
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
| class Node<T> { | |
| value: T | |
| next?: Node<T> | |
| constructor(value: T) { | |
| this.value = value | |
| } | |
| } | |
| class Queue<T> { | |
| private _size = 0 |
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 shallowClone(obj) { | |
| if (typeof obj !== 'object') return obj; | |
| const newObj = obj instanceof Array ? [] : {}; | |
| for (let key of Object.keys(obj)) { | |
| newObj[key] = obj[key]; | |
| } | |
| return newObj; | |
| } |
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 deepCopySimple(obj) { | |
| return JSON.parse(JSON.stringify(obj)); | |
| } | |
| function deepClone(obj) { | |
| if (typeof obj !== 'object') return obj; | |
| const newObj = obj instanceof Array ? [] : {}; | |
| for (let key of Object.keys(obj)) { | |
| if (typeof obj[key] !== 'object') { |
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
| class EventBus { | |
| constructor() { | |
| this.eventMap = {} | |
| this.onceEventMap = {} | |
| } | |
| on(eventName, listener) { | |
| if (!this.eventMap[eventName]) { | |
| this.eventMap[eventName] = [listener] | |
| } else { |
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
| abstract class CustomStorage { | |
| abstract storage: any; | |
| abstract getItem<T>(key: string): T | null; | |
| abstract setItem(key: string, value: any): void; | |
| abstract removeItem(key: string): void; | |
| abstract clear(): void; | |
| getItemAndDelete<T>(key: string): T | null { |
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 curry(fn) { | |
| return function curried(...args) { | |
| if (fn.length === args.length) { | |
| return fn.apply(this, args); | |
| } | |
| return (...extraArgs) => { | |
| return curried.apply(this, args.concat(extraArgs)); | |
| }; | |
| }; | |
| } |
NewerOlder