Skip to content

Commit 4f94cd1

Browse files
committed
fix(isSlug): change charsetRegex variable to const for better immutability
1 parent ab79ac0 commit 4f94cd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/isSlug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assertString from './util/assertString';
22

3-
let charsetRegex = /^[a-z0-9](?!.*[-_]{2,})(?:[a-z0-9_-]*[a-z0-9])?$/;
3+
const charsetRegex = /^[a-z0-9](?!.*[-_]{2,})(?:[a-z0-9_-]*[a-z0-9])?$/;
44

55
export default function isSlug(str) {
66
assertString(str);

0 commit comments

Comments
 (0)