fix(striker-ui-api): add function to build job data from object

main
Tsu-ba-me 1 year ago
parent b31da693a5
commit 98eec8a10c
  1. 6
      striker-ui-api/src/lib/buildJobData.ts

@ -12,3 +12,9 @@ export const buildJobData = <T extends [string, unknown][]>({
return previous;
}, '')
.trim();
export const buildJobDataFromObject = <T extends Record<string, unknown>>({
obj,
...rest
}: Omit<Parameters<typeof buildJobData>[0], 'entries'> & { obj: T }) =>
buildJobData({ entries: Object.entries(obj), ...rest });

Loading…
Cancel
Save