Creates an exclusion list to only download the NGS version for PSO2 Global.
You can't use this on a mainline version of Legendary just yet, pull request is still pending
import { style } from '@vanilla-extract/css'; | |
const NEW_RULE = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g; | |
const RULE_CLEAN = /\/\*[^]*?\*\/| +/g; | |
const RULE_NEWLINE = /\n+/g; | |
const EMPTY = ' '; | |
/** | |
* @param {string} val | |
* @returns {object} |
import { stableStringify } from '@intrnl/stable-stringify'; | |
const defaultKey = () => {}; | |
const defaultId = (x) => x.id; | |
export const createBatchedFetch = (options) => { | |
const { | |
fetch, | |
limit = 100, |
let effects = []; | |
let current = null; | |
let dirty = 0n; | |
let flushing = false; | |
export let access = Symbol(); | |
export function state (flag, value) { |
import http from 'node:http'; | |
export function createRunner (middlewares) { | |
/** | |
* @param {http.IncomingMessage} request | |
* @param {http.ServerResponse} response | |
* @param {(error?: any) => void} done | |
*/ | |
return function runner (request, response, done = createFinalHandler(request, response)) { | |
let idx = 0; |
let map; | |
function generateUUID () { | |
const buf = crypto.getRandomValues(new Uint8Array(16)); | |
buf[6] = (buf[6] & 0x0f) | 0x40; | |
buf[8] = (buf[8] & 0x3f) | 0x80; | |
if (!map) { | |
map = []; |
Creates an exclusion list to only download the NGS version for PSO2 Global.
You can't use this on a mainline version of Legendary just yet, pull request is still pending
import { run, bench, group } from 'https://esm.sh/mitata'; | |
function escape (value) { | |
const str = '' + value; | |
const res = str.replace(/[&<]/g, (char) => '&#' + char.charCodeAt(0) + ';'); | |
return res; | |
} |
import * as tty from 'node:tty'; | |
const isTTY = tty.isatty(1) && process.env.TERM !== 'dumb' && !('CI' in process.env); | |
export function createLogger (options = {}) { | |
let { text = '', interval = 50, stream = process.stdout, hideCursor = false } = options; | |
let rows = 0; | |
let timer; |
/** | |
* @param {HTMLElement} node | |
* @param {string} target | |
* @returns {?HTMLElement} | |
*/ | |
export function query (node, target) { | |
if (node.matches(`[x-target~='this.${target}']`)) { | |
return node; | |
} |
export function h (type, props, ...children) { | |
if (typeof type === 'function') { | |
if (props === null) { | |
props = {}; | |
} | |
if (children.length > 0) { | |
props.children = children; | |
} |