bin-wrapper-china
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "bin-wrapper-china", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "Binary mirror download link replacement for mainland China", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -11,13 +11,15 @@ const { | ||
const replaceMaps = Object.values(mirrors) | ||
.filter( | ||
({ replaceHostMap, replaceHost, host }) => | ||
replaceHostMap || (replaceHost && host) | ||
) | ||
.map( | ||
({ replaceHostMap, replaceHost = [], host }) => | ||
replaceHostMap || | ||
toArray(replaceHost).reduce((io, key) => ({ ...io, [key]: host }), {}) | ||
) | ||
.flatMap(io => Object.entries(io)); | ||
const replaceMaps = Object.entries( | ||
Object.values(mirrors) | ||
.filter( | ||
({ replaceHostMap, replaceHost, host }) => | ||
replaceHostMap || (replaceHost && host) | ||
) | ||
.map( | ||
({ replaceHostMap, replaceHost = [], host }) => | ||
replaceHostMap || | ||
toArray(replaceHost).reduce((io, key) => ({ ...io, [key]: host }), {}) | ||
) | ||
.reduce((io, obj) => ({ ...io, ...obj }), {}) | ||
); | ||
@@ -24,0 +26,0 @@ module.exports = function urlReplacer(url) { |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
7414
211
0