@zxcvbn-ts/language-cs
v4.1.2
Published
The Czech language package for zxcvbn-ts
Maintainers
Readme
@zxcvbn-ts/language-cs
Czech dictionaries and feedback translations for zxcvbn-ts, a realistic password strength estimator.
📖 Documentation · Languages guide · Demo
What's included
dictionary:commonWords-cs,firstnames-cs,lastnames-cs,wikipedia-cs, word sequence lists. Passwords built from these words are recognized and get a lower score.translations: the warnings and suggestions returned inresult.feedback, in Czech.
Use it together with @zxcvbn-ts/language-common, which provides the common password list and the keyboard adjacency graphs. You can combine several language packages by spreading more dictionaries into dictionary.
Installation
# npm
npm install @zxcvbn-ts/core @zxcvbn-ts/language-common @zxcvbn-ts/language-cs
# yarn
yarn add @zxcvbn-ts/core @zxcvbn-ts/language-common @zxcvbn-ts/language-cs
# pnpm
pnpm add @zxcvbn-ts/core @zxcvbn-ts/language-common @zxcvbn-ts/language-csUsage
import { ZxcvbnFactory } from '@zxcvbn-ts/core'
import * as zxcvbnCommonPackage from '@zxcvbn-ts/language-common'
import * as zxcvbnCsPackage from '@zxcvbn-ts/language-cs'
const options = {
translations: zxcvbnCsPackage.translations,
graphs: zxcvbnCommonPackage.adjacencyGraphs,
dictionary: {
...zxcvbnCommonPackage.dictionary,
...zxcvbnCsPackage.dictionary,
},
}
const zxcvbn = new ZxcvbnFactory(options)
const result = zxcvbn.check('somePassword')
console.log(result.score) // 0 (weak) to 4 (strong)
console.log(result.feedback) // { warning, suggestions } in CzechThe dictionaries are fairly large. To keep them out of your main bundle, see lazy loading.
Sources
commonWordsis generated from the OpenSubtitles 2024 word frequency list (cs) provided via OPUS, licensed under ODC-BY.firstnamesandlastnamesare scraped from prijmeni.cz.wikipediais generated from the Czech Wikipedia dump.wordSequencescontains manually curated sequences (numbers, weekdays, months, …) used by the word sequence matcher.
License
MIT. The bundled data keeps the licenses of its sources listed above.
