HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1784574/root/usr/share/node_modules/@npmcli/config/lib/
Upload File :
Current File : //proc/1784574/root/usr/share/node_modules/@npmcli/config/lib/type-description.js
// return the description of the valid values of a field
// returns a string for one thing, or an array of descriptions
const typeDefs = require('./type-defs.js')
const typeDescription = t => {
  if (!t || typeof t !== 'function' && typeof t !== 'object') {
    return t
  }

  if (Array.isArray(t)) {
    return t.map(t => typeDescription(t))
  }

  for (const { type, description } of Object.values(typeDefs)) {
    if (type === t) {
      return description || type
    }
  }

  return t
}
module.exports = t => [].concat(typeDescription(t)).filter(t => t !== undefined)