Skip to content

Releases: mroth/emoji_data.rb

v0.2.0

05 Sep 22:46
Compare
Choose a tag to compare
  • Rename a number of methods to be clearer and more consistent with that they
    actually do:

    • EmojiChar.char()EmojiChar.render()
    • EmojiData.find_by_unified()EmojiData.from_unified()
    • EmojiData.find_by_str()EmojiData.scan()

    Don't worry, the old names are still aliased in so you don't have to change
    anything in your existing code. This change is make things clearer for
    people new to the library.

  • Add new .from_short_name() library method for fast keyword lookups.

  • DEVELOPERS: Internal code cleanup and better comments.

  • DEVELOPERS: Add benchmark suite for comparing method implementation time
    across versions of this library.

v0.1.0

03 May 18:48
Compare
Choose a tag to compare
  • Add support for Unicode variant encodings, used by MacOSX 10.9 / iOS 7.
  • With adding support for variants, the speed of find_by_str regressed by approximately 20% (because there are more codepoints to match against). To counter this, we switched to a Regex based scan than improves performance of the method by over 250x(!). A complete sorted search against 1000 strings now takes ~2ms where before it would take around a half second.
  • Import latest version of iamcal/emoji-data.
  • 100% test coverage. 😎

v0.0.3

01 Apr 14:20
Compare
Choose a tag to compare

On initialization, create hashmaps to cache lookups for .find_by_unified().

In a quick benchmark in MRI 2.1.1, this reduces the time needed for one million lookups from 13.5s to 0.3s!

This is only for lookup by unified ID for now, since the other find_by_*() methods are actually searches that can return multiple values. I'll look at nested hashmaps for those if there is a pressing performance need later.

v0.0.2

01 Apr 14:21
Compare
Choose a tag to compare
  • Remove JSON gem dependency since no longer supporting Ruby 1.8.7 anyhow.
  • Add EmojiData.find_by_str convenience method to match on a string.
  • Make default EmojiChar.to_s() the same as EmojiChar.char()

v0.0.1pre1

01 Apr 14:21
Compare
Choose a tag to compare
Version 0.0.1pre1

v0.0.1

01 Apr 14:21
Compare
Choose a tag to compare
  • Initial release