Skip to content

nulab/emoji-data-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
SatoshiKawabata
Dec 23, 2022
db9d125 · Dec 23, 2022

History

52 Commits
Nov 12, 2021
Dec 23, 2022
Dec 23, 2022
Dec 23, 2022
Dec 18, 2019
Jan 30, 2019
Nov 12, 2021
Nov 11, 2021
Nov 12, 2021
Dec 23, 2022
Dec 23, 2022
Feb 1, 2019
Apr 22, 2019
Jan 30, 2019

Repository files navigation

Emoji data helper written in TypeScript

This project is helper functions for emoji-data

Usage

npm install -save emoji-data-ts
const emoji = new EmojiData()
emoji.getImageData("smile") 
=> {imageUrl: "1f34a.png", sheetSizeX: 5200, sheetSizeY: 5200, x: 13.72549019607843, y: 23.52941176470588}

Example is here

How to upgrade emoji data

  1. Upgrade package.json below part which is defined current emoji-datasource version
"dependencies": {
"emoji-datasource-apple": "7.0.2",
"emoji-datasource-google": "7.0.2"
}
  1. Run npm run emoji-build which generates a new emoji.json used in emoji-data-ts
  2. Change currentVersion in emoji-data-ts.ts corresponding to the emoji-datasource's version
const currentVersion = '7.0.2'
  1. Adjust sheetColumns and sheetRows to fit the emoji-datasource's image
export const sheetColumns = 60
export const sheetRows = 60