refactor(utils): reorganize some chunks

This commit is contained in:
Manu Mtz.-Almeida
2018-12-28 18:54:08 +01:00
committed by Manu MA
parent ca9ec3e18a
commit f9483a0c13
22 changed files with 41 additions and 118 deletions

View File

@ -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);