#emoji #back #convert #everything #πŸ«πŸ”¦πŸ”₯πŸŽ²πŸ¬πŸ€πŸŸπŸ”‹πŸ¬πŸŽ²πŸ¬πŸ€πŸŽπŸŸπŸ’§πŸ‘‚πŸ”₯πŸšͺπŸ”‹πŸŸπŸ”¦πŸ”‹πŸš—πŸ‘£πŸ”¦πŸŒπŸ‘‚πŸ€πŸ— #0xde #0xad

bin+lib base_emoji

Convert everything to Emojis (and back)! - πŸ«πŸ”¦πŸ”₯πŸŽ²πŸ¬πŸ€πŸŸπŸ”‹πŸ¬πŸŽ²πŸ¬πŸ€πŸŽπŸŸπŸ’§πŸ‘‚πŸ”₯πŸšͺπŸ”‹πŸŸπŸ”¦πŸ”‹πŸš—πŸ‘£πŸ”¦πŸŒπŸ‘‚πŸ€πŸ—

2 stable releases

Uses old Rust 2015

1.1.0 Oct 4, 2019
1.0.0 Jun 3, 2017

#1753 in Text processing

26 downloads per month

MIT license

16KB
185 lines

base_emoji

Build Status

Convert everything to Emojis (and back)!

πŸ«πŸ”¦πŸ”₯πŸŽ²πŸ¬πŸ€πŸŸπŸ”‹πŸ¬πŸŽ²πŸ¬πŸ€πŸŽπŸŸπŸ’§πŸ‘‚πŸ”₯πŸšͺπŸ”‹πŸŸπŸ”¦πŸ”‹πŸš—πŸ‘£πŸ”¦πŸŒπŸ‘‚πŸ€πŸ—

Reimplementation of base_emoji (JavaScript).

Documentation

Documentation available online.

Example

let input = [0xde, 0xad, 0xbe, 0xef];
let output = "β„οΈπŸΌπŸš“πŸ‘…";

assert_eq!(base_emoji::to_string(&input), output);

Encoding (same as original implementation)

Citing the README:

The emojis used are in emojis.json. There are 843 emojis there, but the converter reads sequences of 8 bits at a time, and so only maps the value to the first 256 of them. To stay consistent with other renderings, make sure you don't change the order of your emojis.json.

Decoding

Decoding requires the use of only the same 256 emojis used above.

License

MIT. See LICENSE.

Dependencies

~0.6–0.9MB
~14K SLoC