refactor: use padZero function for numbers
This commit is contained in:
@@ -4,3 +4,11 @@
|
||||
export const capitalizeFirstLetter = (string: string) => {
|
||||
return string[0].toUpperCase() + string.slice(1)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pad string or number with zero
|
||||
*/
|
||||
export const padZero = (value: string | number) => {
|
||||
return ('0' + Number(value)).slice(-2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user