validi18n

Ensure consistent keys across i18n translations

Usage no npm install needed!

<script type="module">
  import validi18n from 'https://cdn.skypack.dev/validi18n';
</script>

README

validi18n Build Status codecov

Ensure consistent keys across i18n translations

Install

$ npm install validi18n

Usage

const validi18n = require('validi18n')

validi18n({ en: { save: 'Save' }, de: { save: 'Speichern' } })
//=> true

validi18n({ en: { save: 'Save' }, de: {} })
//console error => { en: ['save'], de: [] }
//=> false

API

validi18n(translations)

translations

Type: Object

Object with translations for each language supported.

Credits

License

MIT © Rodrigo Bermudez Schettino