Sha256: 912cff1f69d2f1e83eed339fc12566f156fdb3e467216974b51c2bf0567b88ae
Contents?: true
Size: 499 Bytes
Versions: 7
Compression:
Stored size: 499 Bytes
Contents
'use strict' const util = require('util') const contentPath = require('./path') const { hasContent } = require('./read') const rimraf = util.promisify(require('rimraf')) module.exports = rm function rm (cache, integrity) { return hasContent(cache, integrity).then((content) => { // ~pretty~ sure we can't end up with a content lacking sri, but be safe if (content && content.sri) return rimraf(contentPath(cache, content.sri)).then(() => true) else return false }) }
Version data entries
7 entries across 7 versions & 1 rubygems