@jsenv/url-meta
Advanced tools
Comparing version 8.5.1 to 8.5.2
{ | ||
"name": "@jsenv/url-meta", | ||
"version": "8.5.1", | ||
"version": "8.5.2", | ||
"license": "MIT", | ||
@@ -28,6 +28,3 @@ "repository": { | ||
], | ||
"scripts": { | ||
"test": "node --conditions=development ./scripts/test.mjs" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -24,3 +24,3 @@ import { applyPattern } from "./pattern_matching.js"; | ||
patternResolved = String(new URL(pattern, baseUrl)); | ||
} catch (e) { | ||
} catch { | ||
// it's not really an url, no need to perform url resolution nor encoding | ||
@@ -89,9 +89,15 @@ patternResolved = pattern; | ||
const deepAssign = (firstValue, secondValue) => { | ||
if (!isPlainObject(firstValue) || !isPlainObject(secondValue)) { | ||
if (!isPlainObject(firstValue)) { | ||
if (isPlainObject(secondValue)) { | ||
return deepAssign({}, secondValue); | ||
} | ||
return secondValue; | ||
} | ||
if (!isPlainObject(secondValue)) { | ||
return secondValue; | ||
} | ||
for (const key of Object.keys(secondValue)) { | ||
const leftValue = firstValue[key]; | ||
const rightValue = secondValue[key]; | ||
firstValue[key] = deepAssign(leftValue, rightValue); | ||
const leftPopertyValue = firstValue[key]; | ||
const rightPropertyValue = secondValue[key]; | ||
firstValue[key] = deepAssign(leftPopertyValue, rightPropertyValue); | ||
} | ||
@@ -98,0 +104,0 @@ return firstValue; |
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
19238
536