Skip to content
This repository was archived by the owner on Jul 3, 2019. It is now read-only.

Commit a000d24

Browse files
committed
feat(rm): switched to promises
BREAKING CHANGE: Switches to a Promise-based API and removes callback stuff
1 parent 97d48de commit a000d24

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/content/rm.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
'use strict'
22

3+
var Promise = require('bluebird')
4+
35
var contentPath = require('./path')
4-
var rimraf = require('rimraf')
6+
var rimraf = Promise.promisify(require('rimraf'))
57

68
module.exports = rm
7-
function rm (cache, address, cb) {
8-
rimraf(contentPath(cache, address), cb)
9+
function rm (cache, address) {
10+
return rimraf(contentPath(cache, address))
911
}

0 commit comments

Comments
 (0)