Skip to content

rodrigobdz/validi18n

Repository files navigation

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