From d411b087cb02a3a20fed319d8b4f5fe9cdd8fa6d Mon Sep 17 00:00:00 2001 From: Stef-00012 Date: Mon, 18 Nov 2024 15:55:51 +0100 Subject: [PATCH] Rename tests to __tests__ --- {tests => __tests__}/test.js | 0 {tests => __tests__}/test2.js | 0 docs/classes/SyncLyrics.html | 74 +++++++++---------- docs/functions/normalize.html | 4 +- docs/index.html | 4 +- docs/interfaces/Cache.html | 10 +-- .../interfaces/CacheLineSyncedLyricsData.html | 6 +- docs/interfaces/CacheLyrics.html | 8 +- docs/interfaces/Data.html | 14 ++-- docs/interfaces/FormattedLyric.html | 6 +- docs/interfaces/LineSyncedLyricsData.html | 8 +- docs/interfaces/LrcLibFetchResult.html | 10 +-- docs/interfaces/Lyrics.html | 8 +- docs/interfaces/LyricsOutput.html | 14 ++-- docs/interfaces/Metadata.html | 16 ++-- docs/interfaces/MusixmatchFetchResult.html | 10 +-- .../MusixmatchLyricsFetchResult.html | 8 +- docs/interfaces/MusixmatchSearchResult.html | 12 +-- docs/interfaces/NeteaseFetchResult.html | 10 +-- docs/interfaces/PlainLyricsData.html | 6 +- docs/interfaces/TokenData.html | 10 +-- docs/interfaces/WordSyncedLyrics.html | 10 +-- docs/interfaces/WordSyncedLyricsData.html | 6 +- docs/interfaces/WordSyncedLyricsLine.html | 6 +- docs/modules.html | 4 +- docs/sitemap.xml | 58 +++++++-------- docs/types/LogLevel.html | 2 +- docs/types/LyricType.html | 2 +- docs/types/Sources.html | 4 +- docs/variables/logLevels.html | 2 +- docs/variables/lyricType-1.html | 2 +- docs/variables/sources-1.html | 2 +- package-lock.json | 4 +- package.json | 6 +- 34 files changed, 173 insertions(+), 173 deletions(-) rename {tests => __tests__}/test.js (100%) rename {tests => __tests__}/test2.js (100%) diff --git a/tests/test.js b/__tests__/test.js similarity index 100% rename from tests/test.js rename to __tests__/test.js diff --git a/tests/test2.js b/__tests__/test2.js similarity index 100% rename from tests/test2.js rename to __tests__/test2.js diff --git a/docs/classes/SyncLyrics.html b/docs/classes/SyncLyrics.html index fdd8643..a3e652a 100644 --- a/docs/classes/SyncLyrics.html +++ b/docs/classes/SyncLyrics.html @@ -1,4 +1,4 @@ -SyncLyrics | SyncLyrics - v2.5.3

Class SyncLyrics

Constructors

constructor +SyncLyrics | SyncLyrics - v2.5.4

Class SyncLyrics

Constructors

Properties

_fetching _trackId cache @@ -38,20 +38,20 @@

Returns SyncLyrics

let mxmToken;

const LyricsManager = new SyncLyrics({
cache: new Map(), // Anything that can store data and has a .set(K, V), .get(K) and .has(K) values
logLevel: 'none', // One of "none" | "info" | "warn" | "error" | "debug"
instrumentalLyricsIndicator: "", // Any string
sources: ["musixmatch", "lrclib", "netease"], // An array with atleast one of those sources
saveMusixmatchToken: (tokenData) => { // A custom function to save the Musixmatch token, otherwise it'll skip Musixmatch fetch
mxmToken = tokenData;
},
getMusixmatchToken: () => { // A custom function to save the Musixmatch token, otherwise it'll skip Musixmatch fetch
return mxmToken;
},
})
-

Properties

_fetching: boolean

Whetever it is fetching a song currently

-
_trackId: null | string

Used for the logging within the different functions and to fetch the track's data from the cache if avaible

-
cache: Cache<undefined | null | string, undefined | null | CacheLyrics>

Any method that can store data and has .set(), .get() and .has() functions

-
getMusixmatchToken: undefined | null | (() =>
    | undefined
    | null
    | TokenData
    | Promise<undefined | null | TokenData>)

Function used to fetch the Musixmatch token (required to fetch the lyrics data from Musixmatch)

-
instrumentalLyricsIndicator: string

The character to use for instrumental lyrics (more than 3 seconds of music without any voice)

-
logLevel: LogLevel

The level of the logging

-
lyrics: undefined | null | string

The fetched lyrics, used for the .parse() method in the LineSyncedLyricsData

-
saveMusixmatchToken: undefined | null | ((tokenData: TokenData) => void | Promise<void>)

Function used to save the Musixmatch token (required to fetch the lyrics data from Musixmatch)

-
sources: Sources

Array of sources to use, in the order they have to be fetched

-

Methods

  • Fetches the line synced lyrics of the song from Musixmatch, only if the search result specifies the song has line synced lyrics

    +

Properties

_fetching: boolean

Whetever it is fetching a song currently

+
_trackId: null | string

Used for the logging within the different functions and to fetch the track's data from the cache if avaible

