Skip to content

Commit

Permalink
docs: Update readme
Browse files Browse the repository at this point in the history
* Added scripts for newly available build versions
  • Loading branch information
vHeemstra authored Jan 11, 2023
1 parent 5d65a29 commit 6bca022
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ isApng(buffer)

### Browser &nbsp;<img src="./src/chrome.svg" alt="Chrome" title="Chrome" style="margin-bottom:-0.15em"> <img src="./src/edge.svg" alt="Edge" title="Edge" style="margin-bottom:-0.15em"> <img src="./src/firefox.svg" alt="Firefox" title="Firefox" style="margin-bottom:-0.15em"> <img src="./src/safari.svg" alt="Safari" title="Safari" style="margin-bottom:-0.15em"> <img src="./src/opera.svg" alt="Opera" title="Opera" style="margin-bottom:-0.15em">

#### As package through NPM

```js
import isApng from 'is-apng'

Expand All @@ -34,6 +36,55 @@ isApng(new Uint8Array(buffer))
// => true
```

#### As old-school global script tag

Url for latest version: `https://unpkg.com/is-apng`<br>
Url for specific version: `https://unpkg.com/[email protected]/dist/index.js`

```html
<script src="https://unpkg.com/is-apng" type="text/javascript"></script>

<script type="text/javascript">
console.log(typeof isApng);
// isApng(...)
</script>
```

#### As module

Url for latest version: `https://unpkg.com/is-apng/dist/index.esm.js`<br>
Url for specific version: `https://unpkg.com/[email protected]/dist/index.esm.js`

```html
<script type="module">
import isApng from 'https://unpkg.com/is-apng/dist/index.esm.js'
console.log(typeof isApng);
// isApng(...)
</script>
```

or

```html
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>

<script type="importmap">
{
"imports": {
"is-apng": "https://unpkg.com/is-apng/dist/index.esm.js"
}
}
</script>

<script type="module">
import isApng from 'is-apng'
console.log(typeof isApng);
// isApng(...)
</script>
```

## API

### isApng(buffer)
Expand Down

0 comments on commit 6bca022

Please sign in to comment.