Skip to content

Commit 839275a

Browse files
authored
Update README.md (#118)
1 parent 6b8edea commit 839275a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ wget https://raw.githubusercontent.com/itemsapi/itemsapi-example-data/master/ite
9090
Create `search.js`:
9191

9292
```js
93-
var data = require('./data.json');
93+
const data = require('./data.json');
9494

95-
var itemsjs = require('itemsjs')(data, {
95+
const itemsjs = require('itemsjs')(data, {
9696
sortings: {
9797
name_asc: {
9898
field: 'name',
@@ -120,7 +120,7 @@ var itemsjs = require('itemsjs')(data, {
120120
/**
121121
* get filtered list of movies
122122
*/
123-
var movies = itemsjs.search({
123+
const movies = itemsjs.search({
124124
per_page: 1,
125125
sort: 'name_asc',
126126
// full text search
@@ -134,7 +134,7 @@ console.log(JSON.stringify(movies, null, 2));
134134
/**
135135
* get list of top tags
136136
*/
137-
var top_tags = itemsjs.aggregation({
137+
const top_tags = itemsjs.aggregation({
138138
name: 'tags',
139139
per_page: 10
140140
})
@@ -166,7 +166,7 @@ Examples:
166166

167167
## API
168168

169-
### `var itemsjs = ItemsJS(data, [configuration])`
169+
### `const itemsjs = ItemsJS(data, [configuration])`
170170

171171
#### `data`
172172

0 commit comments

Comments
 (0)