+
cache: Cache<undefined | null | string, undefined | null | CacheLyrics>

Any method that can store data and has .set(), .get() and .has() functions

+
getMusixmatchToken: undefined | null | (() =>
    | undefined
    | null
    | TokenData
    | Promise<undefined | null | TokenData>)

Function used to fetch the Musixmatch token (required to fetch the lyrics data from Musixmatch)

+
instrumentalLyricsIndicator: string

The character to use for instrumental lyrics (more than 3 seconds of music without any voice)

+
logLevel: LogLevel

The level of the logging

+
lyrics: undefined | null | string

The fetched lyrics, used for the .parse() method in the LineSyncedLyricsData

+
saveMusixmatchToken: undefined | null | ((tokenData: TokenData) => void | Promise<void>)

Function used to save the Musixmatch token (required to fetch the lyrics data from Musixmatch)

+
sources: Sources

Array of sources to use, in the order they have to be fetched

+

Methods

  • Fetches the line synced lyrics of the song from Musixmatch, only if the search result specifies the song has line synced lyrics

    Parameters

    Returns Promise<null | string>

    The Track's Lyrics if avaible

    -
  • Fetches the song's lyrics based on the search results

    +
  • Fetches the line synced lyrics from Netease

    +
  • Fetches the line synced lyrics from Netease

    Parameters

    Returns Promise<null | string>

    The track's line synced lyrics if avaible

    -
  • Fetches the plain lyrics of the song from Musixmatch, only if the search result specifies the song has plain lyrics

    +
  • Fetches the plain lyrics of the song from Musixmatch, only if the search result specifies the song has plain lyrics

    Parameters

    Returns Promise<null | string>

    The Track's Lyrics if avaible

    -
  • Fetches the line word lyrics of the song from Musixmatch, only if the search result specifies the song has word synced lyrics

    +
  • Removes useless metadata returned by Netease

    +
  • Removes useless metadata returned by Netease

    Parameters

    • slyrics: string

      Lyrics returned by Netease

    Returns string

    Netease returned lyrics without extra metadata

    -
  • Searchs the Netease catalog with the data provided in the metadata

    +
  • Logs the text with a purple "DEBUG: " prefix

    +
  • Logs the text with a purple "DEBUG: " prefix

    Parameters

    • Rest...args: any

      Text to log

    Returns void

    Nothing

    -
  • Logs the text with a red "ERROR: " prefix

    +
  • Logs the text with a red "ERROR: " prefix

    Parameters

    • Rest...args: any

      Text to log

    Returns void

    Nothing

    -
  • Fetches from the cache or the sources, the song based on the track's metadata or ID

    Parameters

    Returns Promise<LyricsOutput>

    The lyrics of the song when avaible

    const LyricsManager = new SyncLyrics()

    LyricsManager.getLyrics({
    track: "the old me", // Song name
    artist: "Henry Moodie", // Song artist
    album: "good old days", // Song album
    length: 175000, // Song duration, in ms
    }).then(console.log)
    -
+
diff --git a/docs/functions/normalize.html b/docs/functions/normalize.html index 05b3206..1543066 100644 --- a/docs/functions/normalize.html +++ b/docs/functions/normalize.html @@ -1,4 +1,4 @@ -normalize | SyncLyrics - v2.5.3

Function normalize

  • Parses special characters (Usually returned by Netease) into common characters

    +normalize | SyncLyrics - v2.5.4

    Function normalize

    • Parses special characters (Usually returned by Netease) into common characters

      Parameters

      • string: string

        The string to parse

      Returns string

      Parsed string with common characters

      -
    +
diff --git a/docs/index.html b/docs/index.html index 6d06d81..46af3ba 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -SyncLyrics - v2.5.3

SyncLyrics - v2.5.3

@stef-0012/synclyrics (SyncLyrics)

SyncLyrics allows you to get the plain, line synced and word synced lyrics of any song avaible on Musixmatch, LrcLib.net or Netease.

+SyncLyrics - v2.5.4

SyncLyrics - v2.5.4

@stef-0012/synclyrics (SyncLyrics)

SyncLyrics allows you to get the plain, line synced and word synced lyrics of any song avaible on Musixmatch, LrcLib.net or Netease.

Installation: npm i @stef-0012/synclyrics.

Usage

const { SyncLyrics } = require("@stef-0012/synclyrics");

let mxmToken; // This is just for the custom save/get functions example

const LyricsManager = new SyncLyrics({
/* Each of those options is optional */
cache: new Map(), // Anything that can store data and has a .set(K, V), .get(K) and .has(K) values
logLevel: 'none', // One of "none" | "info" | "warn" | "error" | "debug"
instrumentalLyricsIndicator: "", // Any string
sources: ["musixmatch", "lrclib", "netease"], // An array with atleast one of those sources
saveMusixmatchToken: (tokenData) => { // A custom function to save the Musixmatch token, otherwise it'll skip Musixmatch fetch
mxmToken = tokenData;
},
getMusixmatchToken: () => { // A custom function to save the Musixmatch token, otherwise it'll skip Musixmatch fetch
return mxmToken;
},
})

