]>
git.proxmox.com Git - mirror_xterm.js.git/blob - src/utils/Generic.js
2 * xterm.js: xterm, in the browser
3 * Copyright (c) 2016, SourceLair Private Company <www.sourcelair.com> (MIT License)
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
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
17 export let contains = function(arr
, el
) {
18 return arr
.indexOf(el
) >= 0;