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 { writable } from "svelte/store"; | |
| import type { Writable } from "svelte/store"; | |
| import { mod } from "$lib/utils/id"; | |
| import type Peer from "peerjs"; | |
| import type { JSON } from "$lib/types"; | |
| import { browser } from "$app/env"; | |
| import type { DataConnection } from "peerjs"; | |
| import { alertHandler } from "./stores"; |
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 { writable } from "svelte/store"; | |
| import type { Writable } from "svelte/store"; | |
| import { mod } from "$lib/utils/id"; | |
| import type Peer from "peerjs"; | |
| import type { JSON } from "$lib/types"; | |
| import { browser } from "$app/env"; | |
| /** | |
| * !!TODO |
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 { writable } from "svelte/store"; | |
| import type { Writable } from "svelte/store"; | |
| import { mod } from "$lib/utils/id"; | |
| import type Peer from "peerjs"; | |
| import type { JSON } from "$lib/types"; | |
| import { browser } from "$app/env"; | |
| /** | |
| * !!TODO |
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 { iter } from "../../utils/collections/array"; | |
| import { LinkedList, Node } from "../../utils/collections/linkedlist"; | |
| import { Buffer, IBuffer } from "../../utils/common/buffer"; | |
| export class Line { | |
| constructor(readonly start: number, readonly end: number, public line: number, public text: string) {} | |
| get length() { | |
| return this.end - this.start; | |
| } | |
| } |
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 type { | |
| IEventEmitter, | |
| EventListeners, | |
| EventCallback, | |
| } from "../types/events"; | |
| export class EventEmitter implements IEventEmitter { | |
| // #region Properties (2) | |
| private _eventQueue = new WeakMap<object, EventListeners<any>>(); |
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
| /* eslint-disable @typescript-eslint/no-inferrable-types */ | |
| import { Maybe } from "../../types/utility"; | |
| import { map } from "./array"; | |
| export class Node<T> { | |
| public next: Node<T> | null = null; | |
| public prev: Node<T> | null = null; | |
| constructor(public data: T) { } | |
| } |
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
| use super::fs::{FSMethods, FileMetadata, FileSystem, Folder}; | |
| use std::{ | |
| io::{Error, ErrorKind}, | |
| path::{Component, Path, PathBuf}, | |
| }; | |
| use serde_json::Value; | |
| #[derive(Default)] |
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 ArtistEndpointParams { | |
| browseId: string; | |
| browseEndpointContextMusicConfig: { | |
| browseEndpointContextMusicConfig: { | |
| pageType: "MUSIC_PAGE_TYPE_ARTIST"; | |
| }; | |
| }; | |
| } | |
| interface PlayerEndpointParams { |
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 filterMap(array, cb, predicate) { | |
| let idx = -1; | |
| const length = array.length; | |
| const result = []; | |
| for (; ++idx < length;) { | |
| const res = cb(array[idx], idx, array); | |
| const passes = predicate(res); | |
| if (!passes) { | |
| continue; | |
| }; |
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 test = [ | |
| { | |
| "subtitle": [ | |
| { | |
| "text": "System Of A Down", | |
| "browseId": "UCDJftX2zx_UT_QSnBGIF96w", | |
| "pageType": "MUSIC_PAGE_TYPE_ARTIST" | |
| } | |
| ], | |
| "artistInfo": { |