osrs-json-hiscores 2.10.0 → 2.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/hiscores.js +2 -2
- package/package.json +1 -1
package/lib/hiscores.js
CHANGED
@@ -186,7 +186,7 @@ function getStats(rsn) {
|
|
186
186
|
if (typeof rsn !== 'string') {
|
187
187
|
throw Error('RSN must be a string');
|
188
188
|
}
|
189
|
-
else if (!/^[a-zA-Z0-9 _]+$/.test(rsn)) {
|
189
|
+
else if (!/^[a-zA-Z0-9 _-]+$/.test(rsn)) {
|
190
190
|
throw Error('RSN contains invalid character');
|
191
191
|
}
|
192
192
|
else if (rsn.length > 12 || rsn.length < 1) {
|
@@ -271,7 +271,7 @@ function getStatsByGamemode(rsn, mode) {
|
|
271
271
|
if (typeof rsn !== 'string') {
|
272
272
|
throw Error('RSN must be a string');
|
273
273
|
}
|
274
|
-
else if (!/^[a-zA-Z0-9 _]+$/.test(rsn)) {
|
274
|
+
else if (!/^[a-zA-Z0-9 _-]+$/.test(rsn)) {
|
275
275
|
throw Error('RSN contains invalid character');
|
276
276
|
}
|
277
277
|
else if (rsn.length > 12 || rsn.length < 1) {
|