Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minimum length set to 1

  • Loading branch information...
commit 1a79ca4ce298693d0466337e82523f6ca8adf787 1 parent b8f6b96
@drd0rk authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/strgen.js
  2. +1 −1  src/strgen.coffee
View
4 lib/strgen.js
@@ -30,8 +30,8 @@
};
StrGen.setLength = function(len) {
- if (len < 2) {
- throw new Error("String length must be at least 2, " + len + " given");
+ if (len < 1) {
+ throw new Error("String length must be at least 1, " + len + " given");
}
return this.strLength = len;
};
View
2  src/strgen.coffee
@@ -26,7 +26,7 @@ module.exports = class StrGen
# define the length of the generated string
@setLength: (len) ->
- throw new Error "String length must be at least 2, "+len+" given" if len < 2
+ throw new Error "String length must be at least 1, "+len+" given" if len < 1
@strLength = len
# define the alphabet of the generated string
Please sign in to comment.
Something went wrong with that request. Please try again.