Like
Install empty as a package?
Copied
npm i @bit/bit.utils.validation.empty
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
empty (
name:
) : *
boolean
determines whether obj
reference is empty (empty array, empty object and/or falsy values)
Example
Argument
name:
*
Returns
boolean
Test Summary
#empty() should return true as an empty array was passed | Pass |
#empty() should return true as an empty object was passed | Pass |
#empty() should return true as an empty string was passed | Pass |
#empty() should return false as string | Pass |
#empty() should return false as [1] was passed | Pass |
#empty() should return false as { a: 1 } was passed | Pass |