"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/config/clear-credentials-by-uri.js" (8 Mar 2017, 423 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var assert = require('assert')
    2 
    3 var toNerfDart = require('./nerf-dart.js')
    4 
    5 module.exports = clearCredentialsByURI
    6 
    7 function clearCredentialsByURI (uri) {
    8   assert(uri && typeof uri === 'string', 'registry URL is required')
    9 
   10   var nerfed = toNerfDart(uri)
   11 
   12   this.del(nerfed + ':_authToken', 'user')
   13   this.del(nerfed + ':_password', 'user')
   14   this.del(nerfed + ':username', 'user')
   15   this.del(nerfed + ':email', 'user')
   16 }