@empathyco/x-components
Version:
Empathy X Components
27 lines (15 loc) • 870 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [filterTruthyPayload](./x-components.filtertruthypayload.md)
## filterTruthyPayload() function
Creates a [Wire](./x-components.wire.md) that is only executed when the payload is a [falsy value](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)<!-- -->.
**Signature:**
```typescript
export declare function filterTruthyPayload<Payload>(wire: Wire<Payload>): Wire<Payload>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| wire | [Wire](./x-components.wire.md)<!-- --><Payload> | The wire to avoid executing when the payload is truthy. |
**Returns:**
[Wire](./x-components.wire.md)<!-- --><Payload>
The Wire function truthy filter.