You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// set a boolean value to generate strings with upperCase characters
106
+
// Boolean, set a boolean value to generate strings with upperCase characters
106
107
107
108
lowerCase: true,
108
-
// set a boolean value to generate strings with lowerCase characters
109
+
// Boolean, set a boolean value to generate strings with lowerCase characters
109
110
110
111
special: false,
111
-
// set a boolean value to generate strings with special characters
112
+
// Boolean, set a boolean value to generate strings with special characters
112
113
113
114
number: true,
114
-
// set a boolean value to generate strings with numbers
115
+
// Boolean, set a boolean value to generate strings with numbers
115
116
116
117
/*
117
118
*************************************************
118
119
Settings for password mode
119
120
*************************************************
120
121
*/
121
122
showStrength: false,
122
-
// Shows the password strength
123
+
// Boolean, shows the password strength
123
124
// like: strength: high. Possible results: unacceptable, terrible, medium, good and high.
124
125
125
126
firstCharType: 'random',
126
-
// set the type of first character when generate a password
127
+
// String, set the type of first character when generate a password
127
128
// 'random' - random type
128
129
// 'upperCase' - to upperCase character
129
130
// 'lowerCase' - to lowerCase character
130
131
// 'special' - to special character
131
132
// 'number' - to number
132
133
134
+
excludeEqualChars: true,
135
+
// Boolean, exclude characters that are equals
136
+
// E.g: aa, AA, @@, 00
137
+
133
138
/*
134
139
*************************************************
135
140
Settings for mask mode
136
141
*************************************************
137
142
*/
138
-
mask: '@#$%-@#$%-@#$%-@#$%' // mask of string
143
+
mask: '@#$%-@#$%-@#$%-@#$%',
144
+
// String, mask to generate the strings
139
145
// @ - to upperCase characters
140
146
// # - to lowerCase characters
141
147
// $ - to special characters
142
148
// % - to numbers
143
149
// others: no will be changed
150
+
151
+
upperCaseMask: '@',
152
+
// String, must be 1 character
153
+
154
+
lowerCaseMask: '#',
155
+
// String, must be 1 character
156
+
157
+
specialMask: '$',
158
+
// String, must be 1 character
159
+
160
+
numberMask: '%'
161
+
// String, must be 1 character
144
162
}
145
163
146
164
// and then:
147
-
const string = str.generate(settings)
165
+
let string = str.generate(settings)
148
166
```
149
167
150
168
Testing
@@ -154,7 +172,6 @@ may first need to run `npm install` to install the required development
154
172
dependencies. (These dependencies are **not** required in a production
155
173
environment, and facilitate only unit testing.)
156
174
157
-
158
175
Contributing
159
176
------------
160
-
If you'd like to contribute, please fork this repository, change the default branch typing git checkout dev, make your changes, and then submit a pull-request.
177
+
If you'd like to contribute, please fork this repository, change the default branch typing git checkout dev, make your changes, make a new branch and then submit a pull-request.
0 commit comments