Split code

This commit is contained in:
Adria Navarro 2024-03-14 22:32:17 +01:00
parent 03122b464f
commit acbb06edf7
1 changed files with 9 additions and 10 deletions

View File

@ -168,16 +168,15 @@ export function processStringSync(
function process(stringPart: string) {
const template = createTemplate(stringPart, opts)
const now = Math.floor(Date.now() / 1000) * 1000
return postprocess(
template({
now: new Date(now).toISOString(),
__opts: {
...opts,
input: stringPart,
},
...context,
})
)
const processedString = template({
now: new Date(now).toISOString(),
__opts: {
...opts,
input: stringPart,
},
...context,
})
return postprocess(processedString)
}
try {
if (opts && opts.onlyFound) {