Skip to content

Commit

Permalink
fix: Updated for new mkdirp
Browse files Browse the repository at this point in the history
mkdirp now returns a promise, so we don't need to promisify it
  • Loading branch information
jezhiggins committed Oct 9, 2020
1 parent 3367018 commit a73505f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const eol = '\n'

const pexists = path =>
new Promise(resolve => fs.access(path, err => resolve(!err)))
const pmkdirp = promisify(mkdirp)

const stringType = 'string'

Expand Down Expand Up @@ -58,7 +57,7 @@ async function createOutputStream (csvPath) {
if (!csvPath) throw error('csvPath must be set')

const outputDir = path.dirname(csvPath)
await pmkdirp(outputDir)
await mkdirp(outputDir)
return fs.createWriteStream(csvPath)
} // createOutputStream

Expand Down

0 comments on commit a73505f

Please sign in to comment.