Update String/CheckCamelCase.js

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
This commit is contained in:
SURYAPRATAP SINGH SURYAVANSHI
2021-08-20 13:17:48 +05:30
committed by GitHub
parent e48f5e2192
commit 8722d52980

View File

@ -10,7 +10,7 @@
const CheckCamelCase = (varName) => {
// firstly, check that input is a string or not.
if (typeof varName !== 'string') {
return 'Not string(s)'
return new TypeError("Argument is not a string.")
}
const pat = /^[a-z][A-Za-z]*$/