Convert a username/group name to a uid/gid number
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE isc license Feb 17, 2014
README.md readme update Feb 28, 2012
get-uid-gid.js the rest Feb 28, 2012
package.json package: fix repository link Oct 8, 2015
uid-number.js fix confusing variable names Feb 20, 2014

README.md

Use this module to convert a username/groupname to a uid/gid number.

Usage:

npm install uid-number

Then, in your node program:

var uidNumber = require("uid-number")
uidNumber("isaacs", function (er, uid, gid) {
  // gid is null because we didn't ask for a group name
  // uid === 24561 because that's my number.
})