0 01111111110 1111111111111111111111111111111111111111111111111111 === 1 - 2**(-53)
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
html[dark] { | |
background-color: #000 !important; | |
} | |
* { | |
--yt-spec-general-background-a: #000 !important; | |
--yt-spec-general-background-b: #000; | |
--yt-spec-brand-background-primary: #000 !important; | |
--yt-spec-brand-background-solid: #000; | |
--ytd-searchbox-legacy-button-color: #090909; |
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
// WTFPL or MIT | |
// | |
// Like `fs-extra`, but everything is sync. | |
// May be used with `webpack`/`enhanced-resolve` | |
// to allow the `resolveSync` method: | |
// | |
// const compiler = webpack(...); | |
// | |
// compiler.inputFileSystem = require('./fses'); | |
// |
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
// WTFPL or MIT | |
// | |
// Extracts all the exported symbols from files. | |
// For example, if you have a prelude and want to feed all its symbols | |
// to the `webpack.ProvidePlugin` or your fav Babel auto-import plugin. | |
// | |
// Written to be used with webpack (depends on its resolver), | |
// but it’s pretty easy to get rid of this dependency. | |
// | |
// Only supports ES modules. Doesn’t support Flow. |
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
declare type Refine<from, to> = from extends to ? from : never; | |
declare type ArraySize<t> = Refine<GetProperty<t, 'length'>, number>; | |
declare type GetProperty<t, k> = t[Refine<k, keyof t>]; | |
declare type ArrayType<t> = t extends ReadonlyArray<infer u> ? u : never; | |
declare type ArrayHead<a> = a extends readonly [infer h] ? h : never; | |
declare type Rebuild<t> = { [k in keyof t]: t[k] }; | |
declare type KeyofReq<o, k extends keyof o = keyof o> = k extends any ? (undefined extends o[k] ? never : k) : never; | |
// Binary spread | |
declare type ObjectSpread< |
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 MASK = 0; | |
const COPY = 1; | |
const ADD = 0; | |
const SUB = 1; | |
const SET = 2; | |
const Symbolic = (s, o, v) => { | |
s ??= { class: 0o7, umasked: true }; |
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 segmenter = new Intl.Segmenter('en-us', { | |
granularity: 'grapheme', | |
}); | |
const length = x => { | |
x = x.normalize('NFC'); | |
const graphemes = segmenter.segment(x); | |
return Array.from(graphemes).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
// @ts-check | |
// SPDX-License-Identifier: CC0-1.0 | |
/** | |
* 4-bit hash. | |
* | |
* Single LCG step + xorshift. | |
* | |
* @param {number} x | |
*/ |