JAVASCRIPT   13

index js

Guest on 6th July 2022 01:09:04 AM

  1. import $ from 'jquery'
  2. import Alert from './alert'
  3. import Button from './button'
  4. import Carousel from './carousel'
  5. import Collapse from './collapse'
  6. import Dropdown from './dropdown'
  7. import Modal from './modal'
  8. import Popover from './popover'
  9. import Scrollspy from './scrollspy'
  10. import Tab from './tab'
  11. import Toast from './toast'
  12. import Tooltip from './tooltip'
  13. import Util from './util'
  14.  
  15. /**
  16.  * --------------------------------------------------------------------------
  17.  * Bootstrap (v4.3.1): index.js
  18.  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  19.  * --------------------------------------------------------------------------
  20.  */
  21.  
  22. (() => {
  23.   if (typeof $ === 'undefined') {
  24.     throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
  25.   }
  26.  
  27.   const version = $.fn.jquery.split(' ')[0].split('.')
  28.   const minMajor = 1
  29.   const ltMajor = 2
  30.   const minMinor = 9
  31.   const minPatch = 1
  32.   const maxMajor = 4
  33.  
  34.   if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
  35.     throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
  36.   }
  37. })()
  38.  
  39. export {
  40.   Util,
  41.   Alert,
  42.   Button,
  43.   Carousel,
  44.   Collapse,
  45.   Dropdown,
  46.   Modal,
  47.   Popover,
  48.   Scrollspy,
  49.   Tab,
  50.   Toast,
  51.   Tooltip
  52. }

Raw Paste


Login or Register to edit or fork this paste. It's free.