intial
This commit is contained in:
14
node_modules/svelte-eslint-parser/lib/parser/sort.js
generated
vendored
Normal file
14
node_modules/svelte-eslint-parser/lib/parser/sort.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Sort tokens
|
||||
*/
|
||||
export function sortNodes(tokens) {
|
||||
if (!tokens) {
|
||||
return [];
|
||||
}
|
||||
return tokens.sort((a, b) => {
|
||||
if (a.range[0] !== b.range[0]) {
|
||||
return a.range[0] - b.range[0];
|
||||
}
|
||||
return a.range[1] - b.range[1];
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user