mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 23:06:14 -04:00
feat(list-converter): a small converter who deals with column based data and do some stuff with it (#387)
* feat(list-converter): a small converter who deals with column based data and do some stuff with it * Update src/tools/list-converter/index.ts * Update src/tools/list-converter/index.ts * Update src/tools/list-converter/index.ts --------- Co-authored-by: Corentin THOMASSET <corentin.thomasset74@gmail.com> fix(list-format): fix e2e
This commit is contained in:
parent
ce3150c65d
commit
83a7b3bae9
9 changed files with 441 additions and 139 deletions
7
src/utils/array.ts
Normal file
7
src/utils/array.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export { byOrder };
|
||||
|
||||
function byOrder({ order }: { order: 'asc' | 'desc' | null | undefined }) {
|
||||
return (a: string, b: string) => {
|
||||
return order === 'asc' ? a.localeCompare(b) : b.localeCompare(a);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue