-
-
Notifications
You must be signed in to change notification settings - Fork 913
Labels
BugSomething isn't working.Something isn't working.
Description
Description
Encountered a bug in @stdlib/string/base/constantcase
. If a string contains hyphens, '-', they are not changed to '_'. The issue is in this line of code. The regular expression doesn't contain a hyphen (U+002D), but it does contain an endash (U+2013).
Other similar packages for changing string cases contain both characters in the regular expression.

Related Issues
No response
Questions
No.
Demo
No response
Reproduction
`console.log(constantcase('foo-bar'))`
Expected Results
`'FOO_BAR'`
Actual Results
`'FOO-BAR'`
Version
v0.0.96
Environments
N/A
Browser Version
No response
Node.js / npm Version
No response
Platform
No response
Checklist
- Read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
Metadata
Metadata
Assignees
Labels
BugSomething isn't working.Something isn't working.