2023-07-01 09:46:36 +00:00
|
|
|
export const sanitise = str => {
|
|
|
|
const isTT = str?.slice(0, 3) === 'tt.'
|
|
|
|
const isThingtime = str?.slice(0, 9) === 'thingtime.'
|
2023-07-01 14:13:27 +00:00
|
|
|
const isDot = str?.slice(0, 1) === '.'
|
2023-07-01 09:46:36 +00:00
|
|
|
|
|
|
|
if (isTT) {
|
|
|
|
str = str?.slice(3)
|
|
|
|
}
|
|
|
|
if (isThingtime) {
|
|
|
|
str = str?.slice(9)
|
|
|
|
}
|
|
|
|
|
2023-07-01 14:13:27 +00:00
|
|
|
if (isDot) {
|
|
|
|
str = str?.slice(1)
|
|
|
|
}
|
|
|
|
|
2023-07-01 09:46:36 +00:00
|
|
|
return str
|
|
|
|
}
|