]> git.proxmox.com Git - mirror_xterm.js.git/blob - src/utils/Generic.ts
Merge pull request #723 from Tyriar/699_linux_middle_click
[mirror_xterm.js.git] / src / utils / Generic.ts
1 /**
2 * Generic utilities module with methods that can be helpful at different parts of the code base.
3 * @module xterm/utils/Generic
4 * @license MIT
5 */
6
7 /**
8 * Return if the given array contains the given element
9 * @param {Array} array The array to search for the given element.
10 * @param {Object} el The element to look for into the array
11 */
12 export function contains(arr: any[], el: any) {
13 return arr.indexOf(el) >= 0;
14 };