node-emoji icon indicating copy to clipboard operation
node-emoji copied to clipboard

🐛 Bug: construction_worker confusion

Open juftin opened this issue 5 months ago • 1 comments

Bug Report Checklist

  • [x] I have tried restarting my IDE and the issue persists.
  • [x] I have pulled the latest main branch of the repository.
  • [x] I have searched for related issues and found none that matched my issue.

Expected

I ran into issues with https://github.com/momocow/semantic-release-gitmoji where the release notes aren't picking up the right construction_worker - I think this is an issue here on node-emoji

import * as emoji from 'node-emoji'

console.log(emoji.find('👷'))
console.log(emoji.find('👷‍♂️'))
console.log(emoji.find('👷‍♀️'))
{ emoji: '👷', key: 'construction_worker' }
{ emoji: '👷‍♂️', key: 'construction_worker_man' }
{ emoji: '👷‍♀', key: 'construction_worker_woman' }

Actual

import * as emoji from 'node-emoji'

console.log(emoji.find('👷'))
console.log(emoji.find('👷‍♂️'))
console.log(emoji.find('👷‍♀️'))
{ emoji: '👷', key: 'construction_worker_man' }
undefined
{ emoji: '👷‍♀', key: 'construction_worker_woman' }

Additional Info

https://playcode.io/2477888

juftin avatar Jul 28 '25 02:07 juftin

This is confusing because emojilib seems to be picking it up correctly:

var emoji = require("emojilib")

var constructionWorker = emoji["👷"][0]
console.log(constructionWorker)

var constructionWorkerMan = emoji["👷‍♂️"][0]
console.log(constructionWorkerMan)

var constructionWorkerWoman = emoji["👷‍♀️"][0]
console.log(constructionWorkerWoman)
construction_worker
man_construction_worker
woman_construction_worker

https://playcode.io/2477892

juftin avatar Jul 28 '25 02:07 juftin