/twemoji-basename

because sometimes you want to use twemoji but without all the library bloat

Primary LanguageJavaScript

twemoji-basename

Because sometimes you want to use twemoji but without all the library bloat.

Build status

Install

$ npm install twemoji-basename

Usage

var basename = require('twemoji-basename')
var template = '//twemoji.maxcdn.com/36x36/{basename}.png'

var image = new Image
image.src = template.replace('{basename}', basename('🇰🇷'))
document.body.appendChild(image)

Korean flag

Added page weight

compression size
twemoji-basename.js 1.02 kB
twemoji-basename.min.js 683 B
twemoji-basename.min.js.gz 412 B

License

MIT