Skip to content

Commit bd758d3

Browse files
committed
docs: reformat README.md (#65)
1 parent a063610 commit bd758d3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ yarn add orb-billing
1818

1919
The full API of this library can be found in [api.md](https://www.github.com/orbcorp/orb-node/blob/main/api.md).
2020

21+
<!-- prettier-ignore -->
2122
```js
2223
import Orb from 'orb-billing';
2324

@@ -38,6 +39,7 @@ main();
3839

3940
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
4041

42+
<!-- prettier-ignore -->
4143
```ts
4244
import Orb from 'orb-billing';
4345

@@ -61,6 +63,7 @@ When the library is unable to connect to the API,
6163
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
6264
a subclass of `APIError` will be thrown:
6365

66+
<!-- prettier-ignore -->
6467
```ts
6568
async function main() {
6669
const customer = await orb.customers
@@ -173,6 +176,7 @@ The "raw" `Response` returned by `fetch()` can be accessed through the `.asRespo
173176

174177
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
175178

179+
<!-- prettier-ignore -->
176180
```ts
177181
const orb = new Orb();
178182

@@ -197,12 +201,11 @@ If you would prefer to use a global, web-standards-compliant `fetch` function ev
197201
(for example, if you are running Node with `--experimental-fetch` or using NextJS which polyfills with `undici`),
198202
add the following import before your first import `from "Orb"`:
199203

200-
<!-- prettier-ignore -->
201204
```ts
202205
// Tell TypeScript and the package to use the global web fetch instead of node-fetch.
203206
// Note, despite the name, this does not add any polyfills, but expects them to be provided if needed.
204-
import "orb-billing/shims/web";
205-
import Orb from "orb-billing";
207+
import 'orb-billing/shims/web';
208+
import Orb from 'orb-billing';
206209
```
207210

208211
To do the inverse, add `import "orb-billing/shims/node"` (which does import polyfills).

0 commit comments

Comments
 (0)