node package manager


node.js wrapper for POSIX getpwuid() function


node.js wrapper for POSIX {getpwuid()} function. The main use of this method is to convert numeric user ids (e.g. as obtainable from {process.getuid()}) into string user names.

For more info

man getpwuid
npm install getpw


git clone
cd getpw
npm link
var getpw = require("getpw");


outputs something like

{ pw_name: 'femto113', pw_uid: 113, pw_gid: 22, pw_dir: '/home/femto113', pw_shell: '/bin/tcsh' }

  • will probably blow up on non-POSIX (i.e. Windows) OS
  • there are some other functions (esp. {getpwnam()}) that would make sense to add