LyricsManager.getLyrics({
/* Each of those options is optional but atleast one is required excluded length */
track: "the old me", // Song name
artist: "Henry Moodie", // Song artist
album: "good old days", // Song album
length: 175000, // Song duration, in ms
}).then(data => {
console.log(data)
}) // Array of objects with time as seconds and text of each line

// or

const trackId = LyricsManager.getTrackId({
/* Each of those options is optional but atleast one is required excluded length */
track: "the old me", // Song name
artist: "Henry Moodie", // Song artist
album: "good old days", // Song album
length: 175000, // Song duration, in ms
})

LyricsManager.getLyrics({
trackId: trackId
}).then(data => {
console.log(data)
})
@@ -9,4 +9,4 @@

Example Parse Output

[
{
time: 0.14,
text: 'Fifth of November, when I walked you home'
},
{
time: 8.06,
text: `That's when I nearly said it, but then said, "Forget it," and froze`
},
{
time: 15.55,
text: "Do you remember? You probably don't"
},
{
time: 23.44,
text: "'Cause the sparks in the sky took a hold of your eyes while we spoke"
},
// ..... (rest of the lyrics)
]
-
+
diff --git a/docs/interfaces/Cache.html b/docs/interfaces/Cache.html index fdf3926..c92405c 100644 --- a/docs/interfaces/Cache.html +++ b/docs/interfaces/Cache.html @@ -1,8 +1,8 @@ -Cache | SyncLyrics - v2.5.3

Interface Cache<K, V>

Any method that can store data and has .set(), .get() and .has() functions

-
interface Cache<K, V> {
    get(key: K): undefined | null | V;
    has(key: K): boolean;
    set(key: K, value: V): void;
    [key: string]: any;
}

Type Parameters

  • K
  • V

Indexable

  • [key: string]: any

Methods

get +Cache | SyncLyrics - v2.5.4

Interface Cache<K, V>

Any method that can store data and has .set(), .get() and .has() functions

+
interface Cache<K, V> {
    get(key: K): undefined | null | V;
    has(key: K): boolean;
    set(key: K, value: V): void;
    [key: string]: any;
}

Type Parameters

  • K
  • V

Indexable

  • [key: string]: any

Methods

Methods

  • Function used to get the song's data to the cache

    -

    Parameters

    • key: K

    Returns undefined | null | V

  • Function to check if the cache has the song's data

    -

    Parameters

    • key: K

    Returns boolean

  • Function used to set the song's data to the cache

    -

    Parameters

    • key: K
    • value: V

    Returns void

+

Parameters

  • key: K

Returns undefined | null | V

  • Function to check if the cache has the song's data

    +

    Parameters

    • key: K

    Returns boolean

  • Function used to set the song's data to the cache

    +

    Parameters

    • key: K
    • value: V

    Returns void

diff --git a/docs/interfaces/CacheLineSyncedLyricsData.html b/docs/interfaces/CacheLineSyncedLyricsData.html index 2521007..b2c8a41 100644 --- a/docs/interfaces/CacheLineSyncedLyricsData.html +++ b/docs/interfaces/CacheLineSyncedLyricsData.html @@ -1,5 +1,5 @@ -CacheLineSyncedLyricsData | SyncLyrics - v2.5.3

Interface CacheLineSyncedLyricsDataPrivate

interface CacheLineSyncedLyricsData {
    lyrics: undefined | null | string;
    source: undefined | null | string;
}

Properties

lyrics +CacheLineSyncedLyricsData | SyncLyrics - v2.5.4

Interface CacheLineSyncedLyricsDataPrivate

interface CacheLineSyncedLyricsData {
    lyrics: undefined | null | string;
    source: undefined | null | string;
}

Properties

Properties

lyrics: undefined | null | string

Line synced lyrics in the LRC format

-
source: undefined | null | string

Lyrics source

-
+
source: undefined | null | string

Lyrics source

+
diff --git a/docs/interfaces/CacheLyrics.html b/docs/interfaces/CacheLyrics.html index 058afff..84e31e0 100644 --- a/docs/interfaces/CacheLyrics.html +++ b/docs/interfaces/CacheLyrics.html @@ -1,7 +1,7 @@ -CacheLyrics | SyncLyrics - v2.5.3

Interface CacheLyricsPrivate

interface CacheLyrics {
    lineSynced: CacheLineSyncedLyricsData;
    plain: PlainLyricsData;
    wordSynced: WordSyncedLyricsData;
}

Properties

lineSynced +CacheLyrics | SyncLyrics - v2.5.4

Interface CacheLyricsPrivate

interface CacheLyrics {
    lineSynced: CacheLineSyncedLyricsData;
    plain: PlainLyricsData;
    wordSynced: WordSyncedLyricsData;
}

Properties

+
diff --git a/docs/interfaces/Data.html b/docs/interfaces/Data.html index f7c6805..562bbd4 100644 --- a/docs/interfaces/Data.html +++ b/docs/interfaces/Data.html @@ -1,13 +1,13 @@ -Data | SyncLyrics - v2.5.3

Interface Data

