-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor cleanup, some renames/moves, moved tld coloring out of parts, u…
…pdate types, rename _base64 version variable
- Loading branch information
Showing
21 changed files
with
209 additions
and
247 deletions.
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,45 @@ | ||
interface DisallowedToken { | ||
type: 'disallowed'; | ||
cp: number; | ||
} | ||
interface IgnoredToken { | ||
type: 'ignored'; | ||
cp: number; | ||
} | ||
interface ValidToken { | ||
type: 'valid'; | ||
cps: number[]; | ||
} | ||
interface MappedToken { | ||
type: 'mapped'; | ||
cp: number; | ||
cps: number[]; | ||
export function ens_normalize(name: string): string; | ||
export function ens_normalize_fragment(frag: string, decompose?: boolean): string; | ||
export function ens_beautify(name: string): string; | ||
|
||
export function ens_emoji(): number[][]; | ||
|
||
export function should_escape(cp: number): boolean; | ||
export function is_combining_mark(cp: number, nsm?: boolean): boolean; | ||
export function safe_str_from_cps(cps: number[], max?: number, quoter?: (cp: number) => string): string; | ||
|
||
export function nfd(cps: number[]): number[]; | ||
export function nfc(cps: number[]): number[]; | ||
|
||
interface Label { | ||
input: number[]; | ||
offset: number; | ||
error?: Error; | ||
tokens?: number[][]; | ||
output?: number[]; | ||
emoji?: boolean; | ||
type?: string; | ||
} | ||
export function ens_split(name: string, preserve_emoji?: boolean): Label[]; | ||
|
||
interface StopToken { type: 'stop'; } | ||
interface DisallowedToken { type: 'disallowed'; cp: number; } | ||
interface IgnoredToken { type: 'ignored'; cp: number; } | ||
interface ValidToken { type: 'valid'; cps: number[]; } | ||
interface MappedToken { type: 'mapped'; cp: number; cps: number[]; } | ||
type TextToken = DisallowedToken | IgnoredToken | ValidToken | MappedToken; | ||
interface EmojiToken { | ||
type: 'emoji'; | ||
input: number[]; | ||
emoji: number[]; | ||
input: number[]; | ||
cps: number[]; | ||
emoji: number[]; | ||
} | ||
interface NFCToken { | ||
type: 'nfc'; | ||
input: number[]; | ||
tokens0: TextToken[]; | ||
cps: number[]; | ||
tokens: TextToken[]; | ||
} | ||
interface StopToken { | ||
type: 'stop'; | ||
tokens: TextToken[]; | ||
} | ||
type Token = TextToken | EmojiToken | NFCToken | StopToken; | ||
|
||
interface Label { | ||
input: number[]; | ||
offset: number; | ||
error?: Error; | ||
tokens?: number[][]; | ||
output?: number[]; | ||
emoji?: boolean; | ||
type?: string; | ||
} | ||
|
||
export function ens_normalize(name: string): string; | ||
export function ens_normalize_fragment(frag: string, decompose?: boolean): string; | ||
export function ens_beautify(name: string): string; | ||
export function ens_tokenize(name: string, options?: {nf?: boolean}): Token[]; | ||
export function ens_split(name: string, preserve_emoji?: boolean): Label[]; | ||
|
||
export function ens_emoji(): number[][]; | ||
|
||
export function should_escape(cp: number): boolean; | ||
export function is_combining_mark(cp: number): boolean; | ||
export function safe_str_from_cps(cps: number[]): string; | ||
|
||
export function nfd(cps: number[]): number[]; | ||
export function nfc(cps: number[]): number[]; |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.