vue-socials
Version:
Social media share buttons and counts for Vue.js
19 lines (13 loc) • 466 B
JavaScript
import { isArray } from './inspect.js';
/**
* A simple function to format array to a comma-separated list.
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any
function getSeparatedList(array) {
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ',';
if (isArray(array)) {
return array.join(separator);
}
return '';
}
export default getSeparatedList;