mirror of
https://github.com/antonmedv/fx.git
synced 2024-10-26 20:24:05 +03:00
Add len() func
This commit is contained in:
parent
289165d553
commit
e2c42139ae
@ -128,6 +128,10 @@ async function transform(json, code) {
|
|||||||
return `x => Object.values(${obj}).flatMap(${fold(s)})`
|
return `x => Object.values(${obj}).flatMap(${fold(s)})`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function len(array) {
|
||||||
|
return array.length
|
||||||
|
}
|
||||||
|
|
||||||
function uniq(array) {
|
function uniq(array) {
|
||||||
return [...new Set(array)]
|
return [...new Set(array)]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user