@qgisk/steamresolver
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "@qgisk/steamresolver", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Steam ID Lookup from custom urls and the other way around", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -77,18 +77,2 @@ const xmlParser = require('xml2js'); | ||
/** | ||
* @description Internal helper to emit a warning to the console | ||
* @function _WARN_ | ||
* @param {string} title | ||
* @param {string} detail | ||
* @returns {boolean} | ||
*/ | ||
const _WARN_ = (title = '', detail = '') => { | ||
process.emitWarning(title, { | ||
detail, | ||
code: 'SteamResolver', | ||
}); | ||
return true; | ||
}; | ||
const parseXML = (data) => | ||
@@ -101,5 +85,5 @@ new xmlParser.Parser() | ||
return _WARN_('Not found', 'Resource cannot be found.'); | ||
return new Error('Resource cannot be found.'); | ||
}) | ||
.catch((e) => _WARN_('Error', `Error parsing data xml: ${e}`)); | ||
.catch((e) => new Error(`Error parsing data xml: ${e}`)); | ||
@@ -127,5 +111,4 @@ const parseParams = (param) => { | ||
doesInclude, | ||
_WARN_, | ||
parseXML, | ||
parseParams, | ||
}; |
@@ -14,3 +14,3 @@ const fetch = require('isomorphic-unfetch'); | ||
* @public | ||
* @version 1.0.4 | ||
* @version 1.0.5 | ||
* @license MIT | ||
@@ -127,3 +127,3 @@ */ | ||
// Check if output is steam group xml data before parsing it in order to provide correct group not found message | ||
Utils._WARN_('Not found', 'Resource cannot be found.'); | ||
return new Error('Resource cannot be found'); | ||
} | ||
@@ -133,3 +133,3 @@ | ||
}) | ||
.catch((e) => Utils._WARN_('Error', `Error trying to reach Steam: ${e}`)); | ||
.catch((e) => new Error(`Error trying to reach Steam: ${e}`)); | ||
} | ||
@@ -136,0 +136,0 @@ } |
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
12204
214