Skip to content

Commit e055fa8

Browse files
omgovichVlad Shilov
authored andcommitted
Update README.md
1 parent 6d2c050 commit e055fa8

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
11
# omgopass
22

33
Generator of strong passwords that are easy to remember
4+
5+
- **Fast**: 40 times faster than `password-generator`
6+
- **Small**: 314 bytes (minified and gzipped)
7+
- **No dependencies**
8+
- Supports Node.js and browsers
9+
10+
### Install
11+
12+
```
13+
npm install omgopass --save
14+
```
15+
16+
### Usage
17+
18+
```js
19+
import { generatePassword } from "omgopass";
20+
const password = generatePassword() // Tu6Log5Bam4
21+
```
22+
23+
#### Advanced Usage
24+
25+
```
26+
generatePassword({
27+
syllablesCount: 4,
28+
minSyllableLength: 3,
29+
maxSyllableLength: 4,
30+
hasNumbers: false,
31+
titlecased: true,
32+
vowels: "аеиоуэюя",
33+
consonants: "бвгджзклмнпрстчш"
34+
}) // ЗерКотиЛовМеч
35+
```
36+
37+
#### Available options
38+
39+
| Name | Description | Default |
40+
|--------------------|--------------------------------------------|--------------------|
41+
| `syllablesCount` | Integer, count of syllables |`10` |
42+
| `minSyllableLength`| Integer, minimal length of a syllable |`2` |
43+
| `maxSyllableLength`| Integer, max length of a syllable |`3` |
44+
| `hasNumbers` | Boolean, put numbers in the password |`true` |
45+
| `titlecased` | Boolean, use titlecase |`true` |
46+
| `vowels` | String, vowel alphabet |`'aeiouy'` |
47+
| `consonants` | String, consonant alphabet |`'bcdfghklmnprstvz'`|
48+
49+
### Supporting IE11 and obsolete platforms
50+
51+
This library uses features like [destructuring assignment](https://kangax.github.io/compat-table/es6/#test-destructuring,_assignment) and [`const/let` declarations](https://kangax.github.io/compat-table/es6/#test-const) and doesn't ship with ES5 transpiled sources. If you aim to support browsers like IE11 and below → make sure you run Babel over your `node_modules`

0 commit comments

Comments
 (0)