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
/** | |
* @template T | |
* @typedef {import('./index.js').TupleTree<T>} TupleTree<T> | |
*/ | |
/** | |
* @template T | |
* @typedef {import('./index.js').TupleTreeEntry<T>} TupleTreeEntry<T> | |
*/ |
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
/** | |
* @implements {EventSource} | |
*/ | |
export default class JSONEventSource { | |
#closeCalled; | |
#url; | |
#initArgs; |
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 AsyncObject from './AsyncObject.js'; | |
/** @type {AsyncObject<Worker>} */ | |
const workerConstructor = new AsyncObject(); | |
/** @return {Promise<Worker>} */ | |
async function getConstructor() { | |
if (workerConstructor.hasValue()) { | |
return workerConstructor.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
import Connection from 'tedious/lib/connection.js'; | |
/** @typedef {import('tedious').ConnectionConfig} ConnectionConfig */ | |
/** @typedef {import('tedious').ConnectionError} ConnectionError */ | |
/** @typedef {import('tedious').RequestError} RequestError */ | |
const MIN_CONNECTION_POOL = 2; | |
const MAX_CONNECTION_POOL = 10; | |
const MAX_CONNECTION_IDLE = 5000; | |
const MAX_CONNECTION_RETRY_TIME = 30000; |
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 BIT_MASK_6 = 0b11_1111; | |
const BIT_MASK_8 = 0b1111_1111; | |
const CODEPOINT_SINGLE_LIMIT = 0x00_80; | |
const CODEPOINT_DOUBLE_LIMIT = 0x08_00; | |
const CODEPOINT_TRIPLE_LIMIT = 0x1_00_00; | |
const CODEPOINT_QUAD_LIMIT = 0x11_00_00; | |
const CODEPOINT_EXTRA_BYTE = 0b10 << 6; | |
const BASE64_CHAR_62 = '+'; |
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 class NetworkError extends Error { | |
/** | |
* @param {string} message | |
* @param {number} status | |
*/ | |
constructor(message, status) { | |
super(); | |
this.status = status; | |
} | |
} |
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
/** | |
* @template T | |
* @typedef {Object} CustomEventShimPrivateFields<T> | |
* @prop {T} detail | |
* @prop {string} type | |
* @prop {any} target | |
* @prop {any} currentTarget | |
* @prop {number} eventPhase | |
* @prop {boolean} bubbles | |
* @prop {boolean} cancelable |
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
/** | |
* @param {string} url | |
* @param {boolean} [useCredentials=false] | |
* @param {string} [integrity] | |
* @return {Promise<void>} | |
*/ | |
export function loadScript(url, useCredentials, integrity) { | |
return new Promise((resolve, reject) => { | |
const scripts = document.head.getElementsByTagName('script'); | |
for (let i = 0; i < scripts.length; i += 1) { |
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 RGB_FUNCTION = 'rgba?'; | |
const HSL_FUNCTION = 'hsla?'; | |
const HWB_FUNCTION = 'hwb'; | |
const CMYK_FUNCTION = 'device-cmyk'; | |
const LAB_FUNCTION = 'lab'; | |
const LCH_FUNCTION = 'lch'; | |
const GRAY_FUNCTION = 'gray'; | |
const COLOR_FUNCTION = 'color'; | |
const FUNCTION_START = '\\('; | |
/** https://www.w3.org/TR/css-syntax-3/#consume-function */ |
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 express from 'express'; | |
import cors from 'cors'; | |
import { sign, verify } from 'jsonwebtoken'; | |
/** | |
* @typedef AuthToken | |
* @prop {string=} sub UserID | |
* @prop {number} iat Issuance date in seconds | |
* @prop {number=} exp Expiration date in seconds | |
*/ |
NewerOlder