Skip to content
This repository has been archived by the owner on Jun 23, 2019. It is now read-only.

Commit

Permalink
馃摑 doc: Add new Browser section
Browse files Browse the repository at this point in the history
  • Loading branch information
motss committed Mar 16, 2019
1 parent 5dc3992 commit bc39716
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Expand Up @@ -37,6 +37,9 @@
- [Usage](#usage)
- [TypeScript or ES Modules](#typescript-or-es-modules)
- [Node.js](#nodejs)
- [Browser](#browser)
- [ES Modules](#es-modules)
- [IIFE](#iife)
- [API Reference](#api-reference)
- [UTCDateParams](#utcdateparams)
- [utcDate([UTCDateParams])](#utcdateutcdateparams)
Expand Down Expand Up @@ -116,6 +119,33 @@ void async function main() {
}();
```

### Browser

#### ES Modules

```html
<script type="module">
import { utcDate } from 'https://unpkg.com/@motss/utc-date@latest/dist/utc-date.js';
utcDate()
.then(console.log)
.catch(console.error);
</script>
```

#### IIFE

```html
<script src="https://unpkg.com/@motss/utc-date@latest/dist/utc-date.iife.js"></script>
<script>
const { utcDate } = window.UTCDate;
utcDate()
.then(console.log)
.catch(console.error);
</script>
```

## API Reference

### UTCDateParams
Expand Down

0 comments on commit bc39716

Please sign in to comment.