Skip to content

Commit

Permalink
chore(): update README
Browse files Browse the repository at this point in the history
  • Loading branch information
AlenVelocity committed Nov 20, 2021
1 parent ee52e3f commit a0b2879
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,22 @@ This is actually [Exif](https://en.wikipedia.org/wiki/Exif) Metadata embedded in

This is an array of Emojis. [Learn More](https://github.com/WhatsApp/stickers/wiki/Tag-your-stickers-with-Emojis)


### Extracting Metadata
To extract the metadata from the WebP file, you can use the `extractMetadata()` function.

```TS
import { extractMetadata, Sticker } from 'wa-sticker-formatter'
import { readFileSync } from 'fs'

const sticker = readFileSync('sticker.webp')
let metadata = await extractMetadata(sticker) // { emojis: [], 'sticker-pack-id': '', 'sticker-pack-name': '', 'sticker-author-name': '' }

// or use the static method from the Sticker class
metadata = await Sticker.extractMetadata(sticker)

```

---
Thanks for using Wa-Sticker-Formatter!

Expand Down

0 comments on commit a0b2879

Please sign in to comment.