npm-cache-filename
Given a cache folder and url, return the appropriate cache folder.
USAGE
var cf = ;console;// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar
As a bonus, you can also bind it to a specific root path:
var cf = ;var getFile = ; console;// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar