UNPKG
nhentai-node-api
Version:
latest (1.1.2)
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
nHentai wrapper for NodeJs
github.com/barthofu/nhentai-node-api
barthofu/nhentai-node-api
nhentai-node-api
/
lib
/
utils
/
utils.js
14 lines
(10 loc)
•
305 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module.exports = { getRawTag (tag) {
return
tag.split(
' ('
).slice(
0
, -
1
).join(
' '
) }, findObject (obj, key, value) {
const
found = Object.entries(obj).filter(
object
=>
object
[
1
][key] === value)[
0
]
if
(!found)
return
null
return
found[
1
] } }