nushell/docs/commands/empty.md

33 lines
427 B
Markdown
Raw Normal View History

---
title: empty?
layout: command
version: 0.59.1
---
2020-10-06 12:21:20 +02:00
Check for empty values.
2020-10-06 12:21:20 +02:00
## Signature
2020-10-06 12:21:20 +02:00
```> empty? ...rest```
2020-10-06 12:21:20 +02:00
## Parameters
2020-10-06 12:21:20 +02:00
- `...rest`: the names of the columns to check emptiness
## Examples
2020-10-06 12:21:20 +02:00
Check if a string is empty
2020-10-06 12:21:20 +02:00
```shell
> '' | empty?
2020-10-06 12:21:20 +02:00
```
Check if a list is empty
2020-10-06 12:21:20 +02:00
```shell
> [] | empty?
2020-10-06 12:21:20 +02:00
```
Check if more than one column are empty
2020-10-06 12:21:20 +02:00
```shell
> [[meal size]; [arepa small] [taco '']] | empty? meal size
2020-10-06 12:21:20 +02:00
```