interface Data {
    cache?: Cache<undefined | null | string, undefined | null | CacheLyrics>;
    getMusixmatchToken?: (() =>
        | undefined
        | null
        | TokenData
        | Promise<undefined | null | TokenData>);
    instrumentalLyricsIndicator?: string;
    logLevel?: LogLevel;
    saveMusixmatchToken?: ((tokenData: TokenData) => void | Promise<void>);
    sources?: Sources;
}

Properties

cache? +Data | SyncLyrics - v2.5.4

Interface Data

interface Data {
    cache?: Cache<undefined | null | string, undefined | null | CacheLyrics>;
    getMusixmatchToken?: (() =>
        | undefined
        | null
        | TokenData
        | Promise<undefined | null | TokenData>);
    instrumentalLyricsIndicator?: string;
    logLevel?: LogLevel;
    saveMusixmatchToken?: ((tokenData: TokenData) => void | Promise<void>);
    sources?: Sources;
}

Properties

cache?: Cache<undefined | null | string, undefined | null | CacheLyrics>

Any method that can store data and has .set(), .get() and .has() functions

-
getMusixmatchToken?: (() =>
    | undefined
    | null
    | TokenData
    | Promise<undefined | null | TokenData>)

Function used to fetch the Musixmatch token (required to fetch the lyrics data from Musixmatch)

-
instrumentalLyricsIndicator?: string

The character to use for instrumental lyrics (more than 3 seconds of music without any voice)

-
logLevel?: LogLevel

The level of the logging

-
saveMusixmatchToken?: ((tokenData: TokenData) => void | Promise<void>)

Function used to save the Musixmatch token (required to fetch the lyrics data from Musixmatch)

-
sources?: Sources

Array of sources to use, in the order they have to be fetched

-
+
getMusixmatchToken?: (() =>
    | undefined
    | null
    | TokenData
    | Promise<undefined | null | TokenData>)

Function used to fetch the Musixmatch token (required to fetch the lyrics data from Musixmatch)

+
instrumentalLyricsIndicator?: string

The character to use for instrumental lyrics (more than 3 seconds of music without any voice)

+
logLevel?: LogLevel

The level of the logging

+
saveMusixmatchToken?: ((tokenData: TokenData) => void | Promise<void>)

Function used to save the Musixmatch token (required to fetch the lyrics data from Musixmatch)

+
sources?: Sources

Array of sources to use, in the order they have to be fetched

+
diff --git a/docs/interfaces/FormattedLyric.html b/docs/interfaces/FormattedLyric.html index e05c45c..0a51305 100644 --- a/docs/interfaces/FormattedLyric.html +++ b/docs/interfaces/FormattedLyric.html @@ -1,5 +1,5 @@ -FormattedLyric | SyncLyrics - v2.5.3

Interface FormattedLyric

interface FormattedLyric {
    text: string;
    time: number;
}

Properties

text +FormattedLyric | SyncLyrics - v2.5.4

Interface FormattedLyric

interface FormattedLyric {
    text: string;
    time: number;
}

Properties

Properties

text: string

Lyric's text

-
time: number

When the lyric starts

-
+
time: number

When the lyric starts

+
diff --git a/docs/interfaces/LineSyncedLyricsData.html b/docs/interfaces/LineSyncedLyricsData.html index 8ddfc0c..2b17fb1 100644 --- a/docs/interfaces/LineSyncedLyricsData.html +++ b/docs/interfaces/LineSyncedLyricsData.html @@ -1,7 +1,7 @@ -LineSyncedLyricsData | SyncLyrics - v2.5.3

Interface LineSyncedLyricsData

interface LineSyncedLyricsData {
    lyrics: undefined | null | string;
    parse: ((lyrics?: null | string) => null | FormattedLyric[]);
    source: undefined | null | string;
}

Properties

lyrics +LineSyncedLyricsData | SyncLyrics - v2.5.4

Interface LineSyncedLyricsData

interface LineSyncedLyricsData {
    lyrics: undefined | null | string;
    parse: ((lyrics?: null | string) => null | FormattedLyric[]);
    source: undefined | null | string;
}

Properties

Properties

lyrics: undefined | null | string

Line synced lyrics in the LRC format

-
parse: ((lyrics?: null | string) => null | FormattedLyric[])

Function to parse the returned lyrics into FormattedLyric

-
source: undefined | null | string

Lyrics source

-
+
parse: ((lyrics?: null | string) => null | FormattedLyric[])

Function to parse the returned lyrics into FormattedLyric

+
source: undefined | null | string

Lyrics source

+
diff --git a/docs/interfaces/LrcLibFetchResult.html b/docs/interfaces/LrcLibFetchResult.html index 43d7e76..0c92c6c 100644 --- a/docs/interfaces/LrcLibFetchResult.html +++ b/docs/interfaces/LrcLibFetchResult.html @@ -1,9 +1,9 @@ -LrcLibFetchResult | SyncLyrics - v2.5.3

Interface LrcLibFetchResultPrivate

interface LrcLibFetchResult {
    lineSynced: null | string;
    plain: null | string;
    source: "lrclib.net";
    wordSynced: null;
}

Properties

lineSynced +LrcLibFetchResult | SyncLyrics - v2.5.4

Interface LrcLibFetchResultPrivate

