pnpm
Version:
A fast implementation of npm install
20 lines • 502 B
JavaScript
;
const fs = require('mz/fs');
/**
* Removes a symlink
*/
function unsymlink(path) {
return fs.lstat(path)
.then((stat) => {
if (stat.isSymbolicLink())
return fs.unlink(path);
throw new Error('Can\'t unlink ' + path);
})
.catch((err) => {
if (err.code !== 'ENOENT')
throw err;
});
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = unsymlink;
//# sourceMappingURL=unsymlink.js.map