diff --git a/README.md b/README.md index e523adc65..de80db2c5 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,15 @@ emojiIndex.search('christmas').map((o) => o.native) // => [🎄, 🎅🏼, 🔔, 🎁, ⛄️, ❄️] ``` +### With custom data +```js +import data from 'emoji-mart/datasets/messenger' +import { NimbleEmojiIndex } from 'emoji-mart' + +let emojiIndex = new NimbleEmojiIndex(data) +emojiIndex.search('christmas') +``` + ## Get emoji data from Native You can get emoji data from native emoji unicode using the `getEmojiDataFromNative` util function. @@ -333,15 +342,6 @@ emojiData: { } ``` -### With custom data -```js -import data from 'emoji-mart/datasets/messenger' -import { NimbleEmojiIndex } from 'emoji-mart' - -let emojiIndex = new NimbleEmojiIndex(data) -emojiIndex.search('christmas') -``` - ## Storage By default EmojiMart will store user chosen skin and frequently used emojis in `localStorage`. That can however be overwritten should you want to store these in your own storage.