this post was submitted on 20 Feb 2025
2 points (100.0% liked)
General Discussion
0 readers
1 users here now
A place to talk about whatever you want
This is a forum category containing topical discussion. You can start new discussions by mentioning this category.
founded 2 months ago
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
@nextgraph@fosstodon.org in my case, I just casted it as bool:
!!object.foo
. You could alsoobject.hasOwnProperty('foo')
, although that would be true ifobject.foo = null
too :joy: