Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodrigobdz/validi18n
Ensure consistent keys across i18n translations
https://github.com/rodrigobdz/validi18n
consistent deep-keys generator-lnm i18n i18n-js json npm-module npm-package test-helper validate validating yarn
Last synced: about 1 month ago
JSON representation
Ensure consistent keys across i18n translations
- Host: GitHub
- URL: https://github.com/rodrigobdz/validi18n
- Owner: rodrigobdz
- License: mit
- Created: 2019-02-20T16:27:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T07:04:53.000Z (over 5 years ago)
- Last Synced: 2024-11-14T15:48:25.215Z (about 2 months ago)
- Topics: consistent, deep-keys, generator-lnm, i18n, i18n-js, json, npm-module, npm-package, test-helper, validate, validating, yarn
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/validi18n
- Size: 23.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: license
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
# validi18n [![Build Status](https://travis-ci.org/rodrigobdz/validi18n.svg?branch=master)](https://travis-ci.org/rodrigobdz/validi18n) [![codecov](https://codecov.io/gh/rodrigobdz/validi18n/badge.svg?branch=master)](https://codecov.io/gh/rodrigobdz/validi18n?branch=master)
> Ensure consistent keys across i18n translations
## Install
```sh
$ npm install validi18n
```## Usage
```js
const validi18n = require('validi18n')validi18n({ en: { save: 'Save' }, de: { save: 'Speichern' } })
//=> truevalidi18n({ en: { save: 'Save' }, de: {} })
//console error => { en: ['save'], de: [] }
//=> false
```## API
### validi18n(translations)
#### translations
Type: `Object`
Object with translations for each language supported.
## Credits
- [deep-keys](https://github.com/a8m/deep-keys) - Helper for comparison of i18n objects
- [generator-lnm](https://github.com/rodrigobdz/generator-lnm) - Awesome node module generator
## License
[MIT](license) © [Rodrigo Bermudez Schettino](https://rodrigobdz.github.io)