refactor tests

This commit is contained in:
Philipp Kühn
2020-10-31 23:56:31 +01:00
parent cb647de043
commit d810054492
6 changed files with 17 additions and 28 deletions

View File

@@ -1,3 +0,0 @@
export default function capitalize(value = ''): string {
return value.charAt(0).toUpperCase() + value.slice(1)
}

View File

@@ -1,4 +1,8 @@
export default function fromString(value: any) {
if (typeof value !== 'string') {
return value
}
if (value.match(/^\d*(\.\d+)?$/)) {
return Number(value)
}