Skip to content

Instantly share code, notes, and snippets.

View snuffyDev's full-sized avatar
😮‍💨
nice

snuffy snuffyDev

😮‍💨
nice
View GitHub Profile
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";
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
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
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;
}
}
import type {
IEventEmitter,
EventListeners,
EventCallback,
} from "../types/events";
export class EventEmitter implements IEventEmitter {
// #region Properties (2)
private _eventQueue = new WeakMap<object, EventListeners<any>>();
/* 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) { }
}
use super::fs::{FSMethods, FileMetadata, FileSystem, Folder};
use std::{
io::{Error, ErrorKind},
path::{Component, Path, PathBuf},
};
use serde_json::Value;
#[derive(Default)]
interface ArtistEndpointParams {
browseId: string;
browseEndpointContextMusicConfig: {
browseEndpointContextMusicConfig: {
pageType: "MUSIC_PAGE_TYPE_ARTIST";
};
};
}
interface PlayerEndpointParams {
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;
};
const test = [
{
"subtitle": [
{
"text": "System Of A Down",
"browseId": "UCDJftX2zx_UT_QSnBGIF96w",
"pageType": "MUSIC_PAGE_TYPE_ARTIST"
}
],
"artistInfo": {