Current File : //lib/node_modules/npm/lib/utils/replace-info.js
const URL = require('url').URL

// replaces auth info in an array
//  of arguments or in a strings
function replaceInfo (arg) {
  const isArray = Array.isArray(arg)
  const isString = typeof arg === 'string'

  if (!isArray && !isString) return arg

  const args = isString ? arg.split(' ') : arg
  const info = args.map(arg => {
    try {
      const url = new URL(arg)
      return url.password === '' ? arg : arg.replace(url.password, '***')
    } catch (e) { return arg }
  })

  return isString ? info.join(' ') : info
}

module.exports = replaceInfo
Comments on: Btooom! Chapter 74 https://w3.readbtooom.com/manga/btooom-chapter-74/ Read Btooom! Manga Online in High Quality Wed, 30 Nov 2022 23:56:25 +0000 hourly 1 https://wordpress.org/?v=6.4.5