Skip to content

Commit

Permalink
Added more info about using the helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefangabos committed Mar 30, 2022
1 parent 4833cb0 commit b2fe6e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Here's a little helper function for searching for a specific country's data

> The helper function assumes that the JSON with the countries data is associated with a variable named `countries` which is in the same scope as the function
> The helper function is to be used with the *non-combined* data sets.<br>For the *combined* data sets you can write the function yourself.
```js
// returns an object with the sought country's data if the search yields a result
Expand Down Expand Up @@ -216,6 +217,8 @@ Excerpt from the `data/countries/en/countries.php` file:
```
Here's a little helper function for searching for a specific country's data

> The helper function is to be used with the *non-combined* data sets.<br>For the *combined* data sets you can write the function yourself.
```php
// this function assumes that you have done this:
$countries = require 'path/to/countries.php';
Expand Down

0 comments on commit b2fe6e3

Please sign in to comment.