mappersmith
Advanced tools
Comparing version 2.31.0 to 2.31.1
@@ -16,3 +16,3 @@ "use strict"; | ||
/* global VERSION */ | ||
var version = "2.31.0"; | ||
var version = "2.31.1"; | ||
exports.version = version; | ||
@@ -19,0 +19,0 @@ var configs = { |
{ | ||
"name": "mappersmith", | ||
"version": "2.31.0", | ||
"version": "2.31.1", | ||
"description": "It is a lightweight rest client for node.js and the browser", | ||
@@ -5,0 +5,0 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", |
@@ -89,9 +89,14 @@ "use strict"; | ||
var regexp = new RegExp(REGEXP_DYNAMIC_SEGMENT, 'g'); | ||
var dynamicSegmentKeys = []; | ||
var match; | ||
while ((match = regexp.exec(path)) !== null) { | ||
var key = match[1]; | ||
dynamicSegmentKeys.push(match[1]); | ||
} | ||
for (var _i = 0; _i < dynamicSegmentKeys.length; _i++) { | ||
var key = dynamicSegmentKeys[_i]; | ||
var pattern = new RegExp("{".concat(key, "\\??}"), 'g'); | ||
if (key in params) { | ||
if (params[key] != null) { | ||
path = path.replace(pattern, encodeURIComponent(params[key])); | ||
@@ -98,0 +103,0 @@ delete params[key]; |
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
149253
2809