You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemmionic5/Mohem/node_modules_/npm/lib/utils/gently-rm.js

22 lines
484 B
JavaScript

// only remove the thing if it's a symlink into a specific folder. This is
// a very common use-case of npm's, but not so common elsewhere.
exports = module.exports = gentlyRm
var gentleFS = require('gentle-fs')
var gentleFSOpts = require('../config/gentle-fs.js')
function gentlyRm (target, gently, base, cb) {
if (!cb) {
cb = base
base = undefined
}
if (!cb) {
cb = gently
gently = false
}
return gentleFS.rm(target, gentleFSOpts(gently, base), cb)
}