markdown to text emoji
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
textEmoji`hello :smile: :smiling_imp::smile:` // `hello 😄 😈😄`
Test
$ jest --coverage PASS ./index.spec.ts emoji ✓ emoji ✓ createMapMdToEmoji ✓ emojiMd ✓ createRegExpTest ✓ textEmoji ---------------------|----------|----------|----------|----------|-------------------|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% Branches : 100% Functions : 100% Lines : 100% ================================================================================Test Suites: 1 passed, 1 totalTests: 5 passed, 5 totalSnapshots: 0 totalTime: 3.181sRan all test suites.✨ Done in 3.68s.
emoji data markdown-it-emoji
LICENSE
MIT