refactor tests
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
export default function capitalize(value = ''): string {
|
||||
return value.charAt(0).toUpperCase() + value.slice(1)
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
export default function fromString(value: any) {
|
||||
if (typeof value !== 'string') {
|
||||
return value
|
||||
}
|
||||
|
||||
if (value.match(/^\d*(\.\d+)?$/)) {
|
||||
return Number(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user