Add singleton to interface
Singleton
Make sure you only have one instance of I18n in your global scope
const i18n = I18n.singleton;
i18n.$scope = 'my.scope'; // Optional
i18n.add({...});
Shortcut:
const i18n = require('@fiverr/i18n/singleton');
Make sure you only have one instance of I18n in your global scope
const i18n = I18n.singleton;
i18n.$scope = 'my.scope'; // Optional
i18n.add({...});
const i18n = require('@fiverr/i18n/singleton');