0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/test/functional/lib/test.utils.js
2018-01-07 07:59:36 +00:00

14 lines
311 B
JavaScript

import crypto from 'crypto';
import fs from 'fs';
import path from 'path';
function generateSha(key) {
return crypto.createHash('sha1', 'binary').update(key).digest('hex');
}
function readFile(filePath) {
return fs.readFileSync(path.join(__dirname, `/${filePath}`));
}
export { generateSha, readFile }