-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from zxcvbn-ts/chore/remove-iief-mentions
docs(build): remove mentioning of browser build
- Loading branch information
Showing
1 changed file
with
2 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
``` | ||
|
@@ -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 | ||
|