|
|
@ -9,9 +9,9 @@ import { readFile } from 'fs-promise'; |
|
|
|
*/ |
|
|
|
|
|
|
|
export default async function hashes (files) { |
|
|
|
const entries = await Promise.all(files.map(async (file) => { |
|
|
|
const data = await readFile(file); |
|
|
|
return [hash(data), file]; |
|
|
|
const entries = await Promise.all(files.map(async (name) => { |
|
|
|
const data = await readFile(name); |
|
|
|
return [hash(data), { name, data }]; |
|
|
|
})); |
|
|
|
return new Map(entries); |
|
|
|
} |
|
|
|