UNPKG

anthology

Version:

Module information and stats for any @npmjs user

16 lines (15 loc) 368 B
'use strict'; var npmconf = require('npmconf'); var Q = require('q'); function getUsername() { return Q.nfcall(npmconf.load) .then(function(conf){ return conf.get('username'); }, function(err){ console.log('err getting username', err); return ''; }); } module.exports = { getUsername: getUsername };