omnidan / node-emoji Goto Github PK
View Code? Open in Web Editor NEW๐ simple emoji support for node.js projects
License: MIT License
๐ simple emoji support for node.js projects
License: MIT License
A lot of emojis have more commonly used names that are defined on Emoji Cheat Sheet! For instance, ๐ is both "+1" and "thumbsup."
It would be very useful if the API could provide selector functions which allow the user to get all emojis and these of a given category. What do you think?
I'd work on that if everybody agrees ๐
Hi,
There's a little cute bug. Key param doesn't exist in emoji.js document context.
https://github.com/omnidan/node-emoji/blob/master/lib/emoji.js#L88
Hey, awesome module!
I, and a vast portion of node developers, are used to pick only functions that they need in a module, instead of the whole namespace:
var emojify = require('node-emoji').emojify;
This obviously fails as this
is not defined.
Would you mind exporting a hash of functions instead of an instance class? This is an internal singleton anyway, so having a instance does not have a real purpose here. I can provide a PR if you like.
Thanks!
Bumped in to this just a moment ago when 1.4.2 was released, as the popular Yarn package management tool depends on this, and was not tied to a specific version.
# npm install [email protected]
...
โโโ [email protected] extraneous
# ls -l node_modules/node-emoji/index.js
-rw-r--r-- 1 user user 40 Feb 28 2016 node_modules/node-emoji/index.js
# npm install [email protected]
...
โโโ [email protected] extraneous
# ls -l node_modules/node-emoji/index.js
ls: cannot access 'node_modules/node-emoji/index.js': No such file or directory
Not an expert on how packages work, but I assume this is needed in order to require
a package.
Many icons are missing in the project. To add you need to follow these instructions.
How to understand what is encrypted here?
"0023-fe0f-20e3":[["\u0023\uFE0F\u20E3","\u0023\u20E3"],"\uE210","\uDBBA\uDC2C",["hash"],0,0,15,0],
I know that version 2 is planned, but now I need this library to work.
How do you encrypt these characters? Can you show one example?
garlic ๐ง
moon_cake ๐ฅฎ
salt ๐ง
avocado ๐ฅ
birthday cake ๐
bagel ๐ฉ
beverage_box ๐ง
ice_cube ๐ง
falafel ๐ง
waffle ๐ง
leafy_green ๐ฅฌ
mate_drink ๐ง
cupcake ๐ง
butter ๐ง
onion ๐ง
In terms of bundle size, is it worth to add to an angular/vue app?
I would like to use particular set of emoji in my project.
So I need something like this:
const coffee = require('node-emoji/coffee');
Can someone describe what should I do, step by step to add custom emoji? I have some custom emojis on my server, but it seems like when my bot is sending a message with custom emoji it doesn't work. Every other default emoji works though. I'm really lost at the moment. Sorry for posting it here, but I have really no idea where to post it.
Hello,
I would like to check in an entire sentence if there are emojis in both formats : unicode & markdown.
Thanks !
It could be nice to hace support for text emoji such as:
:D
-> ๐;)
-> ๐I would like to submit a PR, do you have an idea where to start ?
In the json file, the emojis are swapped (or just named backwards). Thanks!
I want to unemojify emojis that have modifiers (gender, color) but for some reason it doesn't even detect these as emojis.
require('node-emoji').hasEmoji('๐คฆโโ') => false
require('node-emoji').find('๐คฆโโ') => undefined
require('node-emoji').hasEmoji('๐คฆโโ') => true
require('node-emoji').find('๐คฆโโ') => ":man_facepalming:"
It would be a handy feature, especially if you're using user input
๐ค is not being recognized by node-emoji. This is added in 2016.
What would be right process to add this in the emoji.json ?
can i create a custom configuration and provide all missing emoji's in the separate json?
If i clone the module and update the .json,i might miss fixes on node-emoji. What would be the right approach?
I need to add custom emojis in node-emoji. i have image in png format and need to use it as emoji in my node project.
i have seen this article but not understood how i can proceed.
#7
@node-emoji
Thanks
Sanjeev Gautam
simple-emoji-picker How can i categorize emojis ? Just like 'People', 'Nature', 'Foods', 'Activity', 'Places', 'Objects', 'Symbols', 'Flags'.
Example:
emoji.find('๐ฏ'); => undefined
emoji.hasEmoji('๐ฏ'); => false
emoji.get('dancers'); => ๐ฏโโ๏ธ
emoji.hasEmoji('dancers'); => true
I believe the root of the problem here is that in lib/emoji.js
emojiByCode
has a size of 1,529, while emojiByName
has a size of 1,623. Therefore, some emojis are able to be found by name but not by emoji code.
I'll work on this.
is there any option to Increase the Emoji Sizes?
If you drop unsupported node
versions and support node>=4
, you can drop the string.prototype.codepointat
dependency. You can also make things a little prettier. For example,
var matchingKeys = emojiKeys.filter(function(key) {
return key.toString().indexOf(matcher) === 0;
});
becomes
const matchingKeys = emojiKeys.filter(key => key.toString().indexOf(matcher) === 0);
Hi,
I want to insert lightning only emoji on my app. But it seems doesn't exist.
I've checked the list.
Suriprisingly, lightning
and lightning_cloud
has same emoji.
"lightning":"๐ฉ๏ธ",
"lightning_cloud":"๐ฉ๏ธ"
Original question here: https://stackoverflow.com/questions/57543615/why-is-node-emoji-rendering-unexpected-characters-in-console
The following code prints the emojis correctly
var emoji = require('node-emoji');
console.log(emoji.get('crossed_fingers'));
console.log(emoji.get('baby_bottle'));
console.log(emoji.get('beer'));
console.log(emoji.get('champagne'));
But one day overnight it just suddenly decided to add the ๏ฟฝ character
๏ฟฝ๐ค
๏ฟฝ๐ผ
๏ฟฝ๐บ
๏ฟฝ๐พ
Does anyone know what is causing this problem? I have tested on Visual Studio Code 1.35.1, 1.36.1, 1.37.1. My latest Windows Update is version 1903. There were no other system changes, and this happened on 2 different laptops.
Thanks
@omnidan Please add support to New emojis in Android & iOS.
โค๏ธ ๐งก ๐ ๐ ๐ ๐ ๐ค ๐ค ๐ค ๐ โฃ๏ธ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ โฎ๏ธ โ๏ธ โช๏ธ ๐ โธ๏ธ โก๏ธ ๐ฏ ๐ โฏ๏ธ โฆ๏ธ ๐ โ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ ๐ โ๏ธ ๐ โข๏ธ โฃ๏ธ ๐ด ๐ณ ๐ถ ๐๏ธ ๐ธ ๐บ ๐ท๏ธ โด๏ธ ๐ ๐ฎ ๐ ใ๏ธ ใ๏ธ ๐ด ๐ต ๐น ๐ฒ
How can i solve it?
strip all emoij on a string for logging readable string
Thanks for doing node-emoji! I use it in the software that generates my blog, http://scripting.com/.
I was wondering if there is a way to configure node-emoji to add a span around each character you generate so I could control the display with CSS.
I specifically want to bump the font-size on the emoji.
You can see why in the first item on today's blog.
http://scripting.com/2017/06/27.html
The cow is too small, but the text is just the right size. I'd set the size of the emoji toย 1.1em to make it small bit bigger.
Again thanks for node-emoji! ๐บ
First of all thanks for the great library. I'm currently using this library in conjunction with Microsoft Botbuilder to create a facebook chat bot. Most of the emojis are working perfectly, however I'm having an issue with the :thinking_face:
emoji on facebook (skype as well).
Currently my code looks like this:
const buttons = [":heart_eyes: Show me more!", ":thinking_face: Something else"]
.map((button) => emoji.emojify(button););
On facebook I'm seeing the following when the buttons are finally displayed:
I'm trying to determine if this is a botbuilder issue or if anyone has been able to :thinking_face:
to work on facebook using node-emoji.
Maybe we can make a CLI so that we can list out emojis / search through emojis etc..
E.g.
> npx emoji find tada
...
> npx emoji find ๐
Just an idea. Please tell me what you think. Would love to contribute a PR if you like the idea.
I'm looking for the opposite of emoji.emojify
, to get messages out and into the database. Smartphone keyboards often just insert a unicode. I wish to map this to the corresponding string for database storage.
// replaces all unicode emojis with the string variant,
var str = emoji.stringify('I โค๏ธ โ๏ธ!'); // ยป "I :heart: :coffee:!"
console.log(emoji.get('coffee')); // returns the emoji code for coffee (displays emoji on terminals that support it)
What would non-supporting systems see? Is there any way I could detect OS support, and show emoji only where it's supported, and fall back to alternative characters/words where necessary?
Would be great to have the new emoji that have been added! For instance, Slack supports ๐ค, ๐, and a lot of other emoji from the last release.
For example,
var emojiMap = {
':test:': 'http://....svg',
}
console.log(emoji.emojify('Some :test: text', name => `<img src="${emojiMap[name]}">`))
What do you think?
when null
is specified as onMissing
and a format
function is specified, even non-existant emoji are modified. (introduced by #48)
The question here is which behavior we want. I think it's probably better if the formatting only gets applied to existing emoji and the rest are left alone by default (when onMissing
is not defined).
Hello there,
I am building a cross-platform app in React Native.
I want to add emojis as iOS has.
Does anyone have any idea how to do that?
https://github.com/iamcal/js-emoji/blob/master/emoji.js#L164-L1010
is 404
This is where I would get my lists of emoji. Just thought I'd let you know.
as it does for me to translate a string?
example :hushed::star::heart_eyes:
emoji.get('๐ฏโ') // => ':๐ฏโ:'
I'm trying to find specific emojis, but how do I find them? Scrolling sideways through the JSON? It's super de duper laggy and really hard to do . Can we have a hosted webpage where they're all listed?
Hi,
So I have this Electron app that make use of node-emoji
and for the same code, I'm getting two different results. Do you have an idea as to what could be causing this?
const emoji = require('node-emoji');
document.getElementById(`logo`).innerHTML = emoji.emojify(':dancer: :dancer: :heart_eyes_cat:');
Hi,
I saw that in #88 there was the move from lodash.toarray
to the regular lodash
package in dependencies.
Would it be possible to create a new release that contains this change as we would like to get away from having lodash.toarray
in our dependency tree (it's coming in through the latest published version of node-emoji
)?
Thanks!
README.md shows a screenshot from (I'm assuming) an older version. As emoji.heart
returns undefined
in the current published version. That would correspond with the API in rest of the README, but the screenshot shows an API which is no longer apparently supported, and since it's displayed first could give off the wrong info.
:blue_heart:
๐ Emoji doesn't working.
Emoji.which = function which(emoji_code) {
for (var prop in Emoji.emoji) {
if (Emoji.emoji.hasOwnProperty(prop)) {
if (Emoji.emoji[prop].codePointAt() === emoji_code.codePointAt()) {
return prop;
}
}
}
};
Why is not this part of the following write?
if (Emoji.emoji[prop].codePointAt() === emoji_code.codePointAt() && Emoji.emoji[prop].length === emoji_code.length ) {
return prop;
}
thanks~
.strip method remove space with ยฎ sign.
emoji.strip('MASCOTยฎ Mannheim') // returns 'MASCOTMannheim'
Please fix this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.