This commit is contained in:
Domen Kožar 2019-11-19 17:50:30 +01:00
parent cd5893b2c6
commit 70742d22d9
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
6774 changed files with 1602535 additions and 1 deletions

View file

@ -0,0 +1,20 @@
/*
Copyright 2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
function getUniqueKey(pathname) {
return pathname.replace(/[\\/]/g, '_');
}
function getOutput(cache) {
return Object.keys(cache).reduce((output, key) => {
const item = cache[key];
return Object.assign(output, {
[item.file]: item.mappedCoverage
});
}, {});
}
module.exports = { getUniqueKey, getOutput };