-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
44 lines (41 loc) · 946 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const isArray = require("isarray")
const map = require("array-map")
const immo = require("@_immo/return")
const isuseless = require("is-useless").isuseless
const vValue = require("vvalue")
const _ = require("lodash")
const underscore = require("underscore")
const literally = require("literally")
const constant = require("const")
const lodashdotconstant = require("lodash.constant")
const lodashdotidentity = require("lodash.identity")
const vretriever = {
retrieve(value) {
let result
if (isArray(value)) {
result = map(value, v => vretriever.retrieve(v))
} else {
result = value
}
return immo(
isuseless(
vValue(
_.identity(
underscore.identity(
lodashdotidentity(
literally(
constant(
lodashdotconstant(
_.constant(underscore.constant(result)())()
)()
)()
)()
)
)
)
)
)
)
}
}
module.exports = vretriever