Files: 0a50ea2f8ea043de9dac604adc0602cd504b2f25 / modules_extra / emoji.js
530 bytesRaw
1 | var emojis = require('emoji-named-characters') |
2 | var emojiNames = Object.keys(emojis) |
3 | |
4 | //var plugs = require('../plugs') |
5 | //var blob_url = plugs.first(exports.blob_url = []) |
6 | // |
7 | |
8 | exports.needs = { blob_url: 'first' } |
9 | exports.gives = { emoji_names: true, emoji_url: true } |
10 | |
11 | exports.create = function (api) { |
12 | return { |
13 | emoji_names: function () { |
14 | return emojiNames |
15 | }, |
16 | emoji_url: function (emoji) { |
17 | return emoji in emojis && |
18 | api.blob_url(emoji).replace(/\/blobs\/get/, '/img/emoji') + '.png' |
19 | } |
20 | } |
21 | } |
22 | |
23 |
Built with git-ssb-web