]> git.proxmox.com Git - mirror_xterm.js.git/blob - src/utils/Generic.js
Fix tests
[mirror_xterm.js.git] / src / utils / Generic.js
1 /**
2 * xterm.js: xterm, in the browser
3 * Copyright (c) 2016, SourceLair Private Company <www.sourcelair.com> (MIT License)
4 */
5
6 /**
7 * Generic utilities module. This module contains generic methods that can be helpful at
8 * different parts of the code base.
9 * @module xterm/utils/Generic
10 */
11
12 /**
13 * Return if the given array contains the given element
14 * @param {Array} array The array to search for the given element.
15 * @param {Object} el The element to look for into the array
16 */
17 export let contains = function(arr, el) {
18 return arr.indexOf(el) >= 0;
19 };