interface LrcLibFetchResult {
    lineSynced: null | string;
    plain: null | string;
    source: "lrclib.net";
    wordSynced: null;
}

Properties

lineSynced: null | string

Line synced lyrics if avaible

-
plain: null | string

Plain lyrics if avaible

-
source
wordSynced

Always null as lrclib.net does not support word synced lyrics

-
+
plain: null | string

Plain lyrics if avaible

+
source
wordSynced

Always null as lrclib.net does not support word synced lyrics

+
diff --git a/docs/interfaces/Lyrics.html b/docs/interfaces/Lyrics.html index 9f91c21..89779e2 100644 --- a/docs/interfaces/Lyrics.html +++ b/docs/interfaces/Lyrics.html @@ -1,7 +1,7 @@ -Lyrics | SyncLyrics - v2.5.3

Interface Lyrics

interface Lyrics {
    lineSynced: LineSyncedLyricsData;
    plain: PlainLyricsData;
    wordSynced: WordSyncedLyricsData;
}

Properties

lineSynced +Lyrics | SyncLyrics - v2.5.4

Interface Lyrics

interface Lyrics {
    lineSynced: LineSyncedLyricsData;
    plain: PlainLyricsData;
    wordSynced: WordSyncedLyricsData;
}

Properties

+
diff --git a/docs/interfaces/LyricsOutput.html b/docs/interfaces/LyricsOutput.html index 864be03..4721f9b 100644 --- a/docs/interfaces/LyricsOutput.html +++ b/docs/interfaces/LyricsOutput.html @@ -1,13 +1,13 @@ -LyricsOutput | SyncLyrics - v2.5.3

Interface LyricsOutput

interface LyricsOutput {
    album: undefined | string;
    artist: undefined | string;
    cached: boolean;
    lyrics: Lyrics;
    track: undefined | string;
    trackId: string;
}

Properties

album +LyricsOutput | SyncLyrics - v2.5.4

Interface LyricsOutput

interface LyricsOutput {
    album: undefined | string;
    artist: undefined | string;
    cached: boolean;
    lyrics: Lyrics;
    track: undefined | string;
    trackId: string;
}

Properties

album: undefined | string

Song's album

-
artist: undefined | string

Song's artist(s)

-
cached: boolean

Whetever the song data was retrieved from the cache rather than the APIs

-
lyrics: Lyrics

Object with track's avaible lyrics

-
track: undefined | string

Song's name

-
trackId: string

Fetched track's ID

-
+
artist: undefined | string

Song's artist(s)

+
cached: boolean

Whetever the song data was retrieved from the cache rather than the APIs

+
lyrics: Lyrics

Object with track's avaible lyrics

+
track: undefined | string

Song's name

+
trackId: string

Fetched track's ID

+
diff --git a/docs/interfaces/Metadata.html b/docs/interfaces/Metadata.html index 99ac390..b2bbf72 100644 --- a/docs/interfaces/Metadata.html +++ b/docs/interfaces/Metadata.html @@ -1,14 +1,14 @@ -Metadata | SyncLyrics - v2.5.3

Interface Metadata

Song's metadata

-
interface Metadata {
    album?: string;
    artist?: string;
    length?: number;
    lyricsType?: LyricType;
    track?: string;
    trackId?: string;
}

Properties

album? +Metadata | SyncLyrics - v2.5.4

Interface Metadata

Song's metadata

+
interface Metadata {
    album?: string;
    artist?: string;
    length?: number;
    lyricsType?: LyricType;
    track?: string;
    trackId?: string;
}

Properties

album?: string

Song's album

-
artist?: string

Song's artist(s)

-
length?: number

Song's duration (in ms)

-
lyricsType?: LyricType

An array of lyric types to fetch

-
track?: string

Song's name

-
trackId?: string

Song's ID (returned by getTrackId)

-
+
artist?: string

Song's artist(s)

+
length?: number

Song's duration (in ms)

+
lyricsType?: LyricType

An array of lyric types to fetch

+
track?: string

Song's name

+
trackId?: string

Song's ID (returned by getTrackId)

+
diff --git a/docs/interfaces/MusixmatchFetchResult.html b/docs/interfaces/MusixmatchFetchResult.html index 4142b3e..6e42b6f 100644 --- a/docs/interfaces/MusixmatchFetchResult.html +++ b/docs/interfaces/MusixmatchFetchResult.html @@ -1,9 +1,9 @@ -MusixmatchFetchResult | SyncLyrics - v2.5.3

Interface MusixmatchFetchResultPrivate

interface MusixmatchFetchResult {
    lineSynced?: null | string;
    plain?: null | string;
    source: "Musixmatch";
    wordSynced?: null | WordSyncedLyrics[];
}

Properties

lineSynced? +MusixmatchFetchResult | SyncLyrics - v2.5.4

Interface MusixmatchFetchResultPrivate

interface MusixmatchFetchResult {
    lineSynced?: null | string;
    plain?: null | string;
    source: "Musixmatch";
    wordSynced?: null | WordSyncedLyrics[];
}

Properties

lineSynced?: null | string

Line synced lyrics if avaible

-
plain?: null | string

Plain lyrics if avaible

-
source

Musixmatch

