Skip to content

Commit 2fb03c9

Browse files
committed
Add ES6 import instructions
1 parent 7ab8f9f commit 2fb03c9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@ The library is available on the global CDN [jsDelivr:](https://www.jsdelivr.com/
1212
To install the library locally or to use it with Node.js:
1313
```sh
1414
npm install addsearch-js-client --save
15+
```
16+
17+
After installation, add the library to your JS code
18+
19+
```js
20+
var AddSearchClient = require('addsearch-js-client');
21+
```
1522

16-
# After installation, add the library to your JS code
17-
# var AddSearchClient = require('addsearch-js-client');
23+
Or use import in ES6
24+
```js
25+
import AddSearchClient from 'addsearch-js-client';
1826
```
1927

2028
#### Execute the first search query
@@ -28,7 +36,7 @@ var cb = function(res) {
2836
console.log(res);
2937
}
3038

31-
// Execute search. Callback function cb will be called with search results
39+
// Execute search. Callback function will be called with search results
3240
client.search('keyword', cb);
3341
```
3442

0 commit comments

Comments
 (0)