3.0.2 • Published 8 months ago

@zxcvbn-ts/language-id v3.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@zxcvbn-ts/language-id

The Indonesia dictionary and language package for zxcvbn-ts

Sources

  • commonWords.json list is generated from the 2018 full wordlist in FrequencyWords repository.
  • names.json source is based on this gist and currently is fetched from Wikitionary. The list will be updated later from several articles or blogs.
  • wikipedia.json is generated from Indonesia Wikipedia dump.

Install

npm:

npm install @zxcvbn-ts/language-id --save

yarn:

yarn add @zxcvbn-ts/language-id

Setup

import { zxcvbn, zxcvbnOptions } from '@zxcvbn-ts/core'
import * as zxcvbnCommonPackage from '@zxcvbn-ts/language-common'
import * as zxcvbnIdPackage from '@zxcvbn-ts/language-id'

const password = 'somePassword'
const options = {
  translations: zxcvbnIdPackage.translations,
  graphs: zxcvbnCommonPackage.adjacidcyGraphs,
  dictionary: {
    ...zxcvbnCommonPackage.dictionary,
    ...zxcvbnIdPackage.dictionary,
  },
}

zxcvbnOptions.setOptions(options)

zxcvbn(password)