Skip to content

Commit

Permalink
Document "includes" helper (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertdeblock committed Feb 16, 2021
1 parent 140d16b commit 4f73081
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
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

0 comments on commit 4f73081

Please sign in to comment.