Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document "includes" helper #397

Merged
merged 1 commit into from Feb 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -67,6 +67,7 @@ Watch a free video overview presented by EmberMap:
- [`join`](#join)
- [`compact`](#compact)
- [`contains`](#contains)
- [`includes`](#includes)
- [`append`](#append)
- [`chunk`](#chunk)
- [`without`](#without)
Expand Down Expand Up @@ -543,6 +544,8 @@ Removes blank items from an array.
**[猬嗭笍 back to top](#table-of-contents)**

#### `contains`
:warning: `contains` is deprecated. Use [`includes`](#includes) instead.

Checks if a given value or sub-array is contained within an array.

```hbs
Expand All @@ -554,6 +557,18 @@ Checks if a given value or sub-array is contained within an array.

**[猬嗭笍 back to top](#table-of-contents)**

#### `includes`
Checks if a given value or sub-array is included within an array.

```hbs
{{includes selectedItem items}}
{{includes 1234 items}}
{{includes "First" (w "First Second Third") }}
{{includes (w "First Second") (w "First Second Third")}}
```

**[猬嗭笍 back to top](#table-of-contents)**

#### `append`
Appends the given arrays and/or values into a single flat array.

Expand Down