UNPKG

vue-select

Version:

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.

18 lines (14 loc) 287 B
/** * @param sortable {object} * @return {string} */ function sortAndStringify(sortable) { const ordered = {} Object.keys(sortable) .sort() .forEach((key) => { ordered[key] = sortable[key] }) return JSON.stringify(ordered) } export default sortAndStringify