D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
alt-nodejs6
/
root
/
usr
/
lib
/
node_modules
/
npm
/
lib
/
cache
/
Filename :
cached-package-root.js
back
Copy
var assert = require('assert') var resolve = require('path').resolve var npm = require('../npm.js') module.exports = getCacheRoot function getCacheRoot (data) { assert(data, 'must pass package metadata') assert(data.name, 'package metadata must include name') assert(data.version, 'package metadata must include version') return resolve(npm.cache, data.name, data.version) }