File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -137,9 +137,10 @@ function getErrorMessage(errorCode) {
137
137
138
138
module . exports . getErrorMessage = getErrorMessage ;
139
139
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.
143
144
function assert ( condition , errorCode , messageArg1 ) {
144
145
if ( ! condition ) {
145
146
throw new Error ( getErrorMessage ( errorCode , messageArg1 ) ) ;
You can’t perform that action at this time.
0 commit comments