Skip to content

Commit bd2d0b1

Browse files
committed
Added in standard, removed editor files, linted
1 parent 2e78aa2 commit bd2d0b1

File tree

16 files changed

+603
-1618
lines changed

16 files changed

+603
-1618
lines changed

.editorconfig

Lines changed: 0 additions & 15 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

cli-index.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env node
2-
'use strict';
2+
'use strict'
33

44
var doiRegex = require('./')
5-
var argv = require('minimist')(process.argv.slice(2), {
5+
var argv = require('minimist')(process.argv.slice(2), {
66
alias: {
77
e: 'exact',
88
d: 'declared',
@@ -11,36 +11,36 @@ var argv = require('minimist')(process.argv.slice(2), {
1111
h: 'help'
1212
},
1313
boolean: ['e', 'd', 'm', 'g', 'h']
14-
});
14+
})
1515

1616
if (argv.h) {
17-
console.error(
18-
"Usage: " + process.argv[1] + " <doi>\n" +
19-
"Options: \n" +
20-
"-e, --exact Find an exact match \n" +
21-
"-d, --declared Find a DOI with a 'doi:' prefix\n" +
22-
"-m, --match Find all matches within the given string\n" +
23-
"-g, --groups Find matches with groupings for extra suffixes")
24-
process.exit(-1)
17+
console.error(
18+
'Usage: ' + process.argv[1] + ' <doi>\n' +
19+
'Options: \n' +
20+
'-e, --exact Find an exact match \n' +
21+
'-d, --declared Find a DOI with a `doi:` prefix\n' +
22+
'-m, --match Find all matches within the given string\n' +
23+
'-g, --groups Find matches with groupings for extra suffixes')
24+
process.exit(-1)
2525
}
2626

2727
var doi = (argv.doi || argv._[0])
2828

2929
if (argv.m) {
30-
console.log(doi.match(doiRegex()))
31-
process.exit(-1)
30+
console.log(doi.match(doiRegex()))
31+
process.exit(-1)
3232
} else if (argv.g) {
33-
console.log(doiRegex.groups(doi));
34-
process.exit(-1)
33+
console.log(doiRegex.groups(doi))
34+
process.exit(-1)
3535
}
3636

3737
if (argv.e && argv.d) {
38-
console.log('Is this a declared DOI',
39-
doiRegex.declared({exact: true}).test(doi))
38+
console.log('Is this a declared DOI',
39+
doiRegex.declared({exact: true}).test(doi))
4040
} else if (argv.e && !argv.d) {
41-
console.log('Is this a DOI?', doiRegex({exact: true}).test(doi))
41+
console.log('Is this a DOI?', doiRegex({exact: true}).test(doi))
4242
} else if (!argv.e && argv.d) {
43-
console.log('Is the DOI declared?', doiRegex.declared().test(doi))
43+
console.log('Is the DOI declared?', doiRegex.declared().test(doi))
4444
} else {
45-
console.log('Does a DOI exist?', doiRegex().test(doi))
45+
console.log('Does a DOI exist?', doiRegex().test(doi))
4646
}

coverage/coverage.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coverage/lcov-report/base.css

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
body, html {
2+
margin:0; padding: 0;
3+
}
4+
body {
5+
font-family: Helvetica Neue, Helvetica,Arial;
6+
font-size: 10pt;
7+
}
8+
div.header, div.footer {
9+
background: #eee;
10+
padding: 1em;
11+
}
12+
div.header {
13+
z-index: 100;
14+
position: fixed;
15+
top: 0;
16+
border-bottom: 1px solid #666;
17+
width: 100%;
18+
}
19+
div.footer {
20+
border-top: 1px solid #666;
21+
}
22+
div.body {
23+
margin-top: 10em;
24+
}
25+
div.meta {
26+
font-size: 90%;
27+
text-align: center;
28+
}
29+
h1, h2, h3 {
30+
font-weight: normal;
31+
}
32+
h1 {
33+
font-size: 12pt;
34+
}
35+
h2 {
36+
font-size: 10pt;
37+
}
38+
pre {
39+
font-family: Consolas, Menlo, Monaco, monospace;
40+
margin: 0;
41+
padding: 0;
42+
line-height: 14px;
43+
font-size: 14px;
44+
-moz-tab-size: 2;
45+
-o-tab-size: 2;
46+
tab-size: 2;
47+
}
48+
49+
div.path { font-size: 110%; }
50+
div.path a:link, div.path a:visited { color: #000; }
51+
table.coverage { border-collapse: collapse; margin:0; padding: 0 }
52+
53+
table.coverage td {
54+
margin: 0;
55+
padding: 0;
56+
color: #111;
57+
vertical-align: top;
58+
}
59+
table.coverage td.line-count {
60+
width: 50px;
61+
text-align: right;
62+
padding-right: 5px;
63+
}
64+
table.coverage td.line-coverage {
65+
color: #777 !important;
66+
text-align: right;
67+
border-left: 1px solid #666;
68+
border-right: 1px solid #666;
69+
}
70+
71+
table.coverage td.text {
72+
}
73+
74+
table.coverage td span.cline-any {
75+
display: inline-block;
76+
padding: 0 5px;
77+
width: 40px;
78+
}
79+
table.coverage td span.cline-neutral {
80+
background: #eee;
81+
}
82+
table.coverage td span.cline-yes {
83+
background: #b5d592;
84+
color: #999;
85+
}
86+
table.coverage td span.cline-no {
87+
background: #fc8c84;
88+
}
89+
90+
.cstat-yes { color: #111; }
91+
.cstat-no { background: #fc8c84; color: #111; }
92+
.fstat-no { background: #ffc520; color: #111 !important; }
93+
.cbranch-no { background: yellow !important; color: #111; }
94+
95+
.cstat-skip { background: #ddd; color: #111; }
96+
.fstat-skip { background: #ddd; color: #111 !important; }
97+
.cbranch-skip { background: #ddd !important; color: #111; }
98+
99+
.missing-if-branch {
100+
display: inline-block;
101+
margin-right: 10px;
102+
position: relative;
103+
padding: 0 4px;
104+
background: black;
105+
color: yellow;
106+
}
107+
108+
.skip-if-branch {
109+
display: none;
110+
margin-right: 10px;
111+
position: relative;
112+
padding: 0 4px;
113+
background: #ccc;
114+
color: white;
115+
}
116+
117+
.missing-if-branch .typ, .skip-if-branch .typ {
118+
color: inherit !important;
119+
}
120+
121+
.entity, .metric { font-weight: bold; }
122+
.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
123+
.metric small { font-size: 80%; font-weight: normal; color: #666; }
124+
125+
div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
126+
div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
127+
div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
128+
div.coverage-summary th.file { border-right: none !important; }
129+
div.coverage-summary th.pic { border-left: none !important; text-align: right; }
130+
div.coverage-summary th.pct { border-right: none !important; }
131+
div.coverage-summary th.abs { border-left: none !important; text-align: right; }
132+
div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
133+
div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
134+
div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
135+
div.coverage-summary td.pic { min-width: 120px !important; }
136+
div.coverage-summary a:link { text-decoration: none; color: #000; }
137+
div.coverage-summary a:visited { text-decoration: none; color: #333; }
138+
div.coverage-summary a:hover { text-decoration: underline; }
139+
div.coverage-summary tfoot td { border-top: 1px solid #666; }
140+
141+
div.coverage-summary .sorter {
142+
height: 10px;
143+
width: 7px;
144+
display: inline-block;
145+
margin-left: 0.5em;
146+
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147+
}
148+
div.coverage-summary .sorted .sorter {
149+
background-position: 0 -20px;
150+
}
151+
div.coverage-summary .sorted-desc .sorter {
152+
background-position: 0 -10px;
153+
}
154+
155+
.high { background: #b5d592 !important; }
156+
.medium { background: #ffe87c !important; }
157+
.low { background: #fc8c84 !important; }
158+
159+
span.cover-fill, span.cover-empty {
160+
display:inline-block;
161+
border:1px solid #444;
162+
background: white;
163+
height: 12px;
164+
}
165+
span.cover-fill {
166+
background: #ccc;
167+
border-right: 1px solid #444;
168+
}
169+
span.cover-empty {
170+
background: white;
171+
border-left: none;
172+
}
173+
span.cover-full {
174+
border-right: none !important;
175+
}
176+
pre.prettyprint {
177+
border: none !important;
178+
padding: 0 !important;
179+
margin: 0 !important;
180+
}
181+
.com { color: #999 !important; }
182+
.ignore-none { color: #999; font-weight: normal; }

0 commit comments

Comments
 (0)