Skip to content

Commit

Permalink
Refactor remove/Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
JPeer264 committed Feb 17, 2017
1 parent d9fe529 commit de64547
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/remove/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
var rimraf = require('./rimraf')
'use strict'

const rimraf = require('./rimraf')

function removeSync (dir) {
return rimraf.sync(dir, {disableGlob: true})
}

function remove (dir, callback) {
var options = {disableGlob: true}
const options = {disableGlob: true}
return callback ? rimraf(dir, options, callback) : rimraf(dir, options, function () {})
}

module.exports = {
remove: remove,
removeSync: removeSync
remove,
removeSync
}

0 comments on commit de64547

Please sign in to comment.