Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Lightweight JS library #616

Open
redeye86 opened this issue Sep 4, 2018 · 1 comment
Open

Lightweight JS library #616

redeye86 opened this issue Sep 4, 2018 · 1 comment

Comments

@redeye86
Copy link

redeye86 commented Sep 4, 2018

Hi,

for my needs i needed a simple converter that replaces unicode-emojis with emojione svgs. As the original library would have doubled the amount of data my page visitors need to download, i decided to create an own library that uses a space efficient data structure for only that special purpose. The lib has ~38kb / ~5kb gzipped file containing both, the algorithms and data.

It's definitely not well-tested and may require some polyfills for Non-ECMAScript-6-Browsers, but if someone is interested, look at my gists:

library only:
https://gist.github.com/redeye86/562b8c7c9d4aee7ff4f458b5742f1ded

generator for the actual js file (to generate file for a folder containing code-point emoji files):
https://gist.github.com/redeye86/f9d8102de69606a2984b715cf7537655

@sherlock1982
Copy link

sherlock1982 commented Oct 25, 2018

This is really great. Current official implementation is huge and slow.

While shortnameToImage looks optimized toshort is not. Therefore if I simply need to convert unicode text to the image I'm stuck with converting to short names and than to image. I'm not sure anybody really needs shortnames nowadays.

I really want to see simple toImage function without shortname support.
Maybe official library could be published modular I can target unicode->image and include only needed information.

Improvements were suggested in #627 and #489

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants