Skip to content

Commit

Permalink
remove then-parse-json
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Jun 2, 2015
1 parent 6978e70 commit 7a327f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Expand Up @@ -8,12 +8,11 @@
'use strict'

var fs = require('mz/fs')
var parseJson = require('then-parse-json')

module.exports = function thenReadJson (fp) {
if (typeof fp !== 'string') {
throw new TypeError('then-read-json expect `fp` be string')
}

return fs.readFile(fp, 'utf8').then(parseJson)
return fs.readFile(fp, 'utf8').then(JSON.parse)
}

0 comments on commit 7a327f8

Please sign in to comment.