README.md in unicode-emoji-0.9.1 vs README.md in unicode-emoji-0.9.2

- old
+ new

@@ -14,20 +14,10 @@ gem "unicode-emoji" ``` ## Usage -### Properties - -Allows you to access the codepoint data form Unicode's [emoji-data.txt](http://unicode.org/Public/emoji/5.0/emoji-data.txt) file: - -```ruby -require "unicode/emoji" - -Unicode::Emoji.properties "โ˜" # => ["Emoji", "Emoji_Modifier_Base"] -``` - ### Regex Five Emoji regexes are included, which are compiled out of various Emoji Unicode data. ```ruby @@ -54,12 +44,14 @@ `Unicode::Emoji::REGEX_VALID` | Matches (non-textual) singleton Emoji (except for singleton components, like a skin tone modifier without base Emoji) and all kind of valid Emoji sequences | `๐Ÿ˜ด`, `โ–ถ๏ธ`, `๐Ÿ›Œ๐Ÿฝ`, `๐Ÿ‡ต๐Ÿ‡น`, `2๏ธโƒฃ`, `๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ`, `๐Ÿด๓ ง๓ ข๓ ก๓ ง๓ ข๓ ฟ`, `๐Ÿคพ๐Ÿฝโ€โ™€๏ธ`, `๐Ÿค โ€๐Ÿคข` | `๐Ÿ˜ด๏ธŽ`, `โ–ถ`, `๐Ÿป`, `๐Ÿ‡ต๐Ÿ‡ต` `Unicode::Emoji::REGEX_BASIC` | Matches (non-textual) singleton Emoji (except for singleton components, like a skin tone modifier without base Emoji), but no sequences | `๐Ÿ˜ด`, `โ–ถ๏ธ` | `๐Ÿ˜ด๏ธŽ`, `โ–ถ`, `๐Ÿป`, `๐Ÿ›Œ๐Ÿฝ`, `๐Ÿ‡ต๐Ÿ‡น`, `๐Ÿ‡ต๐Ÿ‡ต`,`2๏ธโƒฃ`, `๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ`, `๐Ÿด๓ ง๓ ข๓ ก๓ ง๓ ข๓ ฟ`, `๐Ÿคพ๐Ÿฝโ€โ™€๏ธ`, `๐Ÿค โ€๐Ÿคข` `Unicode::Emoji::REGEX_TEXT` | Matches only textual singleton Emoji (except for singleton components, like digit 1) | `๐Ÿ˜ด๏ธŽ`, `โ–ถ` | `๐Ÿ˜ด`, `โ–ถ๏ธ`, `๐Ÿป`, `๐Ÿ›Œ๐Ÿฝ`, `๐Ÿ‡ต๐Ÿ‡น`, `๐Ÿ‡ต๐Ÿ‡ต`,`2๏ธโƒฃ`, `๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ`, `๐Ÿด๓ ง๓ ข๓ ก๓ ง๓ ข๓ ฟ`, `๐Ÿคพ๐Ÿฝโ€โ™€๏ธ`, `๐Ÿค โ€๐Ÿคข` `Unicode::Emoji::REGEX_ANY` | Matches any Emoji-related codepoint (but no variation selectors or tags) | `๐Ÿ˜ด`, `โ–ถ`, `๐Ÿป`, `๐Ÿ›Œ`, `๐Ÿฝ`, `๐Ÿ‡ต`, `๐Ÿ‡น`, `2`, `๐Ÿด`, `๐Ÿคพ`, `โ™€`, `๐Ÿค `, `๐Ÿคข` | - -## List +More info about valid vs. recommended emoji in this [blog article on Emojipedia](http://blog.emojipedia.org/unicode-behind-the-curtain/). +### List + Use `Unicode::Emoji::LIST` or the list method to get a grouped (and ordered) list of Emoji: ```ruby Unicode::Emoji.list.keys # => ["Smileys & People", "Animals & Nature", "Food & Drink", "Travel & Places", "Activities", "Objects", "Symbols", "Flags"] @@ -70,9 +62,19 @@ Unicode::Emoji.list("Food & Drink", "food-asian") => ["๐Ÿฑ", "๐Ÿ˜", "๐Ÿ™", "๐Ÿš", "๐Ÿ›", "๐Ÿœ", "๐Ÿ", "๐Ÿ ", "๐Ÿข", "๐Ÿฃ", "๐Ÿค", "๐Ÿฅ", "๐Ÿก", "\u{1F95F}", "\u{1F960}", "\u{1F961}"] ``` A markdown file with all recommended emoji can be found [in this gist](https://gist.github.com/janlelis/72f9be1f0ecca07372c64cf13894b801). + +### Properties + +Allows you to access the codepoint data form Unicode's [emoji-data.txt](http://unicode.org/Public/emoji/5.0/emoji-data.txt) file: + +```ruby +require "unicode/emoji" + +Unicode::Emoji.properties "โ˜" # => ["Emoji", "Emoji_Modifier_Base"] +``` ## Also See - [Unicodeยฎ Technical Standard #51](http://www.unicode.org/reports/tr51/proposed.html) - [Emoji data](http://unicode.org/Public/emoji/5.0/)