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 { WritableOptions, Writable } from "stream"; | |
export interface MemoryStoreOptions extends WritableOptions { | |
objectMode?: false | undefined; | |
maxBufsize?: number; | |
} | |
export const DEFAULT_MAX_BUFSIZE = 1024 ** 2; | |
export class MemoryStore extends Writable { |
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
/* | |
* Copyright (C) 2021 Hunter Kohler <[email protected]> | |
*/ | |
/* | |
* Global variables | |
*/ | |
:root { | |
} |
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
/* | |
* Copyright (C) 2021 John Hunter Kohler <[email protected]> | |
* | |
* Simple template-literal helpers for dynamic DOM manipulation. | |
*/ | |
const emptyTagNames = new Set([ | |
"area", "base", "br", | |
"col", "embed", "hr", | |
"img", "input", "link", |
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
/** | |
* Copyright (C) 2021 Hunter Kohler <[email protected]> | |
*/ | |
type Dict<T> = { [P: string]: T | undefined }; | |
export type SpecificationExtension = any; | |
export type OpenAPI = { | |
components?: Components; |
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
/* | |
* Copyright (C) 2021 Hunter Kohler <[email protected]> | |
* | |
* WARNING: AUTOGENERATED FILE, DO NOT EDIT DIRECTLY | |
*/ | |
#ifndef REGEX_OPERATORS_H_ | |
#define REGEX_OPERATORS_H_ | |
#include <string> | |
#include <regex> |
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
export class FrozenSet extends Set { | |
clone() { | |
return new FrozenSet(this); | |
} | |
} | |
FrozenSet.prototype.add = undefined; | |
FrozenSet.prototype.delete = undefined; | |
FrozenSet.prototype.clear = 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
/* | |
* Copyright (C) 2021 John Hunter Kohler <[email protected]> | |
*/ | |
/** | |
* Returns true if `value` is non-primitive (ECMA script standard, i.e., null is | |
* a primitive, function is an object). | |
* | |
* @param {any} value | |
* @returns {bool} |
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
export function mktable(strings, ...args) { | |
strings = strings[0].split("|"); | |
if (!strings.length || !args.length || args.length % strings.length) { | |
throw new TypeError("Label and argument count do not match"); | |
} | |
const labels = new Set(); | |
const table = new Array(args.length / strings.length) |
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 GlobalPromise = global.Promise; | |
// delete global.Promise; | |
function typename(value) { | |
if (typeof value == "object" && typeof value != "null") { | |
let name; | |
try { | |
name = value.constructor?.name; |
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
#!/usr/bin/env bash | |
read -r -d '' usage <<EOF | |
Usage: | |
random [options] bytes | |
random -h|--help | |
Generate random bytes from /dev/random. | |
Options: |