Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed May 18, 2020
1 parent 797dabd commit ca4fff1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Expand Up @@ -22,6 +22,14 @@ npm i --save html-miner
yarn add html-miner
```

## Example

I decided to collect common use cases inside a dedicated [EXAMPLE.md](./EXAMPLE.md). Feel free to start from **Usage** section or jump directly to **Example** page.

If you want to experiment, an [online playground](https://marcomontalbano.github.io/html-miner) is also available.


:green_book: Enjoy your reading

## Usage

Expand Down Expand Up @@ -119,7 +127,7 @@ A `function` accepts only one argument that is an `object` containing:
- `$`: is a jQuery-like function pointing to the document ( html argument ). You can use it to query and fetch elements from the html.

```js
htmlMiner(html, (arg) => { return arg.$('.title').text(); });
htmlMiner(html, arg => arg.$('.title').text());
//=> Hello Marco!
```

Expand Down Expand Up @@ -336,8 +344,7 @@ console.log( json );

```

You can find other examples under the folder `/examples` or you can directly use the [Online Playground](https://marcomontalbano.github.io/html-miner).

You can find other examples under the folder `/examples`
```sh
# you can test examples with nodejs
node examples/demo.js
Expand Down

0 comments on commit ca4fff1

Please sign in to comment.