function stripUnicodeBOM(value) {
	if (!hasUnicodeBOM(value)) {
		return value;
	}

	if (typeof value === "string") {
		/*
		 * Check Unicode BOM.
		 * In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
		 * http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters
		 */
		return value.slice(1);
	}

	/*
	 * In a Uint8Array, the BOM is represented by three bytes: 0xEF, 0xBB, and 0xBF,
	 * so we can just remove the first three bytes.
	 */
	return value.slice(3);
}
Strips Unicode BOM from the given value.
@param {string|Uint8Array} value The value to remove the BOM from.
@returns {string|Uint8Array} The stripped value.