Git Product home page Git Product logo

node-emoji's People

Contributors

ahanriat avatar alexlitel avatar askoufis avatar charpeni avatar cooperka avatar danielhilton avatar dependabot[bot] avatar emctackett avatar fossabot avatar gabrielcsapo avatar greenkeeperio-bot avatar histoiredebabar avatar jackiehluo avatar joshuakgoldberg avatar ludorenzetti avatar merceyz avatar ngryman avatar omnidan avatar orkon avatar renovate[bot] avatar richienb avatar ritik-banger-biz4group avatar ritikbanger avatar roopakv avatar shivkanthb avatar tgbtyty avatar timruffles avatar watadarkstar avatar wtgtybhertgeghgtwtg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-emoji's Issues

Emoji selectors

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 ๐Ÿ˜ƒ

Export hash of functions instead of an instance class

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!

1.4.2 release is missing index.js

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.

Custom emoji

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 ๐Ÿง…

Not sure how to add my own emoji

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.

Add support for text emoji

It could be nice to hace support for text emoji such as:

  • :D -> ๐Ÿ˜€
  • ;) -> ๐Ÿ˜‰
    etc..

I would like to submit a PR, do you have an idea where to start ?

Emoji modifiers don't seem to work.

Problem

I want to unemojify emojis that have modifiers (gender, color) but for some reason it doesn't even detect these as emojis.

Example

require('node-emoji').hasEmoji('๐Ÿคฆโ€โ™‚') => false
require('node-emoji').find('๐Ÿคฆโ€โ™‚') => undefined

Expected

require('node-emoji').hasEmoji('๐Ÿคฆโ€โ™‚') => true
require('node-emoji').find('๐Ÿคฆโ€โ™‚') => ":man_facepalming:"

Allow additional Emojis by custom json

๐Ÿคœ 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?

How to add custom emoji in node-emoji

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

bug: find() not working for all emojis

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.

Consider bumping minimum supported `node` version.

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);

Why is node-emoji rendering unexpected ๏ฟฝ character in console output?

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.

Some emojis are not supported.

example

โค๏ธ ๐Ÿงก ๐Ÿ’› ๐Ÿ’š ๐Ÿ’™ ๐Ÿ’œ ๐Ÿ–ค ๐Ÿค ๐ŸคŽ ๐Ÿ’” โฃ๏ธ ๐Ÿ’• ๐Ÿ’ž ๐Ÿ’“ ๐Ÿ’— ๐Ÿ’– ๐Ÿ’˜ ๐Ÿ’ ๐Ÿ’Ÿ โ˜ฎ๏ธ โœ๏ธ โ˜ช๏ธ ๐Ÿ•‰ โ˜ธ๏ธ โœก๏ธ ๐Ÿ”ฏ ๐Ÿ•Ž โ˜ฏ๏ธ โ˜ฆ๏ธ ๐Ÿ› โ›Ž โ™ˆ๏ธ โ™‰๏ธ โ™Š๏ธ โ™‹๏ธ โ™Œ๏ธ โ™๏ธ โ™Ž๏ธ โ™๏ธ โ™๏ธ โ™‘๏ธ โ™’๏ธ โ™“๏ธ ๐Ÿ†” โš›๏ธ ๐Ÿ‰‘ โ˜ข๏ธ โ˜ฃ๏ธ ๐Ÿ“ด ๐Ÿ“ณ ๐Ÿˆถ ๐Ÿˆš๏ธ ๐Ÿˆธ ๐Ÿˆบ ๐Ÿˆท๏ธ โœด๏ธ ๐Ÿ†š ๐Ÿ’ฎ ๐Ÿ‰ ใŠ™๏ธ ใŠ—๏ธ ๐Ÿˆด ๐Ÿˆต ๐Ÿˆน ๐Ÿˆฒ ๐Ÿ…ฐ๏ธ ๐Ÿ…ฑ๏ธ ๐Ÿ†Ž ๐Ÿ†‘ ๐Ÿ…พ๏ธ ๐Ÿ†˜ โŒ โญ•๏ธ ๐Ÿ›‘ โ›”๏ธ ๐Ÿ“› ๐Ÿšซ ๐Ÿ’ฏ ๐Ÿ’ข โ™จ๏ธ ๐Ÿšท ๐Ÿšฏ ๐Ÿšณ ๐Ÿšฑ ๐Ÿ”ž ๐Ÿ“ต ๐Ÿšญ โ—๏ธ โ• โ“ โ” โ€ผ๏ธ โ‰๏ธ ๐Ÿ”… ๐Ÿ”† ใ€ฝ๏ธ โš ๏ธ ๐Ÿšธ ๐Ÿ”ฑ โšœ๏ธ ๐Ÿ”ฐ โ™ป๏ธ โœ… ๐Ÿˆฏ๏ธ ๐Ÿ’น โ‡๏ธ โœณ๏ธ โŽ ๐Ÿš— ๐Ÿš• ๐Ÿš™ ๐ŸšŒ ๐ŸšŽ ๐ŸŽ ๐Ÿš“ ๐Ÿš‘ ๐Ÿš’ ๐Ÿš ๐Ÿšš ๐Ÿš› ๐Ÿšœ ๐Ÿฆฏ ๐Ÿฆฝ ๐Ÿฆผ ๐Ÿ›ด ๐Ÿšฒ ๐Ÿ›ต ๐Ÿ ๐Ÿ›บ ๐Ÿšจ ๐Ÿš” ๐Ÿš ๐Ÿš˜ ๐Ÿš– ๐Ÿšก ๐Ÿš  ๐ŸšŸ ๐Ÿšƒ ๐Ÿš‹ ๐Ÿšž ๐Ÿš ๐Ÿš„ ๐Ÿš… ๐Ÿšˆ ๐Ÿš‚ ๐Ÿš† ๐Ÿš‡ ๐ŸšŠ ๐Ÿš‰ โœˆ๏ธ ๐Ÿ›ซ ๐Ÿ›ฌ ๐Ÿ›ฉ ๐Ÿ’บ ๐Ÿ›ฐ ๐Ÿš€

result

image

How can i solve it?

strip emoij

strip all emoij on a string for logging readable string

Configure to add <span> around emoji?

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! ๐Ÿ˜บ

Facebook :thinking_face: emoji not showing up

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:
facebook button
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.

opposite of `emoji.emojify`

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:!"

Icons rendering issue

Some icons are not rendering properly in my emulator, I have given few of them:
emoji.get(':double_vertical_bar:');
emoji.get(':black_square_for_stop:');
emoji.get(':black_circle_for_record:');

I am trying to make a react native component using this. Got the result but facing this issue.

screenshot_1496208637

Unclear what happens in terminals that don't support emoji

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?

Support new emoji

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.

format behavior

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).

Really difficult to see emoji list

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?

Discrepancy between OSX/Win

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:');

Windows

screen shot 2016-11-17 at 5 39 06 pm

OSX

screen shot 2016-11-17 at 5 38 51 pm

Create updated release with bumped dependencies

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 Screenshot Incorrect

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.

1 do not want to turn into one

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~

Remove space on strip

.strip method remove space with ยฎ sign.

emoji.strip('MASCOTยฎ Mannheim') // returns  'MASCOTMannheim'

Please fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.