UNPKG
wikibase-cli
Version:
latest (20.1.2)
20.1.2
20.1.1
20.1.0
20.0.0
19.4.2
19.4.1
19.4.0
19.3.0
19.2.1
19.2.0
19.1.0
19.0.1
18.3.3
18.3.2
18.3.1
18.3.0
18.2.2
18.2.1
18.2.0
18.1.0
18.0.4
18.0.3
18.0.2
18.0.1
18.0.0
17.0.10
17.0.9
17.0.8
17.0.7
17.0.6
17.0.5
17.0.4
17.0.3
17.0.2
17.0.1
17.0.0
16.3.3
16.3.2
16.3.1
16.3.0
16.2.1
16.2.0
16.1.2
16.1.1
16.1.0
16.0.2
16.0.1
16.0.0
15.17.0
15.16.9
15.16.8
15.16.7
15.16.6
15.16.5
15.16.4
15.16.3
15.16.2
15.16.1
15.16.0
15.15.6
15.15.5
15.15.4
15.15.3
15.15.2
15.15.1
15.15.0
15.14.0
15.13.0
15.12.2
15.12.1
15.12.0
15.11.0
15.10.5
15.10.4
15.10.3
15.10.2
15.10.1
15.10.0
15.9.3
15.9.2
15.9.1
15.9.0
15.8.5
15.8.4
15.8.3
15.8.2
15.8.1
15.8.0
15.7.0
15.6.0
15.5.1
15.5.0
15.4.0
15.3.4
15.3.3
15.3.2
15.3.1
15.3.0
15.2.3
15.2.2
15.2.1
15.2.0
15.1.2
15.1.1
15.1.0
15.0.0
14.1.1
14.1.0
14.0.0
13.2.0
13.1.2
13.1.1
13.1.0
13.0.1
13.0.0
12.2.0
12.1.0
12.0.3
12.0.2
12.0.1
12.0.0
11.3.1
11.3.0
11.2.0
11.1.0
11.0.0
10.0.0
9.2.1
9.2.0
9.1.1
9.1.0
9.0.2
9.0.1
9.0.0
8.2.0
8.1.3
8.1.2
8.1.1
8.1.0
8.0.6
8.0.5
8.0.4
8.0.3
8.0.2
8.0.1
0.0.0
A command-line interface to Wikibase
github.com/maxlath/wikibase-cli
maxlath/wikibase-cli
wikibase-cli
/
lib
/
parse_entity_type.js
14 lines
(12 loc)
•
222 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
shortTypes = {
f
:
'form'
,
i
:
'item'
,
p
:
'property'
,
l
:
'lexeme'
,
s
:
'sense'
, }
export
default
(
type
=
'item'
) => {
// Fix plural forms
type
=
type
.
replace
(
/s$/
,
''
)
return
shortTypes[
type
] ||
type
}