1.0.6 • Published 2 years ago

@zutatensuppe/emoji-detect v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

emoji-detect

A library to detect emojis in strings.

Installation

npm i @zutatensuppe/emoji-detect

Usage

import emojiDetect from '@zutatensuppe/emoji-detect'


// Detect Emoji Codepoints
// -------------------------------------------------------------------
const emojiCodePoints = emojiDetect.detectCodePoints('🏳️‍🌈🍀🍀🐸')

// emojiCodePoints will now be:
[
  [ 0x1f3f3, 0xfe0f, 0x200d, 0x1f308 ], // rainbow flag
  [ 0x1f340 ], // clover 1
  [ 0x1f340 ], // clover 2
  [ 0x1f438 ], // frog
]


// Detect Emoji Strings
// -------------------------------------------------------------------
const emojiStrings = emojiDetect.detectStrings('🏳️‍🌈🍀🍀🐸')

// emojiStrings will now be:
[
  '1f3f3-fe0f-200d-1f308', // rainbow flag
  '1f340', // clover 1
  '1f340', // clover 2
  '1f438', // frog
]
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago