How to use the twemoji.base function in twemoji

To help you get started, we’ve selected a few twemoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jplusplus / the-accountant / src / components / emoji / emoji.spec.js View on Github external
describe('filter: emoji', () => {
  const base = twemoji.base;

  beforeEach(() => {
    angular.module('emoji', []).filter('emoji', emojiFilter);
    angular.mock.module('emoji');
  });

  it('should convert an unicode heart to an image', angular.mock.inject(emojiFilter => {
    const html = emojiFilter('I \u2764 emoji!');
    expect(html).toBe(`I <img src="${base}72x72/2764.png" alt="\u2764" draggable="false" class="emoji"> emoji!`);
  }));
});
github credija / opa / services / emoji-service.js View on Github external
localTwemoji() {
    Twemoji.base = `${process.env.baseUrl}/emoji/`;
    return Twemoji;
  },
github stevenhauser / i-have-to-return-some-videotapes / webpack.config.js View on Github external
'twemoji-url': function(emoji) {
        const codePoint = twemoji.convert.toCodePoint(emoji.getValue());
        return sassTypes.String(`url(${twemoji.base}svg/${codePoint}.svg)`);
      }
    }

twemoji

A Unicode standard based way to implement emoji across all platforms.

MIT
Latest version published 2 years ago

Package Health Score

68 / 100
Full package analysis