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.
other
reference
diffCatalogKeys
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 Copy
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
How complete
otheris againstreference, as a 0-1 fraction ofreference's own keys thatotheralso has - built ondiffCatalogKeysrather than recomputing the same set difference, so the two never disagree about what "missing" means.