From 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 28 May 2017 00:38:50 +0200 Subject: add linting (and some initial fixes) --- node_modules/nyc/lib/hash.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 node_modules/nyc/lib/hash.js (limited to 'node_modules/nyc/lib/hash.js') diff --git a/node_modules/nyc/lib/hash.js b/node_modules/nyc/lib/hash.js new file mode 100644 index 000000000..a36372071 --- /dev/null +++ b/node_modules/nyc/lib/hash.js @@ -0,0 +1,14 @@ +const CACHE_VERSION = require('../package.json').version +const md5hex = require('md5-hex') +const salt = JSON.stringify({ + istanbul: require('istanbul-lib-coverage/package.json').version, + nyc: CACHE_VERSION +}) + +function Hash (code, filename) { + return md5hex([code, filename, salt]) + '_' + CACHE_VERSION +} + +Hash.salt = salt + +module.exports = Hash -- cgit v1.2.3