@natlibfi/marc-record-merge 6.0.0-beta.1 → 6.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +9 -0
- package/.github/dependabot.yml +41 -0
- package/.github/workflows/melinda-node-tests.yml +60 -0
- package/LICENSE +21 -0
- package/README.md +122 -2
- package/dist/index.js +56 -42
- package/dist/index.js.map +1 -1
- package/dist/index.spec.js +59 -0
- package/dist/index.spec.js.map +1 -0
- package/dist/reducers/copy.js +254 -80
- package/dist/reducers/copy.js.map +1 -1
- package/dist/reducers/copy.spec.js +57 -72
- package/dist/reducers/copy.spec.js.map +1 -1
- package/dist/reducers/copy2.spec.js +67 -0
- package/dist/reducers/copy2.spec.js.map +1 -0
- package/dist/reducers/index.js +13 -24
- package/dist/reducers/index.js.map +1 -1
- package/dist/reducers/select.js +63 -58
- package/dist/reducers/select.js.map +1 -1
- package/dist/reducers/select.spec.js +45 -92
- package/dist/reducers/select.spec.js.map +1 -1
- package/dist/reducers/select2.spec.js +58 -0
- package/dist/reducers/select2.spec.js.map +1 -0
- package/package.json +33 -32
- package/src/index.js +50 -32
- package/src/index.spec.js +45 -0
- package/src/reducers/copy.js +262 -80
- package/src/reducers/copy.spec.js +50 -48
- package/src/reducers/copy2.spec.js +55 -0
- package/src/reducers/index.js +3 -30
- package/src/reducers/select.js +53 -39
- package/src/reducers/select.spec.js +41 -56
- package/src/reducers/select2.spec.js +49 -0
- package/test-fixtures/index/01/base.json +24 -0
- package/test-fixtures/index/01/merged.json +24 -0
- package/test-fixtures/index/01/metadata.json +8 -0
- package/test-fixtures/index/01/source.json +40 -0
- package/test-fixtures/index/02/base.json +24 -0
- package/test-fixtures/index/02/merged.json +24 -0
- package/test-fixtures/index/02/metadata.json +7 -0
- package/test-fixtures/index/02/source.json +40 -0
- package/test-fixtures/reducers/copy/{01/base.json → 01 - copy/01/base.json } +1 -1
- package/test-fixtures/reducers/copy/{01 → 01 - copy/01}/merged.json +0 -0
- package/test-fixtures/reducers/copy/01 - copy/01/metadata.json +4 -0
- package/test-fixtures/reducers/copy/{01 → 01 - copy/01}/source.json +0 -0
- package/test-fixtures/reducers/copy/{02/source.json → 01 - copy/02/base.json} +0 -0
- package/test-fixtures/reducers/copy/{02 → 01 - copy/02}/merged.json +0 -0
- package/test-fixtures/reducers/copy/01 - copy/02/metadata.json +4 -0
- package/test-fixtures/reducers/copy/{02/base.json → 01 - copy/02/source.json } +1 -1
- package/test-fixtures/reducers/copy/{03/base.json → 01 - copy/03/base.json } +1 -1
- package/test-fixtures/reducers/copy/{03 → 01 - copy/03}/merged.json +0 -0
- package/test-fixtures/reducers/copy/01 - copy/03/metadata.json +4 -0
- package/test-fixtures/reducers/copy/{03 → 01 - copy/03}/source.json +0 -0
- package/test-fixtures/reducers/copy/{05/base.json → 01 - copy/04/base.json } +1 -1
- package/test-fixtures/reducers/copy/{04/merged.json → 01 - copy/04/merged.json } +1 -1
- package/test-fixtures/reducers/copy/01 - copy/04/metadata.json +4 -0
- package/test-fixtures/reducers/copy/{04/source.json → 01 - copy/04/source.json } +1 -1
- package/test-fixtures/reducers/copy/{04/base.json → 01 - copy/05/base.json } +1 -1
- package/test-fixtures/reducers/copy/01 - copy/05/merged.json +77 -0
- package/test-fixtures/reducers/copy/01 - copy/05/metadata.json +4 -0
- package/test-fixtures/reducers/copy/01 - copy/05/source.json +62 -0
- package/test-fixtures/reducers/copy/01 - copy/06/base.json +24 -0
- package/test-fixtures/reducers/copy/01 - copy/06/merged.json +39 -0
- package/test-fixtures/reducers/copy/01 - copy/06/metadata.json +4 -0
- package/test-fixtures/reducers/copy/01 - copy/06/source.json +24 -0
- package/test-fixtures/reducers/copy/01 - copy/07/base.json +39 -0
- package/test-fixtures/reducers/copy/01 - copy/07/merged.json +39 -0
- package/test-fixtures/reducers/copy/01 - copy/07/metadata.json +5 -0
- package/test-fixtures/reducers/copy/01 - copy/07/source.json +24 -0
- package/test-fixtures/reducers/copy/01 - copy/08/base.json +28 -0
- package/test-fixtures/reducers/copy/01 - copy/08/merged.json +28 -0
- package/test-fixtures/reducers/copy/01 - copy/08/metadata.json +4 -0
- package/test-fixtures/reducers/copy/01 - copy/08/source.json +24 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/base.json +17 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/merged.json +20 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/metadata.json +6 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/source.json +20 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/base.json +9 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/merged.json +20 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/metadata.json +6 -0
- package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/source.json +20 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/base.json +24 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/merged.json +24 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/metadata.json +5 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/source.json +24 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/base.json +24 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/merged.json +100 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/metadata.json +5 -0
- package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/source.json +100 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/base.json +24 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/merged.json +24 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/metadata.json +5 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/source.json +24 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/base.json +24 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/merged.json +39 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/metadata.json +5 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/source.json +24 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/03/metadata.json +6 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/base.json +20 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/merged.json +31 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/metadata.json +5 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/source.json +20 -0
- package/test-fixtures/reducers/copy/05 - copyUnless/01/base.json +9 -0
- package/test-fixtures/reducers/copy/05 - copyUnless/01/merged.json +24 -0
- package/test-fixtures/reducers/copy/05 - copyUnless/01/metadata.json +5 -0
- package/test-fixtures/reducers/copy/05 - copyUnless/01/source.json +47 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/base.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/merged.json +39 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/metadata.json +5 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/source.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/base.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/merged.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/metadata.json +5 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/source.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/base.json +28 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/merged.json +43 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/metadata.json +5 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/source.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/base.json +28 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/merged.json +28 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/metadata.json +5 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/source.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/base.json +20 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/merged.json +35 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/metadata.json +5 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/source.json +24 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/base.json +20 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/merged.json +35 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/metadata.json +5 -0
- package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/source.json +24 -0
- package/test-fixtures/reducers/copy/07 - excludeSubfields/01/base.json +39 -0
- package/test-fixtures/reducers/copy/07 - excludeSubfields/01/merged.json +39 -0
- package/test-fixtures/reducers/copy/07 - excludeSubfields/01/metadata.json +8 -0
- package/test-fixtures/reducers/copy/{05/source.json → 07 - excludeSubfields/01/source.json } +1 -1
- package/test-fixtures/reducers/copy/07 - excludeSubfields/02/base.json +39 -0
- package/test-fixtures/reducers/copy/{05/merged.json → 07 - excludeSubfields/02/merged.json } +5 -5
- package/test-fixtures/reducers/copy/07 - excludeSubfields/02/metadata.json +5 -0
- package/test-fixtures/reducers/copy/07 - excludeSubfields/02/source.json +43 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/01/base.json +35 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/01/merged.json +54 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/01/metadata.json +5 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/01/source.json +43 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/02/base.json +43 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/02/merged.json +58 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/02/metadata.json +5 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/02/source.json +32 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/03/base.json +43 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/03/merged.json +58 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/03/metadata.json +5 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/03/source.json +32 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/04/base.json +43 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/04/merged.json +43 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/04/metadata.json +5 -0
- package/test-fixtures/reducers/copy/08 - dropSubfields/04/source.json +32 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/base.json +9 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/merged.json +20 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/metadata.json +6 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/source.json +20 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/base.json +9 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/merged.json +20 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/metadata.json +6 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/source.json +20 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/base.json +9 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/merged.json +31 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/metadata.json +6 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/source.json +31 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/base.json +9 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/merged.json +42 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/metadata.json +6 -0
- package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/source.json +42 -0
- package/test-fixtures/reducers/copy/10 - swapTag/01/base.json +17 -0
- package/test-fixtures/reducers/copy/10 - swapTag/01/merged.json +28 -0
- package/test-fixtures/reducers/copy/10 - swapTag/01/metadata.json +6 -0
- package/test-fixtures/reducers/copy/10 - swapTag/01/source.json +20 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/base.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/merged.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/metadata.json +6 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/source.json +20 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/base.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/merged.json +39 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/metadata.json +6 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/source.json +31 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/base.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/merged.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/metadata.json +7 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/source.json +20 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/base.json +17 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/merged.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/metadata.json +7 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/source.json +31 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/base.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/merged.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/metadata.json +7 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/source.json +28 -0
- package/test-fixtures/reducers/metadata.json +4 -0
- package/test-fixtures/reducers/select/01/metadata.json +5 -0
- package/test-fixtures/reducers/select/02/metadata.json +4 -0
- package/test-fixtures/reducers/select/03/metadata.json +4 -0
- package/test-fixtures/reducers/select/04/metadata.json +5 -0
- package/test-fixtures/reducers/select/05/metadata.json +4 -0
- package/test-fixtures/reducers/select/06/base.json +4 -0
- package/test-fixtures/reducers/select/06/merged.json +4 -0
- package/test-fixtures/reducers/select/06/metadata.json +4 -0
- package/test-fixtures/reducers/select/06/source.json +4 -0
- package/test-fixtures/reducers/select/07/metadata.json +5 -0
- package/test-fixtures/reducers/select/08/metadata.json +4 -0
- package/test-fixtures/reducers/select/09/metadata.json +4 -0
- package/test-fixtures/reducers/select/10/metadata.json +5 -0
- package/test-fixtures/reducers/select/11/metadata.json +4 -0
- package/test-fixtures/reducers/select/12/metadata.json +5 -0
- package/test-fixtures/reducers/select/13/metadata.json +4 -0
- package/test-fixtures/reducers/select/14/base.json +24 -0
- package/test-fixtures/reducers/select/14/merged.json +24 -0
- package/test-fixtures/reducers/select/14/metadata.json +4 -0
- package/test-fixtures/reducers/select/14/source.json +24 -0
- package/.drone.yml +0 -92
- package/.nyc_output/7ecda3cd-9f84-4416-a466-fa1e5889c6a3.json +0 -1
- package/.nyc_output/processinfo/7ecda3cd-9f84-4416-a466-fa1e5889c6a3.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/LICENSE.txt +0 -165
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -79
- package/coverage/copy.js.html +0 -344
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -126
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -79
- package/coverage/lcov-report/copy.js.html +0 -344
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -126
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/select.js.html +0 -431
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -170
- package/coverage/lcov.info +0 -195
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/select.js.html +0 -431
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -170
- package/test-fixtures/reducers/copy/01/pattern.txt +0 -1
- package/test-fixtures/reducers/copy/02/pattern.txt +0 -1
- package/test-fixtures/reducers/copy/03/pattern.txt +0 -1
- package/test-fixtures/reducers/copy/04/pattern.txt +0 -1
- package/test-fixtures/reducers/copy/05/pattern.txt +0 -1
- package/test-fixtures/reducers/select/01/expected-error.txt +0 -1
- package/test-fixtures/reducers/select/01/pattern.txt +0 -1
- package/test-fixtures/reducers/select/02/pattern.txt +0 -1
- package/test-fixtures/reducers/select/03/pattern.txt +0 -1
- package/test-fixtures/reducers/select/04/pattern.txt +0 -1
- package/test-fixtures/reducers/select/05/pattern.txt +0 -1
- package/test-fixtures/reducers/select/06/pattern.txt +0 -1
- package/test-fixtures/reducers/select/07/equalityFunction.txt +0 -1
- package/test-fixtures/reducers/select/07/pattern.txt +0 -1
- package/test-fixtures/reducers/select/08/pattern.txt +0 -1
- package/test-fixtures/reducers/select/09/pattern.txt +0 -1
- package/test-fixtures/reducers/select/10/equalityFunction.txt +0 -1
- package/test-fixtures/reducers/select/10/pattern.txt +0 -1
- package/test-fixtures/reducers/select/11/pattern.txt +0 -1
- package/test-fixtures/reducers/select/12/equalityFunction.txt +0 -1
- package/test-fixtures/reducers/select/12/pattern.txt +0 -1
- package/test-fixtures/reducers/select/13/pattern.txt +0 -1
package/coverage/select.js.html
DELETED
|
@@ -1,431 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for select.js</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="index.html">All files</a> select.js</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">98% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>49/50</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">96.43% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>27/28</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">100% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>19/19</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">97.96% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>48/49</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
</div>
|
|
58
|
-
<div class='status-line high'></div>
|
|
59
|
-
<pre><table class="coverage">
|
|
60
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
61
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
62
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
63
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
64
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
65
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
66
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
67
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
68
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
69
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
70
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
71
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
72
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
73
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
74
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
75
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
76
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
77
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
78
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
79
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
80
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
81
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
82
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
83
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
84
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
85
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
86
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
87
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
88
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
89
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
90
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
91
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
92
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
93
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
94
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
95
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
96
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
97
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
98
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
99
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
100
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
101
|
-
<a name='L42'></a><a href='#L42'>42</a>
|
|
102
|
-
<a name='L43'></a><a href='#L43'>43</a>
|
|
103
|
-
<a name='L44'></a><a href='#L44'>44</a>
|
|
104
|
-
<a name='L45'></a><a href='#L45'>45</a>
|
|
105
|
-
<a name='L46'></a><a href='#L46'>46</a>
|
|
106
|
-
<a name='L47'></a><a href='#L47'>47</a>
|
|
107
|
-
<a name='L48'></a><a href='#L48'>48</a>
|
|
108
|
-
<a name='L49'></a><a href='#L49'>49</a>
|
|
109
|
-
<a name='L50'></a><a href='#L50'>50</a>
|
|
110
|
-
<a name='L51'></a><a href='#L51'>51</a>
|
|
111
|
-
<a name='L52'></a><a href='#L52'>52</a>
|
|
112
|
-
<a name='L53'></a><a href='#L53'>53</a>
|
|
113
|
-
<a name='L54'></a><a href='#L54'>54</a>
|
|
114
|
-
<a name='L55'></a><a href='#L55'>55</a>
|
|
115
|
-
<a name='L56'></a><a href='#L56'>56</a>
|
|
116
|
-
<a name='L57'></a><a href='#L57'>57</a>
|
|
117
|
-
<a name='L58'></a><a href='#L58'>58</a>
|
|
118
|
-
<a name='L59'></a><a href='#L59'>59</a>
|
|
119
|
-
<a name='L60'></a><a href='#L60'>60</a>
|
|
120
|
-
<a name='L61'></a><a href='#L61'>61</a>
|
|
121
|
-
<a name='L62'></a><a href='#L62'>62</a>
|
|
122
|
-
<a name='L63'></a><a href='#L63'>63</a>
|
|
123
|
-
<a name='L64'></a><a href='#L64'>64</a>
|
|
124
|
-
<a name='L65'></a><a href='#L65'>65</a>
|
|
125
|
-
<a name='L66'></a><a href='#L66'>66</a>
|
|
126
|
-
<a name='L67'></a><a href='#L67'>67</a>
|
|
127
|
-
<a name='L68'></a><a href='#L68'>68</a>
|
|
128
|
-
<a name='L69'></a><a href='#L69'>69</a>
|
|
129
|
-
<a name='L70'></a><a href='#L70'>70</a>
|
|
130
|
-
<a name='L71'></a><a href='#L71'>71</a>
|
|
131
|
-
<a name='L72'></a><a href='#L72'>72</a>
|
|
132
|
-
<a name='L73'></a><a href='#L73'>73</a>
|
|
133
|
-
<a name='L74'></a><a href='#L74'>74</a>
|
|
134
|
-
<a name='L75'></a><a href='#L75'>75</a>
|
|
135
|
-
<a name='L76'></a><a href='#L76'>76</a>
|
|
136
|
-
<a name='L77'></a><a href='#L77'>77</a>
|
|
137
|
-
<a name='L78'></a><a href='#L78'>78</a>
|
|
138
|
-
<a name='L79'></a><a href='#L79'>79</a>
|
|
139
|
-
<a name='L80'></a><a href='#L80'>80</a>
|
|
140
|
-
<a name='L81'></a><a href='#L81'>81</a>
|
|
141
|
-
<a name='L82'></a><a href='#L82'>82</a>
|
|
142
|
-
<a name='L83'></a><a href='#L83'>83</a>
|
|
143
|
-
<a name='L84'></a><a href='#L84'>84</a>
|
|
144
|
-
<a name='L85'></a><a href='#L85'>85</a>
|
|
145
|
-
<a name='L86'></a><a href='#L86'>86</a>
|
|
146
|
-
<a name='L87'></a><a href='#L87'>87</a>
|
|
147
|
-
<a name='L88'></a><a href='#L88'>88</a>
|
|
148
|
-
<a name='L89'></a><a href='#L89'>89</a>
|
|
149
|
-
<a name='L90'></a><a href='#L90'>90</a>
|
|
150
|
-
<a name='L91'></a><a href='#L91'>91</a>
|
|
151
|
-
<a name='L92'></a><a href='#L92'>92</a>
|
|
152
|
-
<a name='L93'></a><a href='#L93'>93</a>
|
|
153
|
-
<a name='L94'></a><a href='#L94'>94</a>
|
|
154
|
-
<a name='L95'></a><a href='#L95'>95</a>
|
|
155
|
-
<a name='L96'></a><a href='#L96'>96</a>
|
|
156
|
-
<a name='L97'></a><a href='#L97'>97</a>
|
|
157
|
-
<a name='L98'></a><a href='#L98'>98</a>
|
|
158
|
-
<a name='L99'></a><a href='#L99'>99</a>
|
|
159
|
-
<a name='L100'></a><a href='#L100'>100</a>
|
|
160
|
-
<a name='L101'></a><a href='#L101'>101</a>
|
|
161
|
-
<a name='L102'></a><a href='#L102'>102</a>
|
|
162
|
-
<a name='L103'></a><a href='#L103'>103</a>
|
|
163
|
-
<a name='L104'></a><a href='#L104'>104</a>
|
|
164
|
-
<a name='L105'></a><a href='#L105'>105</a>
|
|
165
|
-
<a name='L106'></a><a href='#L106'>106</a>
|
|
166
|
-
<a name='L107'></a><a href='#L107'>107</a>
|
|
167
|
-
<a name='L108'></a><a href='#L108'>108</a>
|
|
168
|
-
<a name='L109'></a><a href='#L109'>109</a>
|
|
169
|
-
<a name='L110'></a><a href='#L110'>110</a>
|
|
170
|
-
<a name='L111'></a><a href='#L111'>111</a>
|
|
171
|
-
<a name='L112'></a><a href='#L112'>112</a>
|
|
172
|
-
<a name='L113'></a><a href='#L113'>113</a>
|
|
173
|
-
<a name='L114'></a><a href='#L114'>114</a>
|
|
174
|
-
<a name='L115'></a><a href='#L115'>115</a>
|
|
175
|
-
<a name='L116'></a><a href='#L116'>116</a>
|
|
176
|
-
<a name='L117'></a><a href='#L117'>117</a>
|
|
177
|
-
<a name='L118'></a><a href='#L118'>118</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
178
|
-
<span class="cline-any cline-neutral"> </span>
|
|
179
|
-
<span class="cline-any cline-neutral"> </span>
|
|
180
|
-
<span class="cline-any cline-neutral"> </span>
|
|
181
|
-
<span class="cline-any cline-neutral"> </span>
|
|
182
|
-
<span class="cline-any cline-neutral"> </span>
|
|
183
|
-
<span class="cline-any cline-neutral"> </span>
|
|
184
|
-
<span class="cline-any cline-neutral"> </span>
|
|
185
|
-
<span class="cline-any cline-neutral"> </span>
|
|
186
|
-
<span class="cline-any cline-neutral"> </span>
|
|
187
|
-
<span class="cline-any cline-neutral"> </span>
|
|
188
|
-
<span class="cline-any cline-neutral"> </span>
|
|
189
|
-
<span class="cline-any cline-neutral"> </span>
|
|
190
|
-
<span class="cline-any cline-neutral"> </span>
|
|
191
|
-
<span class="cline-any cline-neutral"> </span>
|
|
192
|
-
<span class="cline-any cline-neutral"> </span>
|
|
193
|
-
<span class="cline-any cline-neutral"> </span>
|
|
194
|
-
<span class="cline-any cline-neutral"> </span>
|
|
195
|
-
<span class="cline-any cline-neutral"> </span>
|
|
196
|
-
<span class="cline-any cline-neutral"> </span>
|
|
197
|
-
<span class="cline-any cline-neutral"> </span>
|
|
198
|
-
<span class="cline-any cline-neutral"> </span>
|
|
199
|
-
<span class="cline-any cline-neutral"> </span>
|
|
200
|
-
<span class="cline-any cline-neutral"> </span>
|
|
201
|
-
<span class="cline-any cline-neutral"> </span>
|
|
202
|
-
<span class="cline-any cline-neutral"> </span>
|
|
203
|
-
<span class="cline-any cline-neutral"> </span>
|
|
204
|
-
<span class="cline-any cline-neutral"> </span>
|
|
205
|
-
<span class="cline-any cline-neutral"> </span>
|
|
206
|
-
<span class="cline-any cline-neutral"> </span>
|
|
207
|
-
<span class="cline-any cline-yes">54x</span>
|
|
208
|
-
<span class="cline-any cline-neutral"> </span>
|
|
209
|
-
<span class="cline-any cline-neutral"> </span>
|
|
210
|
-
<span class="cline-any cline-neutral"> </span>
|
|
211
|
-
<span class="cline-any cline-neutral"> </span>
|
|
212
|
-
<span class="cline-any cline-yes">22x</span>
|
|
213
|
-
<span class="cline-any cline-neutral"> </span>
|
|
214
|
-
<span class="cline-any cline-neutral"> </span>
|
|
215
|
-
<span class="cline-any cline-neutral"> </span>
|
|
216
|
-
<span class="cline-any cline-yes">12x</span>
|
|
217
|
-
<span class="cline-any cline-yes">12x</span>
|
|
218
|
-
<span class="cline-any cline-yes">12x</span>
|
|
219
|
-
<span class="cline-any cline-neutral"> </span>
|
|
220
|
-
<span class="cline-any cline-yes">12x</span>
|
|
221
|
-
<span class="cline-any cline-yes">12x</span>
|
|
222
|
-
<span class="cline-any cline-neutral"> </span>
|
|
223
|
-
<span class="cline-any cline-yes">12x</span>
|
|
224
|
-
<span class="cline-any cline-yes">1x</span>
|
|
225
|
-
<span class="cline-any cline-neutral"> </span>
|
|
226
|
-
<span class="cline-any cline-yes">11x</span>
|
|
227
|
-
<span class="cline-any cline-yes">11x</span>
|
|
228
|
-
<span class="cline-any cline-neutral"> </span>
|
|
229
|
-
<span class="cline-any cline-yes">11x</span>
|
|
230
|
-
<span class="cline-any cline-yes">1x</span>
|
|
231
|
-
<span class="cline-any cline-neutral"> </span>
|
|
232
|
-
<span class="cline-any cline-yes">10x</span>
|
|
233
|
-
<span class="cline-any cline-yes">10x</span>
|
|
234
|
-
<span class="cline-any cline-neutral"> </span>
|
|
235
|
-
<span class="cline-any cline-yes">10x</span>
|
|
236
|
-
<span class="cline-any cline-yes">20x</span>
|
|
237
|
-
<span class="cline-any cline-neutral"> </span>
|
|
238
|
-
<span class="cline-any cline-yes">10x</span>
|
|
239
|
-
<span class="cline-any cline-yes">22x</span>
|
|
240
|
-
<span class="cline-any cline-neutral"> </span>
|
|
241
|
-
<span class="cline-any cline-yes">10x</span>
|
|
242
|
-
<span class="cline-any cline-yes">20x</span>
|
|
243
|
-
<span class="cline-any cline-yes">36x</span>
|
|
244
|
-
<span class="cline-any cline-neutral"> </span>
|
|
245
|
-
<span class="cline-any cline-yes">10x</span>
|
|
246
|
-
<span class="cline-any cline-yes">22x</span>
|
|
247
|
-
<span class="cline-any cline-yes">40x</span>
|
|
248
|
-
<span class="cline-any cline-neutral"> </span>
|
|
249
|
-
<span class="cline-any cline-yes">10x</span>
|
|
250
|
-
<span class="cline-any cline-yes">2x</span>
|
|
251
|
-
<span class="cline-any cline-neutral"> </span>
|
|
252
|
-
<span class="cline-any cline-neutral"> </span>
|
|
253
|
-
<span class="cline-any cline-yes">8x</span>
|
|
254
|
-
<span class="cline-any cline-yes">4x</span>
|
|
255
|
-
<span class="cline-any cline-yes">7x</span>
|
|
256
|
-
<span class="cline-any cline-yes">3x</span>
|
|
257
|
-
<span class="cline-any cline-yes">4x</span>
|
|
258
|
-
<span class="cline-any cline-yes">7x</span>
|
|
259
|
-
<span class="cline-any cline-yes">3x</span>
|
|
260
|
-
<span class="cline-any cline-neutral"> </span>
|
|
261
|
-
<span class="cline-any cline-yes">4x</span>
|
|
262
|
-
<span class="cline-any cline-yes">1x</span>
|
|
263
|
-
<span class="cline-any cline-neutral"> </span>
|
|
264
|
-
<span class="cline-any cline-neutral"> </span>
|
|
265
|
-
<span class="cline-any cline-neutral"> </span>
|
|
266
|
-
<span class="cline-any cline-yes">7x</span>
|
|
267
|
-
<span class="cline-any cline-yes">2x</span>
|
|
268
|
-
<span class="cline-any cline-neutral"> </span>
|
|
269
|
-
<span class="cline-any cline-neutral"> </span>
|
|
270
|
-
<span class="cline-any cline-yes">5x</span>
|
|
271
|
-
<span class="cline-any cline-neutral"> </span>
|
|
272
|
-
<span class="cline-any cline-neutral"> </span>
|
|
273
|
-
<span class="cline-any cline-yes">6x</span>
|
|
274
|
-
<span class="cline-any cline-yes">3x</span>
|
|
275
|
-
<span class="cline-any cline-yes">3x</span>
|
|
276
|
-
<span class="cline-any cline-neutral"> </span>
|
|
277
|
-
<span class="cline-any cline-neutral"> </span>
|
|
278
|
-
<span class="cline-any cline-neutral"> </span>
|
|
279
|
-
<span class="cline-any cline-yes">24x</span>
|
|
280
|
-
<span class="cline-any cline-yes">27x</span>
|
|
281
|
-
<span class="cline-any cline-no"> </span>
|
|
282
|
-
<span class="cline-any cline-neutral"> </span>
|
|
283
|
-
<span class="cline-any cline-yes">27x</span>
|
|
284
|
-
<span class="cline-any cline-neutral"> </span>
|
|
285
|
-
<span class="cline-any cline-yes">24x</span>
|
|
286
|
-
<span class="cline-any cline-neutral"> </span>
|
|
287
|
-
<span class="cline-any cline-neutral"> </span>
|
|
288
|
-
<span class="cline-any cline-neutral"> </span>
|
|
289
|
-
<span class="cline-any cline-neutral"> </span>
|
|
290
|
-
<span class="cline-any cline-yes">42x</span>
|
|
291
|
-
<span class="cline-any cline-yes">42x</span>
|
|
292
|
-
<span class="cline-any cline-neutral"> </span>
|
|
293
|
-
<span class="cline-any cline-neutral"> </span>
|
|
294
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/**
|
|
295
|
-
*
|
|
296
|
-
* @licstart The following is the entire license notice for the JavaScript code in this file.
|
|
297
|
-
*
|
|
298
|
-
* Merge MARC records
|
|
299
|
-
*
|
|
300
|
-
* Copyright (C) 2015-2019 University Of Helsinki (The National Library Of Finland)
|
|
301
|
-
*
|
|
302
|
-
* This file is part of marc-record-merge-js
|
|
303
|
-
|
|
304
|
-
* marc-record-merge-js program is free software: you can redistribute it and/or modify
|
|
305
|
-
* it under the terms of the GNU Lesser General Public License as
|
|
306
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
307
|
-
* License, or (at your option) any later version.
|
|
308
|
-
*
|
|
309
|
-
* marc-record-merge-js is distributed in the hope that it will be useful,
|
|
310
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
311
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
312
|
-
* GNU Lesser General Public License for more details.
|
|
313
|
-
*
|
|
314
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
315
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
316
|
-
*
|
|
317
|
-
* @licend The above is the entire license notice
|
|
318
|
-
* for the JavaScript code in this file.
|
|
319
|
-
*
|
|
320
|
-
*/
|
|
321
|
-
import {normalizeSync} from 'normalize-diacritics';
|
|
322
|
-
|
|
323
|
-
export function strictEquality(subfieldA, subfieldB) {
|
|
324
|
-
return subfieldA.code === subfieldB.code &&
|
|
325
|
-
subfieldA.value === subfieldB.value;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export function subsetEquality(subfieldA, subfieldB) {
|
|
329
|
-
return subfieldA.code === subfieldB.code &&
|
|
330
|
-
(subfieldA.value.indexOf(subfieldB.value) !== -1 || subfieldB.value.indexOf(subfieldA.value) !== -1);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export default ({pattern, equalityFunction = strictEquality}) => (base, source) => {
|
|
334
|
-
const baseFields = base.get(pattern);
|
|
335
|
-
const sourceFields = source.get(pattern);
|
|
336
|
-
|
|
337
|
-
checkFieldType(baseFields);
|
|
338
|
-
checkFieldType(sourceFields);
|
|
339
|
-
|
|
340
|
-
if (baseFields.length > 1 || sourceFields.length > 1) {
|
|
341
|
-
return base;
|
|
342
|
-
}
|
|
343
|
-
const [baseField] = baseFields;
|
|
344
|
-
const [sourceField] = sourceFields;
|
|
345
|
-
|
|
346
|
-
if (baseField.tag === sourceField.tag === false) {
|
|
347
|
-
return base;
|
|
348
|
-
}
|
|
349
|
-
const baseSubs = baseField.subfields;
|
|
350
|
-
const sourceSubs = sourceField.subfields;
|
|
351
|
-
|
|
352
|
-
const baseSubsNormalized = baseSubs
|
|
353
|
-
.map(({code, value}) => ({code, value: normalizeSubfieldValue(value)}));
|
|
354
|
-
|
|
355
|
-
const sourceSubsNormalized = sourceSubs
|
|
356
|
-
.map(({code, value}) => ({code, value: normalizeSubfieldValue(value)}));
|
|
357
|
-
|
|
358
|
-
const equalSubfieldsBase = baseSubsNormalized
|
|
359
|
-
.filter(baseSubfield => sourceSubsNormalized
|
|
360
|
-
.some(sourceSubfield => equalityFunction(baseSubfield, sourceSubfield)));
|
|
361
|
-
|
|
362
|
-
const equalSubfieldsSource = sourceSubsNormalized
|
|
363
|
-
.filter(sourceSubfield => baseSubsNormalized
|
|
364
|
-
.some(baseSubfield => equalityFunction(sourceSubfield, baseSubfield)));
|
|
365
|
-
|
|
366
|
-
if (baseSubs.length === sourceSubs.length && equalSubfieldsBase.length < baseSubs.length) {
|
|
367
|
-
return base;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
if (baseSubs.length === sourceSubs.length && equalSubfieldsBase.length === equalSubfieldsSource.length) {
|
|
371
|
-
const totalSubfieldLengthBase = baseSubsNormalized
|
|
372
|
-
.map(({value}) => value.length)
|
|
373
|
-
.reduce((acc, value) => acc + value);
|
|
374
|
-
const totalSubfieldLengthSource = sourceSubsNormalized
|
|
375
|
-
.map(({value}) => value.length)
|
|
376
|
-
.reduce((acc, value) => acc + value);
|
|
377
|
-
|
|
378
|
-
if (totalSubfieldLengthSource > totalSubfieldLengthBase) {
|
|
379
|
-
return replaceBasefieldWithSourcefield(base);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
if (sourceSubs.length > baseSubs.length && equalSubfieldsBase.length === baseSubs.length) {
|
|
384
|
-
return replaceBasefieldWithSourcefield(base);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
return base;
|
|
388
|
-
|
|
389
|
-
function replaceBasefieldWithSourcefield(base) {
|
|
390
|
-
const index = base.fields.findIndex(field => field === baseField);
|
|
391
|
-
base.fields.splice(index, 1, sourceField); // eslint-disable-line functional/immutable-data
|
|
392
|
-
return base;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
function checkFieldType(fields) {
|
|
396
|
-
const checkedFields = fields.map(field => {
|
|
397
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if ('value' in field) { // eslint-disable-line functional/no-conditional-statement
|
|
398
|
-
<span class="cstat-no" title="statement not covered" > throw new Error('Invalid control field, expected data field');</span>
|
|
399
|
-
}
|
|
400
|
-
return field;
|
|
401
|
-
});
|
|
402
|
-
return checkedFields;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function normalizeSubfieldValue(value) {
|
|
406
|
-
// Regexp options: g: global search, u: unicode
|
|
407
|
-
const punctuation = /[.,\-/#!$%^&*;:{}=_`~()[\]]/gu;
|
|
408
|
-
return normalizeSync(value).toLowerCase().replace(punctuation, '', 'u').replace(/\s+/gu, ' ').trim();
|
|
409
|
-
}
|
|
410
|
-
};
|
|
411
|
-
</pre></td></tr></table></pre>
|
|
412
|
-
|
|
413
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
414
|
-
</div><!-- /wrapper -->
|
|
415
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
416
|
-
Code coverage generated by
|
|
417
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
418
|
-
at Thu Oct 08 2020 07:39:55 GMT+0000 (Coordinated Universal Time)
|
|
419
|
-
</div>
|
|
420
|
-
</div>
|
|
421
|
-
<script src="prettify.js"></script>
|
|
422
|
-
<script>
|
|
423
|
-
window.onload = function () {
|
|
424
|
-
prettyPrint();
|
|
425
|
-
};
|
|
426
|
-
</script>
|
|
427
|
-
<script src="sorter.js"></script>
|
|
428
|
-
<script src="block-navigation.js"></script>
|
|
429
|
-
</body>
|
|
430
|
-
</html>
|
|
431
|
-
|
|
Binary file
|
package/coverage/sorter.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
var addSorting = (function() {
|
|
3
|
-
'use strict';
|
|
4
|
-
var cols,
|
|
5
|
-
currentSort = {
|
|
6
|
-
index: 0,
|
|
7
|
-
desc: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
// returns the summary table element
|
|
11
|
-
function getTable() {
|
|
12
|
-
return document.querySelector('.coverage-summary');
|
|
13
|
-
}
|
|
14
|
-
// returns the thead element of the summary table
|
|
15
|
-
function getTableHeader() {
|
|
16
|
-
return getTable().querySelector('thead tr');
|
|
17
|
-
}
|
|
18
|
-
// returns the tbody element of the summary table
|
|
19
|
-
function getTableBody() {
|
|
20
|
-
return getTable().querySelector('tbody');
|
|
21
|
-
}
|
|
22
|
-
// returns the th element for nth column
|
|
23
|
-
function getNthColumn(n) {
|
|
24
|
-
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// loads all columns
|
|
28
|
-
function loadColumns() {
|
|
29
|
-
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
30
|
-
colNode,
|
|
31
|
-
cols = [],
|
|
32
|
-
col,
|
|
33
|
-
i;
|
|
34
|
-
|
|
35
|
-
for (i = 0; i < colNodes.length; i += 1) {
|
|
36
|
-
colNode = colNodes[i];
|
|
37
|
-
col = {
|
|
38
|
-
key: colNode.getAttribute('data-col'),
|
|
39
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
|
40
|
-
type: colNode.getAttribute('data-type') || 'string'
|
|
41
|
-
};
|
|
42
|
-
cols.push(col);
|
|
43
|
-
if (col.sortable) {
|
|
44
|
-
col.defaultDescSort = col.type === 'number';
|
|
45
|
-
colNode.innerHTML =
|
|
46
|
-
colNode.innerHTML + '<span class="sorter"></span>';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return cols;
|
|
50
|
-
}
|
|
51
|
-
// attaches a data attribute to every tr element with an object
|
|
52
|
-
// of data values keyed by column name
|
|
53
|
-
function loadRowData(tableRow) {
|
|
54
|
-
var tableCols = tableRow.querySelectorAll('td'),
|
|
55
|
-
colNode,
|
|
56
|
-
col,
|
|
57
|
-
data = {},
|
|
58
|
-
i,
|
|
59
|
-
val;
|
|
60
|
-
for (i = 0; i < tableCols.length; i += 1) {
|
|
61
|
-
colNode = tableCols[i];
|
|
62
|
-
col = cols[i];
|
|
63
|
-
val = colNode.getAttribute('data-value');
|
|
64
|
-
if (col.type === 'number') {
|
|
65
|
-
val = Number(val);
|
|
66
|
-
}
|
|
67
|
-
data[col.key] = val;
|
|
68
|
-
}
|
|
69
|
-
return data;
|
|
70
|
-
}
|
|
71
|
-
// loads all row data
|
|
72
|
-
function loadData() {
|
|
73
|
-
var rows = getTableBody().querySelectorAll('tr'),
|
|
74
|
-
i;
|
|
75
|
-
|
|
76
|
-
for (i = 0; i < rows.length; i += 1) {
|
|
77
|
-
rows[i].data = loadRowData(rows[i]);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// sorts the table using the data for the ith column
|
|
81
|
-
function sortByIndex(index, desc) {
|
|
82
|
-
var key = cols[index].key,
|
|
83
|
-
sorter = function(a, b) {
|
|
84
|
-
a = a.data[key];
|
|
85
|
-
b = b.data[key];
|
|
86
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
87
|
-
},
|
|
88
|
-
finalSorter = sorter,
|
|
89
|
-
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
90
|
-
rowNodes = tableBody.querySelectorAll('tr'),
|
|
91
|
-
rows = [],
|
|
92
|
-
i;
|
|
93
|
-
|
|
94
|
-
if (desc) {
|
|
95
|
-
finalSorter = function(a, b) {
|
|
96
|
-
return -1 * sorter(a, b);
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
for (i = 0; i < rowNodes.length; i += 1) {
|
|
101
|
-
rows.push(rowNodes[i]);
|
|
102
|
-
tableBody.removeChild(rowNodes[i]);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
rows.sort(finalSorter);
|
|
106
|
-
|
|
107
|
-
for (i = 0; i < rows.length; i += 1) {
|
|
108
|
-
tableBody.appendChild(rows[i]);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// removes sort indicators for current column being sorted
|
|
112
|
-
function removeSortIndicators() {
|
|
113
|
-
var col = getNthColumn(currentSort.index),
|
|
114
|
-
cls = col.className;
|
|
115
|
-
|
|
116
|
-
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
117
|
-
col.className = cls;
|
|
118
|
-
}
|
|
119
|
-
// adds sort indicators for current column being sorted
|
|
120
|
-
function addSortIndicators() {
|
|
121
|
-
getNthColumn(currentSort.index).className += currentSort.desc
|
|
122
|
-
? ' sorted-desc'
|
|
123
|
-
: ' sorted';
|
|
124
|
-
}
|
|
125
|
-
// adds event listeners for all sorter widgets
|
|
126
|
-
function enableUI() {
|
|
127
|
-
var i,
|
|
128
|
-
el,
|
|
129
|
-
ithSorter = function ithSorter(i) {
|
|
130
|
-
var col = cols[i];
|
|
131
|
-
|
|
132
|
-
return function() {
|
|
133
|
-
var desc = col.defaultDescSort;
|
|
134
|
-
|
|
135
|
-
if (currentSort.index === i) {
|
|
136
|
-
desc = !currentSort.desc;
|
|
137
|
-
}
|
|
138
|
-
sortByIndex(i, desc);
|
|
139
|
-
removeSortIndicators();
|
|
140
|
-
currentSort.index = i;
|
|
141
|
-
currentSort.desc = desc;
|
|
142
|
-
addSortIndicators();
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
for (i = 0; i < cols.length; i += 1) {
|
|
146
|
-
if (cols[i].sortable) {
|
|
147
|
-
// add the click event handler on the th so users
|
|
148
|
-
// dont have to click on those tiny arrows
|
|
149
|
-
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
150
|
-
if (el.addEventListener) {
|
|
151
|
-
el.addEventListener('click', ithSorter(i));
|
|
152
|
-
} else {
|
|
153
|
-
el.attachEvent('onclick', ithSorter(i));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
// adds sorting functionality to the UI
|
|
159
|
-
return function() {
|
|
160
|
-
if (!getTable()) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
cols = loadColumns();
|
|
164
|
-
loadData();
|
|
165
|
-
addSortIndicators();
|
|
166
|
-
enableUI();
|
|
167
|
-
};
|
|
168
|
-
})();
|
|
169
|
-
|
|
170
|
-
window.addEventListener('load', addSorting);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^010$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^001$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^001$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^010$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^010$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Invalid control field, expected data field
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^010$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^010$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^010$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^(010|020)$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^(010)$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^(010)$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
subsetEquality
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^(010)$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^(010)$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
^(010)$
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
subsetEquality
|