Skip to content

Commit

Permalink
Updates readme
Browse files Browse the repository at this point in the history
relates #14
  • Loading branch information
dangerdak committed Jul 20, 2017
1 parent f402485 commit 8b8f021
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Why
### User Persona
Ash __loves__ Pokemon. And we mean LOVES. He can't for the life of him remember let alone spell half of their names. Poor Ash.
Currently he has to look in his Pokédex which is totally unreliable. He wishes he could just search for any Pokemon name and find the crucial stats he needs to become a true Pokemon master.
Currently he has to look in his Pokédex which is totally unreliable. He feels like he's living in the '90s, still using his Pokedex. He wishes he could just search using his smartphone for any Pokemon name and find the crucial stats he needs to become a true Pokemon master.

### User Journey
Ash would simply go to (insert URL) and type the starting letter of the Pokemon he wants information on. Hey Presto! The auto complete will populate the drop down with the top 10 matching Pokemon to the letters he can remember.
Expand All @@ -13,10 +13,10 @@ We're creating a Pokemon auto complete search bar to help Ash.

## How
The main tasks we had to do were:
- [ ] Architecting the software design
- [ ] Create back-end to filter through the searches
- [ ] Have an input field in the front-end
- [ ] Auto-complete the input field
- [x] Architecting the software design
- [x] Create back-end to filter through the searches
- [x] Have an input field in the front-end
- [x] Auto-complete the input field
- [ ] Testing front-end __and__ back-end

We did this by blah blah blah .....
Expand All @@ -30,7 +30,19 @@ We did this by blah blah blah .....
## How did you pair?

## What did you learn?
* The 'call' method on functions allows you to use array methods on NodeLists
and HTML Collections e.g.
```
Array.prototype.forEach.call(yourNodeList, function(element) {
// Do your stuff with each element of your nodelist
});
```
* When putting a regex in a string literal you need one more round of escaping:
e.g. `/\w/` becomes `'\\w'` or in our case we used `'\\b' + searchTerm
+ '\\w*'`

## Resources
[Function call
[Call
method](http://clubmate.fi/the-intuitive-and-powerful-foreach-loop-in-javascript/#Looping_HTMLCollection_or_a_nodeList_with_forEach)
[Double escaping string
regexes](https://stackoverflow.com/questions/2712878/javascript-regex-pattern-concatenate-with-variable/2712896#2712896)

0 comments on commit 8b8f021

Please sign in to comment.