"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/cache/cached-package-root.js" (8 Mar 2017, 387 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var assert = require('assert')
    2 var resolve = require('path').resolve
    3 
    4 var npm = require('../npm.js')
    5 
    6 module.exports = getCacheRoot
    7 
    8 function getCacheRoot (data) {
    9   assert(data, 'must pass package metadata')
   10   assert(data.name, 'package metadata must include name')
   11   assert(data.version, 'package metadata must include version')
   12 
   13   return resolve(npm.cache, data.name, data.version)
   14 }