Comparing version 1.9.0 to 1.9.1
@@ -27,2 +27,10 @@ 'use strict'; | ||
/** | ||
* @description Returns default stimmy object. | ||
* @returns {*} | ||
*/ | ||
static replacer() { | ||
return (0, _stimmy2.default)(); | ||
} | ||
/** | ||
* @description Runs GET request. | ||
@@ -125,3 +133,3 @@ * @param url | ||
static formatUrl(url, values) { | ||
const urlTmp = (0, _stimmy2.default)(url, values); | ||
const urlTmp = Common.replacer(url, values); | ||
if (urlTmp.includes('{') || urlTmp.includes('}')) { | ||
@@ -135,2 +143,2 @@ return Promise.reject({ error: { name: 'Oups...', message: `Url parameter missing: ${urlTmp}` } }); | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbGFzc2VzL2NvbW1vbi9jb21tb24uanMiXSwibmFtZXMiOlsiQ29tbW9uIiwiY29uc3RydWN0b3IiLCJjb25maWd1cmF0aW9uIiwiZ2V0UmVxdWVzdCIsInVybCIsImJvZHkiLCJoZWFkZXJzIiwiYXhpb3MiLCJnZXQiLCJob3N0IiwiZ2V0SGVhZGVycyIsInRoZW4iLCJkYXRhIiwiUHJvbWlzZSIsInJlc29sdmUiLCJwb3N0UmVxdWVzdCIsInBvc3QiLCJwdXRSZXF1ZXN0IiwicHV0IiwiZGVsZXRlUmVxdWVzdCIsImRlbGV0ZSIsInJldHJ5IiwiY29uZmlnIiwicmVzIiwiY2F0Y2giLCJlIiwicmVqZWN0IiwicmVmcmVzaFRva2VuIiwiY2FsbGJhY2siLCJpbnRlcmNlcHRvcnMiLCJyZXNwb25zZSIsInVzZSIsImVycm9yIiwiRXJyb3JzIiwiZ2V0TWVzc2FnZSIsImFkZENvbW1vbkhlYWRlcnMiLCJPYmplY3QiLCJhc3NpZ24iLCJkZWZhdWx0cyIsImNvbW1vbiIsImRlbGV0ZUNvbW1vbkhlYWRlcnMiLCJuZXdIZWFkZXIiLCJrZXlzIi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ybiBQcm9taXNlLnJlamVjdCh7ZXJyb3I6IHtuYW1lOiAnT3Vwcy4uLicsIG1lc3NhZ2U6IGBVcmwgcGFyYW1ldGVyIG1pc3Npbmc6ICR7dXJsVG1wfWB9fSk7XG4gICAgfVxuICAgIHJldHVybiB1cmxUbXA7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "g8-js-sdk", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Ambulance G8 Javascript SDK", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -11,2 +11,10 @@ import stimmy from '@rimiti/stimmy'; | ||
/** | ||
* @description Returns default stimmy object. | ||
* @returns {*} | ||
*/ | ||
static replacer() { | ||
return stimmy(); | ||
} | ||
/** | ||
* @description Runs GET request. | ||
@@ -117,3 +125,3 @@ * @param url | ||
static formatUrl(url, values) { | ||
const urlTmp = stimmy(url, values); | ||
const urlTmp = Common.replacer(url, values); | ||
if (urlTmp.includes('{') || urlTmp.includes('}')) { | ||
@@ -120,0 +128,0 @@ return Promise.reject({error: {name: 'Oups...', message: `Url parameter missing: ${urlTmp}`}}); |
Sorry, the diff of this file is not supported yet
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
145108
1458