GT2/Ejectable/node_modules/md5-file/promise.js

17 lines
318 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
'use strict'
var md5File = require('./')
function md5FileAsPromised (filename) {
return new Promise(function (resolve, reject) {
md5File(filename, function (err, hash) {
if (err) return reject(err)
resolve(hash)
})
})
}
module.exports = md5FileAsPromised
module.exports.sync = md5File.sync