Skip to content

ssmirr/emoticons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emoticons ヽ(^◡^)ノ

Generate random text emoticons (kaomoji) based on emotions.

Zero dependencies. Tiny. Works everywhere.

Give it an emotion, get back a unique emoticon — every time.

$ emoticon happy
╰(☆▽☆)╯

$ emoticon sad
(ಥ︿ಥ)

$ emoticon angry
ᕙ(ಠ益ಠ)ᕗ

Install

npm install emoticons

Usage

const emoticon = require('emoticons');

emoticon('happy');    // ヽ(^◡^)ノ
emoticon('sad');      // (ಥ︿ಥ)
emoticon('angry');    // ᕦ(╬皿╬)ᕤ

Every call is randomized — same emotion, different face:

emoticon('love');     // (♥◡♥)
emoticon('love');     // ╰(✿❤ε❤✿)╯
emoticon('love');     // [˘³˘]

Random emotion

emoticon.random();    // ¯\_(ツ)_/¯  (who knows what you'll get)

List available emotions

emoticon.emotions;
// ['happy', 'sad', 'angry', 'love', 'surprised',
//  'confused', 'excited', 'cool', 'silly', 'shrug', 'disapproval']

Emotions & Examples

Emotion Unique Variants Examples
happy 756 ヽ(^◡^)ノ ╰(⌣‿⌣)╯ ੧(☆∀☆)੭
sad 150 (ಥ︿ಥ) ╰(;﹏;)╯ ༼╥‸╥༽
angry 300 ᕙ(ಠ益ಠ)ᕗ ᕦ(╬皿╬)ᕤ ╚(•́Д•́)═╝
love 480 (♥◡♥) ヽ(✿˘ε˘✿)ノ ╰(❤ω❤)╯
surprised 150 ╰(⊙□⊙)╯ ヽ(°O°)ノ ༼ʘдʘ༽
confused 240 ¯\_(・〰・)_/¯ ┌(◔‸◔)┐ 乁(?〜?)ㄏ
excited 540 ੧(✧○✧)੭ ٩(☆ω☆)و ୧(^∀^)୨
cool 200 ᕙ(▀‿▀)ᕗ (¬ʖ¬) ᕦ(⌣_⌣)ᕤ
silly 324 乁ʕ◉ε◉ʔㄏ ╰༼¬〰¬༽╯ ヽ(ↂਊↂ)ノ
shrug 8 ¯\_(ツ)_/¯ ¯\_(◉‿◉)_/¯ ¯\_(シ)_/¯
disapproval 24 (ಠ_ಠ) [≖╭╮≖] (¬益¬)

Counts are calculated by enumerating every valid arm, body, eye, mouth, and optional cheek combination for each emotion. The per-emotion numbers are unique within that emotion; across the whole package, some strings overlap between emotions.

3172 total combinations across all emotions. 2893 of those are unique emoticon strings after removing overlaps between emotions.


CLI

A command-line interface is included:

# Specific emotion
$ npx emoticon happy
੧(^◡^)੭

# Random
$ npx emoticon --random
ᕙ(•ʖ•)ᕗ

# Help
$ npx emoticon --help

Or install globally:

npm install -g emoticons
emoticon excited
# ٩(✧∀✧)و

How it works

Each emoticon is assembled from interchangeable parts:

  ╰   (   ☆   ◡   ☆   )   ╯
  ─┬─ ─┬─ ─┬─ ─┬─ ─┬─ ─┬─ ─┬─
   │   │   │   │   │   │   │
   │   │   │   │   │   │   └── right arm
   │   │   │   │   │   └────── right body
   │   │   │   │   └────────── right eye
   │   │   │   └────────────── mouth
   │   │   └────────────────── left eye
   │   └────────────────────── left body
   └────────────────────────── left arm

Arms and bodies are always picked as matched pairs so left and right stay visually symmetric. Eyes use the same character on both sides. Each emotion has its own curated palette of parts — angry gets intense eyes (, •́) and aggressive arms (ᕙ...ᕗ), while happy gets cheerful eyes (, ^) and celebratory arms (ヽ...ノ).


License

MIT © Samim ᕙ(▀‿▀)ᕗ

About

Generate random emoticons based on emotions. Zero dependencies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors