@euterpe.js/music-library
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@euterpe.js/music-library", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "A simple music library, acting as a Local DB as JS Object. Contains everything a person would need to store their music data for website playback.", |
@@ -1,2 +0,2 @@ | ||
export { RefTo, Ref, Song, Collection, DB, Artist, Platforms }; | ||
export { RefTo, Ref, Song, Collection, DB, Artist, Platforms, CollectionType }; | ||
type ID = number; | ||
@@ -8,2 +8,9 @@ declare enum RefTo { | ||
} | ||
declare enum CollectionType { | ||
Album = "Album", | ||
EP = "EP", | ||
Single = "Single", | ||
Playlist = "Playlist", | ||
Release = "Release" | ||
} | ||
declare enum Platforms { | ||
@@ -41,2 +48,3 @@ Youtube = "Youtube", | ||
id?: ID; | ||
metadata: any; | ||
} | ||
@@ -55,2 +63,3 @@ declare class Song { | ||
fft_data?: number[]; | ||
metadata: any; | ||
/** | ||
@@ -69,2 +78,3 @@ * The ID is always there, don't worry :) | ||
id?: ID; | ||
metadata: any; | ||
} | ||
@@ -77,2 +87,3 @@ declare class Artist { | ||
links?: [Platforms, URL][]; | ||
metadata: any; | ||
/** | ||
@@ -91,4 +102,9 @@ * The ID is always there, don't worry :) | ||
id?: ID; | ||
metadata: any; | ||
name?: string; | ||
type?: CollectionType; | ||
} | ||
declare class Collection { | ||
name?: string; | ||
type?: CollectionType; | ||
artists: Ref[]; | ||
@@ -99,2 +115,3 @@ songs: Ref[]; | ||
publish_date?: Date; | ||
metadata: any; | ||
/** | ||
@@ -101,0 +118,0 @@ * The ID is always there, don't worry :) |
@@ -1,2 +0,2 @@ | ||
export { RefTo, Ref, Song, Collection, DB, Artist, Platforms }; | ||
export { RefTo, Ref, Song, Collection, DB, Artist, Platforms, CollectionType }; | ||
var RefTo; | ||
@@ -8,2 +8,10 @@ (function (RefTo) { | ||
})(RefTo || (RefTo = {})); | ||
var CollectionType; | ||
(function (CollectionType) { | ||
CollectionType["Album"] = "Album"; | ||
CollectionType["EP"] = "EP"; | ||
CollectionType["Single"] = "Single"; | ||
CollectionType["Playlist"] = "Playlist"; | ||
CollectionType["Release"] = "Release"; | ||
})(CollectionType || (CollectionType = {})); | ||
var Platforms; | ||
@@ -56,2 +64,3 @@ (function (Platforms) { | ||
this.id = data.id; | ||
this.metadata = data.metadata; | ||
} | ||
@@ -68,2 +77,3 @@ } | ||
this.id = data.id; | ||
this.metadata = data.metadata; | ||
} | ||
@@ -79,2 +89,4 @@ } | ||
this.id = data.id; | ||
this.name = data.name; | ||
this.metadata = data.metadata; | ||
} | ||
@@ -93,3 +105,10 @@ } | ||
*/ | ||
for (const input of stuff) { | ||
let inputs; | ||
if (typeof stuff[Symbol.iterator] != "function") { | ||
inputs = [stuff]; | ||
} | ||
else { | ||
inputs = stuff; | ||
} | ||
for (const input of inputs) { | ||
if (input instanceof Artist) { | ||
@@ -96,0 +115,0 @@ const artist = input; |
Sorry, the diff of this file is not supported yet
21146
301