Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Jan 26, 2024
1 parent 390b70d commit ef8dc8b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ $ npm install deep-values
<!-- old angularjs days -->
<!-- simple -->
<div ng-repeat="product in products | filter:{ colour: 'red' }">
<!-- advanced -->
<div ng-repeat="product in products | filter:'x'">
<!-- advanced: let say product.departments[].name or product.location can both
contains the word pharmacy/Pharmacy -->
<div ng-repeat="product in products | filter:'pharmacy'">


<!-- modern day alpinejs -->
<!-- simple with built-in Array.filter function -->
<div x-for="product in products.filter(item => item.colour === 'red')">

<!-- advanced -->
<div x-for="product in deepFilter(item, v => `${v}`.toLowerCase().indexOf('x'.toLowerCase()) > -1)">

<!-- advanced: let say product.departments[].name or product.location can both
contains the word pharmacy/Pharmacy -->
<div x-for="product in deepFilter(item, v => `${v}`.toLowerCase().indexOf('Pharmacy'.toLowerCase()) > -1)">

```

Expand Down

0 comments on commit ef8dc8b

Please sign in to comment.