Skip to content

Commit

Permalink
d adds await to example in README (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Oct 9, 2022
1 parent 03ffb2b commit 9e47996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You'll need an access token from [Tibber](https://developer.tibber.com/)
import getPriceInfo from '@alheimsins/tibber-get-price-info'
const token = 'your-access-token'

console.log(getPriceInfo(token)) //=> [{"total": 2.563, "energy": 2.0424, "tax": 0.5206,"startsAt": "2022-05-07T00:00:00.000+02:00"}]
console.log(await getPriceInfo(token)) //=> [{"total": 2.563, "energy": 2.0424, "tax": 0.5206,"startsAt": "2022-05-07T00:00:00.000+02:00"}]
```

If you have multiple homes, you can use the `homeId` option to specify which home to use. If you don't specify a homeId, the first home will be used.
Expand Down

0 comments on commit 9e47996

Please # to comment.