-
wordSynced?: null | WordSyncedLyrics[]

Line synced lyrics if avaible

-
+
plain?: null | string

Plain lyrics if avaible

+
source

Musixmatch

+
wordSynced?: null | WordSyncedLyrics[]

Line synced lyrics if avaible

+
diff --git a/docs/interfaces/MusixmatchLyricsFetchResult.html b/docs/interfaces/MusixmatchLyricsFetchResult.html index efbb93d..d24d6be 100644 --- a/docs/interfaces/MusixmatchLyricsFetchResult.html +++ b/docs/interfaces/MusixmatchLyricsFetchResult.html @@ -1,7 +1,7 @@ -MusixmatchLyricsFetchResult | SyncLyrics - v2.5.3

Interface MusixmatchLyricsFetchResultPrivate

interface MusixmatchLyricsFetchResult {
    lineSynced: null | string;
    plain: null | string;
    wordSynced: null | WordSyncedLyrics[];
}

Properties

lineSynced +MusixmatchLyricsFetchResult | SyncLyrics - v2.5.4

Interface MusixmatchLyricsFetchResultPrivate

interface MusixmatchLyricsFetchResult {
    lineSynced: null | string;
    plain: null | string;
    wordSynced: null | WordSyncedLyrics[];
}

Properties

lineSynced: null | string

Track's line synced lyrics

-
plain: null | string

Track's plain lyrics

-
wordSynced: null | WordSyncedLyrics[]

Track's word synced lyrics

-
+
plain: null | string

Track's plain lyrics

+
wordSynced: null | WordSyncedLyrics[]

Track's word synced lyrics

+
diff --git a/docs/interfaces/MusixmatchSearchResult.html b/docs/interfaces/MusixmatchSearchResult.html index fb0da8d..f5c4bdc 100644 --- a/docs/interfaces/MusixmatchSearchResult.html +++ b/docs/interfaces/MusixmatchSearchResult.html @@ -1,11 +1,11 @@ -MusixmatchSearchResult | SyncLyrics - v2.5.3

Interface MusixmatchSearchResultPrivate

interface MusixmatchSearchResult {
    commonTrackId: string;
    hasLineSyncedLyrics: boolean;
    hasLyrics: boolean;
    hasWordSyncedLyrics: boolean;
    trackId: string;
}

Properties

commonTrackId +MusixmatchSearchResult | SyncLyrics - v2.5.4

Interface MusixmatchSearchResultPrivate

interface MusixmatchSearchResult {
    commonTrackId: string;
    hasLineSyncedLyrics: boolean;
    hasLyrics: boolean;
    hasWordSyncedLyrics: boolean;
    trackId: string;
}

Properties

commonTrackId: string

Musixmatch's commontrack_id

-
hasLineSyncedLyrics: boolean

Whetever the Musixmatch's catalogue has the song's line synced lyrics

-
hasLyrics: boolean

Whetever the Musixmatch's catalogue has the song's plain lyrics

-
hasWordSyncedLyrics: boolean

Whetever the Musixmatch's catalogue has the song's word synced lyrics

-
trackId: string

Musixmatch's track_id

-
+
hasLineSyncedLyrics: boolean

Whetever the Musixmatch's catalogue has the song's line synced lyrics

+
hasLyrics: boolean

Whetever the Musixmatch's catalogue has the song's plain lyrics

+
hasWordSyncedLyrics: boolean

Whetever the Musixmatch's catalogue has the song's word synced lyrics

+
trackId: string

Musixmatch's track_id

+
diff --git a/docs/interfaces/NeteaseFetchResult.html b/docs/interfaces/NeteaseFetchResult.html index 945d2bc..d24971b 100644 --- a/docs/interfaces/NeteaseFetchResult.html +++ b/docs/interfaces/NeteaseFetchResult.html @@ -1,9 +1,9 @@ -NeteaseFetchResult | SyncLyrics - v2.5.3

Interface NeteaseFetchResultPrivate

interface NeteaseFetchResult {
    lineSynced: null | string;
    plain: null;
    source: "Netease";
    wordSynced: null;
}

Properties

lineSynced +NeteaseFetchResult | SyncLyrics - v2.5.4

Interface NeteaseFetchResultPrivate

interface NeteaseFetchResult {
    lineSynced: null | string;
    plain: null;
    source: "Netease";
    wordSynced: null;
}

Properties

lineSynced: null | string

Line synced lyrics if avaible

-
plain

Always null as Netease does not support word synced lyrics

-
source

Netease

-
wordSynced

Always null as Netease does not support word synced lyrics

-
+
plain

Always null as Netease does not support word synced lyrics

+
source

Netease

+
wordSynced

Always null as Netease does not support word synced lyrics

+
diff --git a/docs/interfaces/PlainLyricsData.html b/docs/interfaces/PlainLyricsData.html index d81ccdb..1db063b 100644 --- a/docs/interfaces/PlainLyricsData.html +++ b/docs/interfaces/PlainLyricsData.html @@ -1,5 +1,5 @@ -PlainLyricsData | SyncLyrics - v2.5.3

Interface PlainLyricsData

interface PlainLyricsData {
    lyrics: undefined | null | string;
    source: undefined | null | string;
}

