source component is put through repl or equivalent that shows the generated code, then minified with the imports removed.
This file contains 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 assert = (condition, message = 'Assertion failed') => { | |
if (!condition) { | |
throw new Error(message); | |
} | |
} | |
export class EventEmitter { | |
#listeners = Object.create(null); | |
on (type, listener) { |
This file contains 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 _location = location; | |
const _addListener = addEventListener; | |
const _removeListener = removeEventListener; | |
const isFunction = (x) => typeof x === 'function'; | |
const createElement = (el) => isFunction(el) ? new el() : document.createElement(el); | |
export const createRouter = ({ base, routes }) => { | |
base = '/' + (base || '').replace(/^\/+|\/+$/g, ''); |
This file contains 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
syntax = "proto3"; | |
package TachiyomiBackup; | |
// based on commit 5afff31f7246d0ede03344c955a47f4817e9fb92 | |
message BackupManga { | |
int64 source = 1; | |
string url = 2; | |
string title = 3; |
This file contains 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
/** | |
* @fileoverview | |
* Dashlane's password generator | |
* https://www.dashlane.com/features/password-generator | |
*/ | |
/** | |
* Generates a password | |
* @param {PasswordGeneratorOptions} options | |
* @returns {string} |
This file contains 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/EFForg/OpenWireless/blob/master/app/js/diceware.js | |
* @param {number} min | |
* @param {number} max | |
* @returns {number} | |
*/ | |
function random (min, max) { | |
const range = max - min; | |
let rval = 0; |
This file contains 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 { Trie } from './trie.js'; | |
import BTTVDB from './bttv.json' assert { type: 'json' }; | |
import FFZDB from './frankerfacez.json' assert { type: 'json' }; | |
import TwitchGlobalDB from './twitchglobal.json' assert { type: 'json' }; | |
// import TwitchSubscriberDB from './twitchsubscriber.json' assert { type: 'json' }; | |
const kws = []; | |
const db = { | |
bttv: BTTVDB, |
This file contains 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
// Monkeypatch system works like middlewares, you call next to run the next | |
// patch, before eventually reaching the original function. Patches are run | |
// in reverse order. | |
import { assert } from '../utils/index.js'; | |
const $$patched = '$$patched'; | |
const $$wares = '$$wares'; |
This file contains 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 effects = []; | |
let current = null; | |
let dirty = 0n; | |
let flushing = false; | |
export let access = Symbol(); | |
export function state (flag, value) { |
This file contains 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
export function isEqual (a, b) { | |
if (a === b) { | |
return true; | |
} | |
let aLength = 0; | |
let bLength = 0; | |
for (const key in a) { | |
if (a[key] !== b[key]) { |