Skip to content

Commit

Permalink
Merge pull request #41 from Psychopoulet/develop
Browse files Browse the repository at this point in the history
messages correction
  • Loading branch information
Psychopoulet committed Oct 8, 2020
2 parents e062d6b + 98941f3 commit 147b285
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ module.exports = class NodeContainerPattern extends Map {
if (isNumber(this.mins[key]) && result.length < this.mins[key]) {

throw new RangeError(
"The \"" + key + "\" data length (" + result.length + ") is lower than the max allowed (" + this.mins[key] + ")"
"The \"" + key + "\" data length (" + result.length + ") is lower than the min allowed (" + this.mins[key] + ")"
);

}
else if (isNumber(this.maxs[key]) && result.length > this.maxs[key]) {

throw new RangeError(
"The \"" + key + "\" data length (" + result.length + ") is lower than the max allowed (" + this.maxs[key] + ")"
"The \"" + key + "\" data length (" + result.length + ") is higher than the max allowed (" + this.maxs[key] + ")"
);

}
Expand All @@ -112,7 +112,7 @@ module.exports = class NodeContainerPattern extends Map {
if (isNumber(this.mins[key]) && result < this.mins[key]) {

throw new RangeError(
"The \"" + key + "\" data (" + result + ") is higher than the max allowed (" + this.mins[key] + ")"
"The \"" + key + "\" data (" + result + ") is lower than the min allowed (" + this.mins[key] + ")"
);

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-containerpattern",
"version": "1.2.0",
"version": "1.2.1",
"description": "A 'Container pattern' object for a clean global use of data.",
"main": "lib/main.js",
"typings": "lib/index.d.ts",
Expand Down

0 comments on commit 147b285

Please sign in to comment.