Properties

lyrics +PlainLyricsData | SyncLyrics - v2.5.4

Interface PlainLyricsData

interface PlainLyricsData {
    lyrics: undefined | null | string;
    source: undefined | null | string;
}

Properties

Properties

lyrics: undefined | null | string

Lyrics as plain text

-
source: undefined | null | string

Lyrics source

-
+
source: undefined | null | string

Lyrics source

+
diff --git a/docs/interfaces/TokenData.html b/docs/interfaces/TokenData.html index 470da64..4b97020 100644 --- a/docs/interfaces/TokenData.html +++ b/docs/interfaces/TokenData.html @@ -1,8 +1,8 @@ -TokenData | SyncLyrics - v2.5.3

Interface TokenDataPrivate

Musixmatch token data

-
interface TokenData {
    cookies: undefined | string;
    expiresAt: number;
    usertoken: string;
}

Properties

cookies +TokenData | SyncLyrics - v2.5.4

Interface TokenDataPrivate

Musixmatch token data

+
interface TokenData {
    cookies: undefined | string;
    expiresAt: number;
    usertoken: string;
}

Properties

cookies: undefined | string

Cookies used for the Musixmatch's API request

-
expiresAt: number

When the Musixmatch's usertoken expires

-
usertoken: string

Musixmatch's usertoken

-
+
expiresAt: number

When the Musixmatch's usertoken expires

+
usertoken: string

Musixmatch's usertoken

+
diff --git a/docs/interfaces/WordSyncedLyrics.html b/docs/interfaces/WordSyncedLyrics.html index f178dfd..e853a01 100644 --- a/docs/interfaces/WordSyncedLyrics.html +++ b/docs/interfaces/WordSyncedLyrics.html @@ -1,9 +1,9 @@ -WordSyncedLyrics | SyncLyrics - v2.5.3

Interface WordSyncedLyrics

interface WordSyncedLyrics {
    end: number;
    lyric: string;
    start: number;
    syncedLyric: WordSyncedLyricsLine[];
}

Properties

end +WordSyncedLyrics | SyncLyrics - v2.5.4

Interface WordSyncedLyrics

interface WordSyncedLyrics {
    end: number;
    lyric: string;
    start: number;
    syncedLyric: WordSyncedLyricsLine[];
}

Properties

end: number

When the lyric's line ends

-
lyric: string

The lyric complete text

-
start: number

When the lyric's line starts

-
syncedLyric: WordSyncedLyricsLine[]

The lyric synced by characters

-
+
lyric: string

The lyric complete text

+
start: number

When the lyric's line starts

+
syncedLyric: WordSyncedLyricsLine[]

The lyric synced by characters

+
diff --git a/docs/interfaces/WordSyncedLyricsData.html b/docs/interfaces/WordSyncedLyricsData.html index d1e435e..8f06ef8 100644 --- a/docs/interfaces/WordSyncedLyricsData.html +++ b/docs/interfaces/WordSyncedLyricsData.html @@ -1,5 +1,5 @@ -WordSyncedLyricsData | SyncLyrics - v2.5.3

Interface WordSyncedLyricsData

interface WordSyncedLyricsData {
    lyrics: undefined | null | WordSyncedLyrics[];
    source: undefined | null | string;
}

Properties

lyrics +WordSyncedLyricsData | SyncLyrics - v2.5.4

Interface WordSyncedLyricsData

interface WordSyncedLyricsData {
    lyrics: undefined | null | WordSyncedLyrics[];
    source: undefined | null | string;
}

Properties

Properties

lyrics: undefined | null | WordSyncedLyrics[]
source: undefined | null | string

Lyrics source

-
+
source: undefined | null | string

Lyrics source

+
diff --git a/docs/interfaces/WordSyncedLyricsLine.html b/docs/interfaces/WordSyncedLyricsLine.html index fd522ac..1f6e252 100644 --- a/docs/interfaces/WordSyncedLyricsLine.html +++ b/docs/interfaces/WordSyncedLyricsLine.html @@ -1,5 +1,5 @@ -WordSyncedLyricsLine | SyncLyrics - v2.5.3

Interface WordSyncedLyricsLine

interface WordSyncedLyricsLine {
    character: string;
    time: number;
}

Properties

character +WordSyncedLyricsLine | SyncLyrics - v2.5.4

Interface WordSyncedLyricsLine

interface WordSyncedLyricsLine {
    character: string;
    time: number;
}

Properties

Properties

character: string

The character of the timeframe that starts at the specified time

-
time: number

When the character timeframe starts

-
+
time: number

When the character timeframe starts

+
diff --git a/docs/modules.html b/docs/modules.html index 28229c5..a7ee4c5 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,4 +1,4 @@ -SyncLyrics - v2.5.3

SyncLyrics - v2.5.3

Index

Classes

SyncLyrics +SyncLyrics - v2.5.4

SyncLyrics - v2.5.4

Index

Classes

Interfaces

Functions

