Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
478 bytes
|
Rev | Line | |
---|
[6a3a178] | 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.