1.4142:1 1:0.5773
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
| interface IBuilder<T> { | |
| build(): T | |
| } | |
| interface IValueModel { | |
| name: string | |
| date: Date | |
| } | |
| class FluentValueModelBuilder implements IBuilder<IValueModel> { |
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
| enum CharacterClassifications { | |
| None = 0, | |
| Digit = 1, | |
| Upper = 2, | |
| Lower = 4, | |
| Space = 8, | |
| Control = 16, | |
| SymbolOrPunctuation = Upper | Lower, | |
| AlphaOrDigit = Digit | Upper | Lower | Space | |
| } |
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 UnicodeMap = new Map<string, [number, number]>([ | |
| ["Basic Latin", [32, 127]], | |
| ["Latin-1 Supplement", [160, 255]], | |
| ["Latin Extended-A", [256, 383]], | |
| ["Latin Extended-B", [384, 591]], | |
| ["IPA Extensions", [592, 687]], | |
| ["Spacing Modifier Letters", [688, 767]], | |
| ["Combining Diacritical Marks", [768, 879]], | |
| ["Greek and Coptic", [880, 1023]], | |
| ["Cyrillic", [1024, 1279]], |
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
| function inheritTimeFrom(source, target) { | |
| var sourceDateTime = new Date(source) | |
| var targetDateTime = new Date(target) | |
| targetDateTime.setHours(sourceDateTime.getHours()) | |
| targetDateTime.setMinutes(sourceDateTime.getMinutes()) | |
| targetDateTime.setSeconds(sourceDateTime.getSeconds()) | |
| targetDateTime.setSeconds(sourceDateTime.getMilliseconds()) | |
| return targetDateTime | |
| } |
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 interface IFile { | |
| name: string | |
| size?: number | |
| type?: string | |
| lastModified?: number | |
| data?: string|ArrayBuffer | |
| } | |
| export enum ReadFileReturnTypes { | |
| Text = "text", |
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 slug = s => s | |
| .toString() // ensure string | |
| .normalize("NFD") // convert to unicode normalization form using (N)normalization (F)form canonical (D)decomposition | |
| // aka. remove accent and leave base | |
| .replace(/[\u0300-\u036f]/g, "") // remove range combining grave accent to combining lating small letter x | |
| .toLowerCase() // lower chars | |
| .trim() // trim whitespace | |
| .replace(/\s+/g, '-') // replace space(s) with dash | |
| .replace(/[^\w-]+/g, "") // remove things not a-z A-Z 0-9 or - | |
| .replace(/--+/g, '-') // replace double dash with single dash |
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
| :root { | |
| font-size:24px; | |
| --backgroundColor: rgba(255, 255, 255); | |
| --squareColor: rgba(100, 100, 100, .5); | |
| --squareSize: 2em; | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| :root { | |
| --backgroundColor: rgb(0, 0, 0); |