Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nulab/emoji-data-ts
Utilities for emoji data in TypeScript
https://github.com/nulab/emoji-data-ts
Last synced: 3 months ago
JSON representation
Utilities for emoji data in TypeScript
- Host: GitHub
- URL: https://github.com/nulab/emoji-data-ts
- Owner: nulab
- License: mit
- Created: 2019-02-01T01:46:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T10:01:16.000Z (almost 2 years ago)
- Last Synced: 2024-07-14T12:36:19.371Z (4 months ago)
- Language: TypeScript
- Homepage: https://nulab.github.io/emoji-data-ts/
- Size: 14.8 MB
- Stars: 22
- Watchers: 6
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - nulab/emoji-data-ts - Utilities for emoji data in TypeScript (others)
README
# Emoji data helper written in TypeScript
This project is helper functions for [emoji-data](https://github.com/iamcal/emoji-data)
# Usage
```
npm install -save emoji-data-ts
``````ts
const emoji = new EmojiData()
emoji.getImageData("smile")
=> {imageUrl: "1f34a.png", sheetSizeX: 5200, sheetSizeY: 5200, x: 13.72549019607843, y: 23.52941176470588}
```Example is [here](https://nulab.github.io/emoji-data-ts/)
# 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"
}
```2. Run `npm run emoji-build` which generates a new emoji.json used in emoji-data-ts
3. Change currentVersion in emoji-data-ts.ts corresponding to the emoji-datasource's version
```ts
const currentVersion = '7.0.2'
```4. Adjust sheetColumns and sheetRows to fit the emoji-datasource's image
```
export const sheetColumns = 60
export const sheetRows = 60
```