mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
387 B
15 lines
387 B
10 years ago
|
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)
|
||
|
}
|