Skip to content

Commit 0646370

Browse files
committed
Documentation fixes
1 parent 8dabe51 commit 0646370

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ Asynchronously generates a salt.
154154
| rounds | *number | function(Error, string=)* | Number of rounds to use, defaults to 10 if omitted
155155
| seed_length | *number | function(Error, string=)* | Not supported.
156156
| callback | *function(Error, string=)* | Callback receiving the error, if any, and the resulting salt
157-
| @returns | *Promise* | If `callback` has been omitted
158-
| **@throws** | *Error* | If the callback argument is present but not a function
157+
| **@returns** | *Promise* | If `callback` has been omitted
158+
| **@throws** | *Error* | If `callback` is present but not a function
159159

160160
### hashSync(s, salt=)
161161

@@ -177,8 +177,8 @@ Asynchronously generates a hash for the given string.
177177
| salt | *number | string* | Salt length to generate or salt to use
178178
| callback | *function(Error, string=)* | Callback receiving the error, if any, and the resulting hash
179179
| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
180-
| @returns | *Promise* | If `callback` has been omitted
181-
| **@throws** | *Error* | If the callback argument is present but not a function
180+
| **@returns** | *Promise* | If `callback` has been omitted
181+
| **@throws** | *Error* | If `callback` is present but not a function
182182

183183
### compareSync(s, hash)
184184

@@ -201,8 +201,8 @@ Asynchronously compares the given data against the given hash.
201201
| hash | *string* | Data to be compared to
202202
| callback | *function(Error, boolean)* | Callback receiving the error, if any, otherwise the result
203203
| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
204-
| @returns | *Promise* | If `callback` has been omitted
205-
| **@throws** | *Error* | If the callback argument is present but not a function
204+
| **@returns** | *Promise* | If `callback` has been omitted
205+
| **@throws** | *Error* | If `callback` is present but not a function
206206

207207
### getRounds(hash)
208208

@@ -212,7 +212,7 @@ Gets the number of rounds used to encrypt the specified hash.
212212
|-----------------|-----------------|---------------
213213
| hash | *string* | Hash to extract the used number of rounds from
214214
| **@returns** | *number* | Number of rounds used
215-
| **@throws** | *Error* | If hash is not a string
215+
| **@throws** | *Error* | If `hash` is not a string
216216

217217
### getSalt(hash)
218218

dist/bcrypt.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
* @param {(number|function(Error, string=))=} seed_length Not supported.
133133
* @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt
134134
* @returns {!Promise} If `callback` has been omitted
135-
* @throws {Error} If the callback argument is present but not a function
135+
* @throws {Error} If `callback` is present but not a function
136136
* @expose
137137
*/
138138
bcrypt.genSalt = function(rounds, seed_length, callback) {
@@ -198,7 +198,7 @@
198198
* @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
199199
* (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
200200
* @returns {!Promise} If `callback` has been omitted
201-
* @throws {Error} If the callback argument is present but not a function
201+
* @throws {Error} If `callback` is present but not a function
202202
* @expose
203203
*/
204204
bcrypt.hash = function(s, salt, callback, progressCallback) {
@@ -276,7 +276,7 @@
276276
* @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
277277
* (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
278278
* @returns {!Promise} If `callback` has been omitted
279-
* @throws {Error} If the callback argument is present but not a function
279+
* @throws {Error} If `callback` is present but not a function
280280
* @expose
281281
*/
282282
bcrypt.compare = function(s, hash, callback, progressCallback) {
@@ -318,7 +318,7 @@
318318
* Gets the number of rounds used to encrypt the specified hash.
319319
* @param {string} hash Hash to extract the used number of rounds from
320320
* @returns {number} Number of rounds used
321-
* @throws {Error} If hash is not a string
321+
* @throws {Error} If `hash` is not a string
322322
* @expose
323323
*/
324324
bcrypt.getRounds = function(hash) {

src/bcrypt.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bcrypt.genSaltSync = function(rounds, seed_length) {
9292
* @param {(number|function(Error, string=))=} seed_length Not supported.
9393
* @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt
9494
* @returns {!Promise} If `callback` has been omitted
95-
* @throws {Error} If the callback argument is present but not a function
95+
* @throws {Error} If `callback` is present but not a function
9696
* @expose
9797
*/
9898
bcrypt.genSalt = function(rounds, seed_length, callback) {
@@ -158,7 +158,7 @@ bcrypt.hashSync = function(s, salt) {
158158
* @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
159159
* (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
160160
* @returns {!Promise} If `callback` has been omitted
161-
* @throws {Error} If the callback argument is present but not a function
161+
* @throws {Error} If `callback` is present but not a function
162162
* @expose
163163
*/
164164
bcrypt.hash = function(s, salt, callback, progressCallback) {
@@ -236,7 +236,7 @@ bcrypt.compareSync = function(s, hash) {
236236
* @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
237237
* (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
238238
* @returns {!Promise} If `callback` has been omitted
239-
* @throws {Error} If the callback argument is present but not a function
239+
* @throws {Error} If `callback` is present but not a function
240240
* @expose
241241
*/
242242
bcrypt.compare = function(s, hash, callback, progressCallback) {
@@ -278,7 +278,7 @@ bcrypt.compare = function(s, hash, callback, progressCallback) {
278278
* Gets the number of rounds used to encrypt the specified hash.
279279
* @param {string} hash Hash to extract the used number of rounds from
280280
* @returns {number} Number of rounds used
281-
* @throws {Error} If hash is not a string
281+
* @throws {Error} If `hash` is not a string
282282
* @expose
283283
*/
284284
bcrypt.getRounds = function(hash) {

0 commit comments

Comments
 (0)