mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
refactor(utils): reorganize some chunks
This commit is contained in:
committed by
Manu MA
parent
ca9ec3e18a
commit
f9483a0c13
@ -2,13 +2,6 @@ import { EventEmitter } from '@stencil/core';
|
||||
|
||||
import { Side } from '../interface';
|
||||
|
||||
export function reorderArray(array: any[], indexes: {from: number, to: number}): any[] {
|
||||
const element = array[indexes.from];
|
||||
array.splice(indexes.from, 1);
|
||||
array.splice(indexes.to, 0, element);
|
||||
return array;
|
||||
}
|
||||
|
||||
export function rIC(callback: () => void) {
|
||||
if ('requestIdleCallback' in window) {
|
||||
(window as any).requestIdleCallback(callback);
|
||||
|
||||
Reference in New Issue
Block a user