Comparing version 0.0.72 to 0.0.73
{ | ||
"name": "webdetta", | ||
"version": "0.0.72", | ||
"version": "0.0.73", | ||
"author": "Fedot Kriutchenko <fodyadev@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -35,1 +35,14 @@ const AsyncFunction = (async () => {}).constructor; | ||
} | ||
export const isTemplateCall = args => | ||
Array.isArray(args[0]) && Object.hasOwn(args[0], 'raw'); | ||
export const templateCallToArray = args => { | ||
if (!isTemplateCall(args)) return args; | ||
let i = 0, result = []; | ||
for (let part of args[0]) { | ||
result.push(part); | ||
if (++i < args.length) result.push(args[i]); | ||
} | ||
return result; | ||
} |
32243
948