git ssb

3+

dangerousbeans / scuttle-vue



Tree: 8dc25143a3f37f1618f7a92b3c46dec512b43bfd

Files: 8dc25143a3f37f1618f7a92b3c46dec512b43bfd / modules / emoji.js

440 bytesRaw
1var emojis = require('emoji-named-characters')
2var emojiNames = Object.keys(emojis)
3
4exports.needs = { blob_url: 'first' }
5exports.gives = { emoji_names: true, emoji_url: true }
6
7exports.create = function (api) {
8 return {
9 emoji_names: function () {
10 return emojiNames
11 },
12 emoji_url: function (emoji) {
13 return emoji in emojis &&
14 api.blob_url(emoji).replace(/\/blobs\/get/, '/img/emoji') + '.png'
15 }
16 }
17}
18
19

Built with git-ssb-web