Update fnTools.ts
This commit is contained in:
parent
481e112b53
commit
0bede8fce8
@ -169,3 +169,13 @@ export function getIndexOfFileList(name: string, list: Array<File>): number {
|
|||||||
-1
|
-1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a copy of the array by removing one position by index.
|
||||||
|
* @param {Array} list
|
||||||
|
* @param {number} index
|
||||||
|
* @return {Array} list
|
||||||
|
*/
|
||||||
|
export function deleteArrayElementByIndex(list: Array<any>, index: number) {
|
||||||
|
return list.filter((item, itemIndex) => itemIndex !== index);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user