Sign in
chromium
/
devtools
/
devtools-frontend.git
/
HEAD
/
.
/
node_modules
/
rambda
/
src
/
_internals
/
isTruthy.js
blob: f87d0fdda019628614f15e731e6850e8d0dbdb80 [
file
] [
log
] [
blame
]
import
{
type
}
from
'../type.js'
import
{
isArray
}
from
'./isArray.js'
export
function
isTruthy
(
x
){
if
(
isArray
(
x
)){
return
x
.
length
>
0
}
if
(
type
(
x
)
===
'Object'
){
return
Object
.
keys
(
x
).
length
>
0
}
return
Boolean
(
x
)
}