ytmusic_api_unofficial
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,7 +10,10 @@ "use strict"; | ||
function makeAxiosError(error, ...args) { | ||
const msg = (error in errorCodes_1.default) ? Messages_1.default[error] : Messages_1.default[errorCodes_1.default.UnrecognizedError]; | ||
const msg = (error in errorCodes_1.default) ? Messages_1.default[error] : null; | ||
if (typeof msg === 'function') | ||
return new Error(msg(...args)); | ||
if (!(args === null || args === void 0 ? void 0 : args.length)) | ||
return new Error(msg); | ||
if (!(args === null || args === void 0 ? void 0 : args.length)) { | ||
new Error(`An unknown error has occurred: ${error}`); | ||
// @ts-ignore | ||
return new Error(args); | ||
} | ||
args.unshift(msg); | ||
@@ -17,0 +20,0 @@ return new Error(String(...args)); |
{ | ||
"name": "ytmusic_api_unofficial", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A simple API to get music from YouTube Music", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35081
823