markdown-to-text-emoji
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

markdown to text emoji

npm

Input Output
hello :smile: :smiling_imp::smile: hello 😄 😈😄

All primitive input evaluate String except null, undefined, null, undefined evaluate empty string.

Install

npm install markdown-to-text-emoji

Usage

import {textEmoji} from 'markdown-to-text-emoji'
 
textEmoji(`hello :smile: :smiling_imp::smile:`) // `hello 😄 😈😄`

Test

$ jest --coverage
 PASS  ./index.spec.ts
  emoji
    ✓ emoji (4ms)
    ✓ createMapMdToEmoji (1ms)
    ✓ emojiMd
    ✓ createRegExpTest (1ms)
    ✓ textEmoji (3ms)
 
---------------------|----------|----------|----------|----------|-------------------|
File                 |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s | 
---------------------|----------|----------|----------|----------|-------------------|
All files            |      100 |      100 |      100 |      100 |                   |
 emoji.ts            |      100 |      100 |      100 |      100 |                   |
 markdown-to-text.ts |      100 |      100 |      100 |      100 |                   |
---------------------|----------|----------|----------|----------|-------------------|
 
=============================== Coverage summary ===============================
Statements   : 100% ( 13/13 )
Branches     : 100% ( 0/0 )
Functions    : 100% ( 1/1 )
Lines        : 100% ( 13/13 )
================================================================================
Test Suites: 1 passed, 1 total
Tests:       5 passed, 5 total
Snapshots:   0 total
Time:        3.181s
Ran all test suites.
✨  Done in 3.68s.

emoji data markdown-it-emoji

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i markdown-to-text-emoji

Weekly Downloads

748

Version

1.1.0

License

MIT

Unpacked Size

385 kB

Total Files

24

Last publish

Collaborators

  • deptno