Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change constructor to use the var_args add method instead of manually…

… adding each code point.
  • Loading branch information...
commit 99c0b84ccb61723027eed21d2937d64952397105 1 parent 6e28200
@bramstein authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/characterset.js
View
6 lib/characterset.js
@@ -33,11 +33,7 @@ function CharacterSet(input) {
} else if (typeof input === 'number') {
this.add(input);
} else if (Array.isArray(input)) {
- var codePoints = this.expandRange(input);
-
- for (var i = 0; i < codePoints.length; i += 1) {
- this.add(codePoints[i]);
- }
+ this.add.apply(this, this.expandRange(input));
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.