Has Value
Checks if a value is truthy, meaning it is not falsy.
| Category | Validations |
| Author | Polgubau |
| Since | 1.0.0 |
| Last Updated | 2025-03-17 |
| Type | Sync |
| Compatibility | Universal |
Example
Input
hasValue('Hello')Output:
true
Input
hasValue(null)Output:
false
Return
Returns `true` if the value is truthy, otherwise `false`.
Type: boolean
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| value | any | null | No | The value to check. |
Notes
Truthy values are those that are not falsy, like `1`, `'Hello'`, or `{}`.
Tags
- validation
- truthy
- boolean