+
diff --git a/docs/sitemap.xml b/docs/sitemap.xml index f5a8a39..4462c44 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -2,118 +2,118 @@ https://synclyrics.js.org/modules.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/index.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/classes/SyncLyrics.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/Cache.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/CacheLineSyncedLyricsData.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/CacheLyrics.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/Data.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/FormattedLyric.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/LineSyncedLyricsData.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/LrcLibFetchResult.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/Lyrics.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/LyricsOutput.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/Metadata.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/MusixmatchFetchResult.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/MusixmatchLyricsFetchResult.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/MusixmatchSearchResult.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/NeteaseFetchResult.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/PlainLyricsData.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/TokenData.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/WordSyncedLyrics.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/WordSyncedLyricsData.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/interfaces/WordSyncedLyricsLine.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/types/LogLevel.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/types/LyricType.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/types/Sources.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/variables/logLevels.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/variables/lyricType-1.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/variables/sources-1.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z https://synclyrics.js.org/functions/normalize.html - 2024-11-18T14:36:04.971Z + 2024-11-18T14:55:50.356Z diff --git a/docs/types/LogLevel.html b/docs/types/LogLevel.html index ad39399..4e71990 100644 --- a/docs/types/LogLevel.html +++ b/docs/types/LogLevel.html @@ -1 +1 @@ -LogLevel | SyncLyrics - v2.5.3

Type Alias LogLevel

LogLevel:
    | "none"
    | "info"
    | "warn"
    | "error"
    | "debug"
+LogLevel | SyncLyrics - v2.5.4

Type Alias LogLevel

LogLevel:
    | "none"
    | "info"
    | "warn"
    | "error"
    | "debug"
diff --git a/docs/types/LyricType.html b/docs/types/LyricType.html index ea337a2..5eea6d8 100644 --- a/docs/types/LyricType.html +++ b/docs/types/LyricType.html @@ -1 +1 @@ -LyricType | SyncLyrics - v2.5.3

Type Alias LyricType

LyricType: ("plain" | "lineSynced" | "wordSynced")[]
+LyricType | SyncLyrics - v2.5.4

Type Alias LyricType

LyricType: ("plain" | "lineSynced" | "wordSynced")[]
diff --git a/docs/types/Sources.html b/docs/types/Sources.html index ec7d1e8..79e3717 100644 --- a/docs/types/Sources.html +++ b/docs/types/Sources.html @@ -1,7 +1,7 @@ -Sources | SyncLyrics - v2.5.3

Type Alias Sources

Sources: ("musixmatch" | "lrclib" | "netease")[]

Avaible sources:

+Sources | SyncLyrics - v2.5.4

Type Alias Sources

Sources: ("musixmatch" | "lrclib" | "netease")[]

Avaible sources:

-
+
diff --git a/docs/variables/logLevels.html b/docs/variables/logLevels.html index 1200c03..28a264c 100644 --- a/docs/variables/logLevels.html +++ b/docs/variables/logLevels.html @@ -1 +1 @@ -logLevels | SyncLyrics - v2.5.3

Variable logLevelsConst

logLevels: {
    debug: number;
    error: number;
    info: number;
    none: number;
    warn: number;
} = ...
+logLevels | SyncLyrics - v2.5.4

Variable logLevelsConst

logLevels: {
    debug: number;
    error: number;
    info: number;
    none: number;
    warn: number;
} = ...
diff --git a/docs/variables/lyricType-1.html b/docs/variables/lyricType-1.html index 823c7fb..92565d3 100644 --- a/docs/variables/lyricType-1.html +++ b/docs/variables/lyricType-1.html @@ -1 +1 @@ -lyricType | SyncLyrics - v2.5.3

Variable lyricTypeConst

lyricType: LyricType = ...
+lyricType | SyncLyrics - v2.5.4

Variable lyricTypeConst

lyricType: LyricType = ...
diff --git a/docs/variables/sources-1.html b/docs/variables/sources-1.html index e4d9a7a..0d4e22d 100644 --- a/docs/variables/sources-1.html +++ b/docs/variables/sources-1.html @@ -1 +1 @@ -sources | SyncLyrics - v2.5.3

Variable sourcesConst

sources: Sources = ...
+sources | SyncLyrics - v2.5.4

Variable sourcesConst

sources: Sources = ...
diff --git a/package-lock.json b/package-lock.json index 729187f..bafad67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stef-0012/synclyrics", - "version": "2.5.3", + "version": "2.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@stef-0012/synclyrics", - "version": "2.5.3", + "version": "2.5.4", "license": "MIT", "dependencies": { "util": "^0.12.5" diff --git a/package.json b/package.json index f631cde..488cb84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stef-0012/synclyrics", - "version": "2.5.3", + "version": "2.5.4", "description": "Get the plain, line synced & word synced lyrics of any song avaible on Musixmatch, LrcLib.net or Netease", "main": "dist/index.min.js", "types": "./types/index.d.ts", @@ -12,8 +12,8 @@ "build": "npm run build:compile && npm run build:docs", "build:compile": "tsc && google-closure-compiler --js=dist/index.js --js_output_file=dist/index.min.js", "build:docs": "typedoc --options typedoc.json", - "test": "node tests/test.js", - "test2": "node tests/test2.js" + "test": "node __tests__/test.js", + "test2": "node __tests__/test2.js" }, "type": "commonjs", "repository": {