PHP 8.2.30
Preview: rm.js Size: 493 B
/opt/alt/alt-nodejs16/root/lib/node_modules/npm/node_modules/cacache/lib/content/rm.js

'use strict'

const util = require('util')

const contentPath = require('./path')
const { hasContent } = require('./read')
const rimraf = util.promisify(require('rimraf'))

module.exports = rm

async function rm (cache, integrity) {
  const content = await hasContent(cache, integrity)
  // ~pretty~ sure we can't end up with a content lacking sri, but be safe
  if (content && content.sri) {
    await rimraf(contentPath(cache, content.sri))
    return true
  } else {
    return false
  }
}

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
737 B lrw-r--r-- 2026-03-09 06:51:26
Edit Download
6.06 KB lrw-r--r-- 2026-03-09 06:51:26
Edit Download
493 B lrw-r--r-- 2026-03-09 06:51:26
Edit Download
5.11 KB lrw-r--r-- 2026-03-09 06:51:26
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).