]> git.proxmox.com Git - mirror_xterm.js.git/blob - src/utils/Generic.js
5097b610758581556c0dce6643814e1a3f4183f1
[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 export let contains = function(el, arr) {
13 for (var i = 0; i < arr.length; i += 1) {
14 if (el === arr[i]) {
15 return true;
16 }
17 }
18 return false;
19 };