emoji-tree

1.1.2 • Public • Published

This parses an incoming string and outputs an array denoting whether each character of the string is an emoji or not.

const emojiTree = require('emoji-tree');
emojiTree('Poo: 💩');

// outputs
[ { text: 'P', type: 'text' },
  { text: 'o', type: 'text' },
  { text: 'o', type: 'text' },
  { text: ':', type: 'text' },
  { text: ' ', type: 'text' },
  { text: '💩', type: 'emoji' } ]

Supports flags, skin colors, and other tricky emoji bits.

Installing

npm install emoji-tree

Dependents (3)

Package Sidebar

Install

npm i emoji-tree

Weekly Downloads

896

Version

1.1.2

License

none

Unpacked Size

8.06 kB

Total Files

9

Last publish

Collaborators

  • thekevinscott