Comments (20)
@omnidan, I actually sorted the emoji array. And succeeded. This is the sorted array, like:
const emoji = require('node-emoji')
// array transfer
var result = [];
for (var i in emoji.emoji)
result.push(emoji.emoji[i])
// sort
result = result.sort();
// People category 1156 to 1236 (Namely 80 pieces)
result = result.slice(1156, 1236)
// end
result == ["😀", "😁", "😂", "😃", "😄", "😅", "😆", "😆", "😇", "😈", "😉", "😊", "😋", "😌", "😍", "😎", "😏", "😐", "😑", "😒", "😓", "😔", "😕", "😖", "😗", "😘", "😙", "😚", "😛", "😜", "😝", "😞", "😟", "😠", "😡", "😢", "😣", "😤", "😥", "😦", "😧", "😨", "😩", "😪", "😫", "😬", "😭", "😮", "😯", "😰", "😱", "😲", "😳", "😴", "😵", "😶", "😷", "😸", "😹", "😺", "😻", "😼", "😽", "😾", "😿", "🙀", "🙁", "🙂", "🙃", "🙄", "🙅", "🙆", "🙇", "🙈", "🙉", "🙊", "🙋", "🙌", "🙍", "🙎"]
from node-emoji.
Thanks, that makes the whole process a lot easier. I'll work on category support in the next few days.
from node-emoji.
If everybody agrees I'll implement categories according to recommended sort order, which is the default ordering of emoji characters from Unicode CLDR data.
For more information about the categories visit: http://unicode.org/emoji/charts/emoji-ordering.html
from node-emoji.
I started working on category support. If I'd implement it according to the source above (http://unicode.org/emoji/charts/emoji-ordering.html), the technique for getting emojis showed by @abdurrahmanekr would not work. It looks like the ordering isn't the same as the ordering within the Unicode CLDR data, furthermore it looks like some emojis are missing.
As an alternative I could implement category support like within most emoji keyboards/selectors or we could refactor the codebase, so that it is close to the Unicode CLDR data. What do you all think?
from node-emoji.
Yes that's why I'd need it. Okay, so I'll start working on it.
from node-emoji.
After some more, I stillt haven't found a way of grouping them together automatiaclly. I'll put this into the list of "things I'll do at a suitable time in the future". I'll put all work into a branch - if anyone want's to help
from node-emoji.
I think this file can be useful. As it seems to me that they've already categorized based on unicode. In that case, we can simply update the build script, and leave some credit.
https://github.com/OneSignal/emoji-picker/blob/master/lib/js/config.js#L851
from node-emoji.
Hey guys, I noticed this is an old post. Did this feature get considered on any release? @emanuelbuholzer is this something you are still working on?
from node-emoji.
This would be interesting, especially for applications that let users pick emoji. A PR would be very welcome 😁
from node-emoji.
I just checked out the code and this will be a lot of repetitive boring work. Does anyone have an idea to do this without a simple manual made mapping table?
If not, I'll do the manual work 😭
from node-emoji.
@emanuelbuholzer maybe you can find a list that groups emoji in categories, e.g. on a website - then you could automatically read this into a category: [emoji, ...]
mapping with a little bit of JS magic ✨
from node-emoji.
@emanuelbuholzer Looks good to me 👍
from node-emoji.
@emanuelbuholzer looks good 👍 would be nice if you could implement category support and submit a PR 😁
from node-emoji.
Some icons are not showing, why?
from node-emoji.
Do you have an example @Gotemperor?
from node-emoji.
I am using localhost on my linux machine, so I can not gice you an example, but I see also missing icons when I open the github repository examples, they look like that
, "🙁", "🙂", "🙃", "🙄", "🙅", "🙆", "🙇", "🙈", "🙉", "🙊", "🙋", "🙌", "🙍", "🙎"
from node-emoji.
hmm, strange, they look ok here, but not ok on my localhost, can it be related to my localhost, to linux, or to missing font files? I used npm to install
from node-emoji.
@Gotemperor github defines fallback images for unsupported emoji. it seems like your platform does not support the latest emoji set. I tried running the example code on macOS 10.12.6 and they all show up fine for me (in the console).
from node-emoji.
@GaryTowers I'm pretty sure emojilib
proves data for this to be possible. If we were to add this to node-emoji
it would be using it.
from node-emoji.
@GaryTowers I wrote a script to parse a json file with emojis and their respective categories. I uploaded the script and the json output to wdfinch/emojis-json-formatted.
In the json folder, you'll find a file containing a bunch of emojis organized by category and sub-category. Additionally, you'll find a file that contains a single large json object in a compatible format with this library.
Let me know if this works for you.
from node-emoji.
Related Issues (20)
- Bug: emojis from Emoji Version 14.0 are not unemojified HOT 1
- Provide esm version HOT 2
- Convert to TypeScript
- Bump emojilib to 3.X HOT 1
- Problem with node-fetch and ERR_REQUIRE_ESM HOT 2
- emojify() misses some emojis in V2 HOT 1
- CJS support dropped in v2 HOT 1
- Tooling: add in more granular labels HOT 1
- Tooling: Add in Issue and PR Templates
- Add in JSDoc comments from DefinitelyTyped pull request
- `tsup` should be a dev dependency, rather than a dependency
- Typescript fix not released HOT 1
- Emojis from v1 not exist on v2 HOT 1
- Add a .extend(...) option to expand upon the built-in dictionary HOT 2
- 🛠 Tooling: Two workflows use the wrong org
- 🐛 Bug: CJS build of v2.1.1 imports an ESM-only module HOT 1
- 🛠 Tooling: Add test that CJS require() works (not just ESM import) HOT 4
- 🐛 Bug: Build error inside nuxt2 (Babel + Webpack) HOT 6
- 🚀 Feature: Add .only HOT 4
- 🛠 Tooling: Feature template includes Bug Report checklist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-emoji.