@zxcvbn-ts/language-hr
v4.1.1
Published
The Croatian language package for zxcvbn-ts
Downloads
327
Maintainers
Readme
@zxcvbn-ts/language-hr
The Croatian dictionary and language package for zxcvbn-ts
Sources
- commonWords.json is generated from the OpenSubtitles 2024 dataset provided via OPUS (https://opus.nlpl.eu/datasets/OpenSubtitles). The dataset is licensed under ODC-BY (Open Data Commons Attribution License) and requires attribution when redistributed.
firstnames.jsonis generated from the Croatian first-name locale data in FakerJS.lastnames.jsonis generated from the Croatian surname locale data in FakerJS.wikipedia.jsonis generated from the Croatian Wikipedia dump at https://dumps.wikimedia.org/hrwiki/latest/hrwiki-latest-pages-articles.xml.bz2 using the repo's documentedwikiextractorplusyarn wikipediaExtractorflow.- The official Croatian Bureau of Statistics search tool for names and surnames is available at https://web.dzs.hr/app/imena/default.aspx, but it is query-based rather than a directly downloadable bulk list, so it is not used for generation in this first pass.
Install
npm:
npm install @zxcvbn-ts/language-hr --save
yarn:
yarn add @zxcvbn-ts/language-hr
Setup
import { ZxcvbnFactory } from '@zxcvbn-ts/core'
import * as zxcvbnCommonPackage from '@zxcvbn-ts/language-common'
import * as zxcvbnHrPackage from '@zxcvbn-ts/language-hr'
const password = 'somePassword'
const options = {
translations: zxcvbnHrPackage.translations,
graphs: zxcvbnCommonPackage.adjacencyGraphs,
dictionary: {
...zxcvbnCommonPackage.dictionary,
...zxcvbnHrPackage.dictionary,
},
}
const zxcvbn = new ZxcvbnFactory(options)
zxcvbn.check(password)