Skip to content

v2.2.0

Compare
Choose a tag to compare
@Julien-Marcou Julien-Marcou released this 10 Jul 17:36

Features :

  • Improved typing for TypeScript
  • Added ability to omit versions using 'versionAbove'

Future-proofing :

Until now, if you wanted to avoid using newer versions of Unicode Emoji, because they were not yet wildely supported on every plateform, you had to do :

import * as unicodeEmoji from 'unicode-emoji';

const omitWhere = { version: ['12.1', '13.0', '13.1'] };
unicodeEmoji.getEmojis(omitWhere);

But this will result in a breaking change when you'll update unicode-emoji to support Unicode Emoji v14 (release expected on October 20, 2021), as you'll need to update your code in order to keep the same behavior as you have now :

import * as unicodeEmoji from 'unicode-emoji';

const omitWhere = { version: ['12.1', '13.0', '13.1', '14.0'] };
unicodeEmoji.getEmojis(omitWhere);

This is why you can now omit newer versions of Unicode Emoji, using the aboveVersion key, which is the prefered way, as it will allow you to update your dependencies without worrying about breaking change :

import * as unicodeEmoji from 'unicode-emoji';

const omitWhere = { versionAbove: '12.0' }; // Versions strictly greater will be omitted, so the version 12.0 is keeped
unicodeEmoji.getEmojis(omitWhere);