@esm-js/jira.js
Version:
A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.
12 lines (9 loc) • 316 B
text/typescript
export function paramSerializer(key: string, values?: string | string[] | number | number[]) {
if (typeof values === 'string' || typeof values === 'number') {
return `${key}=${values}`;
}
if (!values?.length) {
return undefined;
}
return () => values.map(value => `${key}=${value}`).join('&');
}