Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
478 bytes
|
Line | |
---|
1 | /*
|
---|
2 | Copyright 2015, Yahoo Inc.
|
---|
3 | Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
---|
4 | */
|
---|
5 | 'use strict';
|
---|
6 |
|
---|
7 | function getUniqueKey(pathname) {
|
---|
8 | return pathname.replace(/[\\/]/g, '_');
|
---|
9 | }
|
---|
10 |
|
---|
11 | function getOutput(cache) {
|
---|
12 | return Object.values(cache).reduce(
|
---|
13 | (output, { file, mappedCoverage }) => ({
|
---|
14 | ...output,
|
---|
15 | [file]: mappedCoverage
|
---|
16 | }),
|
---|
17 | {}
|
---|
18 | );
|
---|
19 | }
|
---|
20 |
|
---|
21 | module.exports = { getUniqueKey, getOutput };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.