function bootstrapVersion(options) {
  if (options.bootstrap) {
    return options.bootstrap;
  }
  if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {
    return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);
  }
  if (window.bootstrap && window.bootstrap.Collapse) {
    return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);
  }
  return 0;
}
Determines the major version number of bootstrap.
@param {object} options - The options to check for bootstrap version.
@param {string} options.bootstrap - The bootstrap version to use.
@returns {number} - The bootstrap version.