Skip to content

Commit 8294027

Browse files
committed
Improve function comment
1 parent 443743d commit 8294027

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/util.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ function getErrorMessage(errorCode) {
137137

138138
module.exports.getErrorMessage = getErrorMessage;
139139

140-
// assert it typically used in the beginning of public functions to assert preconditions
141-
// for the function to execute. Most commonly it's used to validate arguments lenght
142-
// and types and throw an error if they don't match what is expected.
140+
// assert is typically used at the beginning of public functions to assert
141+
// preconditions for the function to execute. Most commonly it is used to
142+
// validate the number of arguments and their types and throw an error if they
143+
// don't match what is expected.
143144
function assert(condition, errorCode, messageArg1) {
144145
if (!condition) {
145146
throw new Error(getErrorMessage(errorCode, messageArg1));

0 commit comments

Comments
 (0)