Skip to content

Commit

Permalink
📝 Add examles
Browse files Browse the repository at this point in the history
  • Loading branch information
UltiRequiem committed Jul 19, 2022
1 parent 7ea8542 commit c0c848b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions examle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { latestXkcd, xkcd } from "./mod.ts";

const myFavoriteXKCD = await xkcd(304);

console.log(myFavoriteXKCD.title); //=> Nighttime Stories

console.log(await latestXkcd());
10 changes: 8 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ The API is the same on all this platforms ✔️
### [Deno 🦕](https://deno.land/x/xkcd)

```javascript
import { xkcd } from "https://deno.land/x/xkcd/mod.ts";
import { latestXkcd, xkcd } from "https://deno.land/x/xkcd/mod.ts";

const myFavoriteXKCD = await xkcd(304);

myFavoriteXKCD.title; //=> Nighttime Stories

await latestXkcd(); // Metadata...
```

### [Node.js 🐢🚀](https://npmjs.com/package/@ultirequiem/xkcd)

```javascript
import { xkcd } from "@ultirequiem/xkcd";
import { latestXkcd, xkcd } from "https://npmjs@ultirequiem/xkcd";
```

### [Browser 🌐](https://developer.mozilla.org/en-US/docs/Glossary/Browser)
Expand Down

1 comment on commit c0c848b

@UltiRequiem
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my "p" letter is not working most of the time, I will get a new keyboard when I have time

Please sign in to comment.