Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(build): remove mentioning of browser build #282

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 2 additions & 35 deletions docs/guide/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,6 @@ const zxcvbn = new ZxcvbnFactory(options)
zxcvbn.check(password)
```

### As script tag

Example using jsdelivr (a CDN)

```html
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@zxcvbn-ts/[email protected]/dist/zxcvbn-ts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@zxcvbn-ts/[email protected]/dist/zxcvbn-ts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@zxcvbn-ts/[email protected]/dist/zxcvbn-ts.js"></script>
</head>
<body>
<script>
;(function () {
// all package will be available under zxcvbnts
const options = {
translations: zxcvbnts['language-en'].translations,
graphs: zxcvbnts['language-common'].adjacencyGraphs,
dictionary: {
...zxcvbnts['language-common'].dictionary,
...zxcvbnts['language-en'].dictionary,
},
}

const zxcvbn = new zxcvbnts.core.ZxcvbnFactory(options)
const results = zxcvbn.check('somePassword')
console.log(results)
})()
</script>
</body>
</html>
```

## Output

```
Expand Down Expand Up @@ -144,15 +111,15 @@ If you want to use it and want to include your own polyfills, you need to transp
- I18n support for feedback, dictionaries and keyboard patterns. By default, the feedback are keys now
- All dictionaries are optional, but the `en` dictionary is highly recommend (wished feature in some issues)
- Dictionaries are separate from the core library. This means zxcvbn-ts is relatively small without its dictionaries
- compress dictionaries for smaller bundle size => up to 33% smaller dictionaries while having more entries
- The project is a monorepo with a core library `@zxcvbn-ts/core` and language packages `@txcvbn-ts/language-en`.
Initially, there are only German and English language packages.
- Keyboard layouts can be customised. This means you can overwrite the default set of layouts with your own or extend it.
E.g., if you are developing a Russian website, you need to include a Cyrillic keyboard set. Create a PR so that others can benefit from it.
- You can use multiple keyboard layouts, which means that the library will check against them by default.
- the tests are Jest based, so we get a coverage score
- eslint/prettier for consistent code style
- Added static page docs https://zxcvbn-ts.github.io/zxcvbn/
- esm, commonJS and browser build
- esm, commonJS
- Custom matcher can be added which means you can create your own matcher
- Async matcher can be added which means you can create a matcher that makes an API call
- [haveibeenpwned](https://haveibeenpwned.com/Passwords) matcher
Expand Down