Generate Emoji data in multiple formats
npm install -g @dofy/emojidb
# or
yarn global add @dofy/emojidb
# run
emojidb -t json -f yahaha
# help
emojidb --help- Copy any
dfXXX.tsunder thesrc/lib/formatorsfolder - Modify the content in the
outputmethod, process the content ofdatato return the required format - Register this
Formatorinsrc/lib/Formator.ts- Import the file
import dfXXX from './formators/dfXXX.js'— the.jsextension is required, this is ESM ("type": "module") withmoduleResolution: nodenext - Add the new format to the
typesarray
- Import the file
- The help content and format support will be completed automatically
- Run
yarn buildto compilesrc/intobin/
Tips:
Refer to the
datastructure./templates/template.jsonfile
- Data source: https://www.unicode.org/Public/emoji
- Defaults to
emoji/latest/emoji-test.txt, currently Emoji 18.0. Pin a specific release with-s https://www.unicode.org/Public/emoji/16.0/emoji-test.txt, or pass a local file path to the same option. - Requires Node.js 18 or newer (uses the built-in
fetch).