test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export function move<T>(arr: T[], from: number, to: number): T[] {
|
||||
if (
|
||||
from === to ||
|
||||
from < 0 ||
|
||||
to < 0 ||
|
||||
from >= arr.length ||
|
||||
to >= arr.length
|
||||
) {
|
||||
return arr
|
||||
}
|
||||
const next = arr.slice()
|
||||
const [sp] = next.splice(from, 1)
|
||||
next.splice(to, 0, sp)
|
||||
return next
|
||||
}
|
||||
Reference in New Issue
Block a user