mwg API
    Preparing search index...

    Function catalogCompleteness

    • How complete other is against reference, as a 0-1 fraction of reference's own keys that other also has - built on diffCatalogKeys rather than recomputing the same set difference, so the two never disagree about what "missing" means.

      Parameters

      Returns number

      import { catalogCompleteness } from '@datamoc/mw_games/i18n';

      const en = { locale: 'en', direction: 'ltr' as const, messages: { a: '1', b: '2' } };
      const fr = { locale: 'fr', direction: 'ltr' as const, messages: { a: '1' } };

      catalogCompleteness(en, fr); // 0.5