> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/programmy/javascript/numbers-are-empty.md).

# Numbers Are Empty

The [`lodash`](https://lodash.com/) project comes with a ton of handy JavaScript utilities including the [`_.isEmpty()`](https://lodash.com/docs#isEmpty) function. This is great for checking if Arrays, Objects, and Strings are *empty*. The following is how this function is defined in the docs:

> Checks if value is an empty collection or object. A value is considered empty if it's an arguments object, array, string, or jQuery-like collection with a length of 0 or has no own enumerable properties.

Having not examined this definition too closely and because I primarily write Rails code from day to day, I conflated `_.isEmpty()` with the `#blank?` method provided by Rails' `ActiveSupport`. This holds true for the most part, but quickly defies expectations when it comes to numbers.

```javascript
> _.isEmpty(1)
// true
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ploegert.gitbook.io/til/programmy/javascript/numbers-are-empty.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
