fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/.eslint/index.js +23 -0
  2. package/.eslint/no-extra-parens-rule.js +17 -0
  3. package/.eslint/package.json +11 -0
  4. package/.eslintrc.js +13 -70
  5. package/.stylelintrc.js +5 -7
  6. package/dist/components/accordion.css +1 -1
  7. package/dist/components/accordion.js +26 -26
  8. package/dist/components/accordion.min.css +1 -1
  9. package/dist/components/accordion.min.js +2 -2
  10. package/dist/components/ad.css +1 -1
  11. package/dist/components/ad.min.css +1 -1
  12. package/dist/components/api.js +95 -94
  13. package/dist/components/api.min.js +2 -2
  14. package/dist/components/breadcrumb.css +1 -1
  15. package/dist/components/breadcrumb.min.css +1 -1
  16. package/dist/components/button.css +1 -1
  17. package/dist/components/button.min.css +1 -1
  18. package/dist/components/calendar.css +3 -3
  19. package/dist/components/calendar.js +181 -151
  20. package/dist/components/calendar.min.css +2 -2
  21. package/dist/components/calendar.min.js +2 -2
  22. package/dist/components/card.css +1 -1
  23. package/dist/components/card.min.css +1 -1
  24. package/dist/components/checkbox.css +1 -1
  25. package/dist/components/checkbox.js +14 -14
  26. package/dist/components/checkbox.min.css +1 -1
  27. package/dist/components/checkbox.min.js +2 -2
  28. package/dist/components/comment.css +1 -1
  29. package/dist/components/comment.min.css +1 -1
  30. package/dist/components/container.css +1 -1
  31. package/dist/components/container.min.css +1 -1
  32. package/dist/components/dimmer.css +1 -1
  33. package/dist/components/dimmer.js +23 -25
  34. package/dist/components/dimmer.min.css +1 -1
  35. package/dist/components/dimmer.min.js +2 -2
  36. package/dist/components/divider.css +1 -1
  37. package/dist/components/divider.min.css +1 -1
  38. package/dist/components/dropdown.css +1 -1
  39. package/dist/components/dropdown.js +252 -254
  40. package/dist/components/dropdown.min.css +1 -1
  41. package/dist/components/dropdown.min.js +2 -2
  42. package/dist/components/embed.css +1 -1
  43. package/dist/components/embed.js +27 -33
  44. package/dist/components/embed.min.css +1 -1
  45. package/dist/components/embed.min.js +2 -2
  46. package/dist/components/feed.css +1 -1
  47. package/dist/components/feed.min.css +1 -1
  48. package/dist/components/flag.css +1 -1
  49. package/dist/components/flag.min.css +1 -1
  50. package/dist/components/flyout.css +2 -2
  51. package/dist/components/flyout.js +50 -44
  52. package/dist/components/flyout.min.css +1 -1
  53. package/dist/components/flyout.min.js +2 -2
  54. package/dist/components/form.css +2 -2
  55. package/dist/components/form.js +187 -163
  56. package/dist/components/form.min.css +2 -2
  57. package/dist/components/form.min.js +2 -2
  58. package/dist/components/grid.css +1 -1
  59. package/dist/components/grid.min.css +1 -1
  60. package/dist/components/header.css +1 -1
  61. package/dist/components/header.min.css +1 -1
  62. package/dist/components/icon.css +1 -1
  63. package/dist/components/icon.min.css +1 -1
  64. package/dist/components/image.css +1 -1
  65. package/dist/components/image.min.css +1 -1
  66. package/dist/components/input.css +1 -1
  67. package/dist/components/input.min.css +1 -1
  68. package/dist/components/item.css +1 -1
  69. package/dist/components/item.min.css +1 -1
  70. package/dist/components/label.css +1 -1
  71. package/dist/components/label.min.css +1 -1
  72. package/dist/components/list.css +1 -1
  73. package/dist/components/list.min.css +1 -1
  74. package/dist/components/loader.css +1 -1
  75. package/dist/components/loader.min.css +1 -1
  76. package/dist/components/message.css +1 -1
  77. package/dist/components/message.min.css +1 -1
  78. package/dist/components/modal.css +1 -1
  79. package/dist/components/modal.js +49 -45
  80. package/dist/components/modal.min.css +1 -1
  81. package/dist/components/modal.min.js +2 -2
  82. package/dist/components/nag.css +1 -1
  83. package/dist/components/nag.js +22 -20
  84. package/dist/components/nag.min.css +1 -1
  85. package/dist/components/nag.min.js +2 -2
  86. package/dist/components/placeholder.css +1 -1
  87. package/dist/components/placeholder.min.css +1 -1
  88. package/dist/components/popup.css +1 -1
  89. package/dist/components/popup.js +71 -71
  90. package/dist/components/popup.min.css +1 -1
  91. package/dist/components/popup.min.js +2 -2
  92. package/dist/components/progress.css +1 -1
  93. package/dist/components/progress.js +46 -46
  94. package/dist/components/progress.min.css +1 -1
  95. package/dist/components/progress.min.js +2 -2
  96. package/dist/components/rail.css +1 -1
  97. package/dist/components/rail.min.css +1 -1
  98. package/dist/components/rating.css +1 -1
  99. package/dist/components/rating.js +15 -15
  100. package/dist/components/rating.min.css +1 -1
  101. package/dist/components/rating.min.js +2 -2
  102. package/dist/components/reset.css +1 -1
  103. package/dist/components/reset.min.css +1 -1
  104. package/dist/components/reveal.css +1 -1
  105. package/dist/components/reveal.min.css +1 -1
  106. package/dist/components/search.css +1 -1
  107. package/dist/components/search.js +69 -74
  108. package/dist/components/search.min.css +1 -1
  109. package/dist/components/search.min.js +2 -2
  110. package/dist/components/segment.css +1 -1
  111. package/dist/components/segment.min.css +1 -1
  112. package/dist/components/shape.css +1 -1
  113. package/dist/components/shape.js +39 -39
  114. package/dist/components/shape.min.css +1 -1
  115. package/dist/components/shape.min.js +2 -2
  116. package/dist/components/sidebar.css +1 -1
  117. package/dist/components/sidebar.js +39 -37
  118. package/dist/components/sidebar.min.css +1 -1
  119. package/dist/components/sidebar.min.js +2 -2
  120. package/dist/components/site.css +1 -1
  121. package/dist/components/site.js +22 -21
  122. package/dist/components/site.min.css +1 -1
  123. package/dist/components/site.min.js +2 -2
  124. package/dist/components/slider.js +69 -64
  125. package/dist/components/slider.min.js +2 -2
  126. package/dist/components/state.js +15 -15
  127. package/dist/components/state.min.js +2 -2
  128. package/dist/components/statistic.css +1 -1
  129. package/dist/components/statistic.min.css +1 -1
  130. package/dist/components/step.css +1 -1
  131. package/dist/components/step.min.css +1 -1
  132. package/dist/components/sticky.css +1 -1
  133. package/dist/components/sticky.js +25 -25
  134. package/dist/components/sticky.min.css +1 -1
  135. package/dist/components/sticky.min.js +2 -2
  136. package/dist/components/tab.css +1 -1
  137. package/dist/components/tab.js +55 -57
  138. package/dist/components/tab.min.css +1 -1
  139. package/dist/components/tab.min.js +2 -2
  140. package/dist/components/table.css +1 -1
  141. package/dist/components/table.min.css +1 -1
  142. package/dist/components/text.css +1 -1
  143. package/dist/components/text.min.css +1 -1
  144. package/dist/components/toast.css +1 -1
  145. package/dist/components/toast.js +57 -30
  146. package/dist/components/toast.min.css +1 -1
  147. package/dist/components/toast.min.js +2 -2
  148. package/dist/components/transition.css +7 -7
  149. package/dist/components/transition.js +45 -39
  150. package/dist/components/transition.min.css +1 -1
  151. package/dist/components/transition.min.js +2 -2
  152. package/dist/components/visibility.js +25 -25
  153. package/dist/components/visibility.min.js +2 -2
  154. package/dist/semantic.css +60 -60
  155. package/dist/semantic.js +1518 -1427
  156. package/dist/semantic.min.css +2 -2
  157. package/dist/semantic.min.js +2 -2
  158. package/examples/responsive.html +1 -1
  159. package/gulpfile.js +1 -1
  160. package/package.json +2 -1
  161. package/scripts/nightly-version.js +6 -4
  162. package/src/definitions/behaviors/api.js +94 -93
  163. package/src/definitions/behaviors/form.js +186 -162
  164. package/src/definitions/behaviors/state.js +14 -14
  165. package/src/definitions/behaviors/visibility.js +24 -24
  166. package/src/definitions/collections/menu.less +2 -2
  167. package/src/definitions/elements/button.less +2 -2
  168. package/src/definitions/elements/loader.less +4 -4
  169. package/src/definitions/elements/step.less +1 -1
  170. package/src/definitions/globals/site.js +21 -20
  171. package/src/definitions/modules/accordion.js +25 -25
  172. package/src/definitions/modules/calendar.js +180 -150
  173. package/src/definitions/modules/calendar.less +2 -2
  174. package/src/definitions/modules/checkbox.js +13 -13
  175. package/src/definitions/modules/dimmer.js +22 -24
  176. package/src/definitions/modules/dimmer.less +10 -10
  177. package/src/definitions/modules/dropdown.js +251 -253
  178. package/src/definitions/modules/embed.js +26 -32
  179. package/src/definitions/modules/flyout.js +49 -43
  180. package/src/definitions/modules/flyout.less +1 -1
  181. package/src/definitions/modules/modal.js +48 -44
  182. package/src/definitions/modules/nag.js +21 -19
  183. package/src/definitions/modules/popup.js +70 -70
  184. package/src/definitions/modules/progress.js +45 -45
  185. package/src/definitions/modules/rating.js +14 -14
  186. package/src/definitions/modules/search.js +68 -73
  187. package/src/definitions/modules/shape.js +38 -38
  188. package/src/definitions/modules/sidebar.js +38 -36
  189. package/src/definitions/modules/slider.js +68 -63
  190. package/src/definitions/modules/sticky.js +24 -24
  191. package/src/definitions/modules/tab.js +54 -56
  192. package/src/definitions/modules/toast.js +56 -29
  193. package/src/definitions/modules/transition.js +44 -38
  194. package/src/themes/amazon/elements/button.overrides +7 -7
  195. package/src/themes/default/collections/form.variables +1 -1
  196. package/src/themes/default/elements/reveal.variables +1 -1
  197. package/src/themes/default/globals/site.variables +1 -1
  198. package/src/themes/default/modules/dimmer.variables +6 -6
  199. package/src/themes/default/modules/modal.variables +1 -1
  200. package/src/themes/default/modules/slider.variables +4 -4
  201. package/src/themes/default/modules/toast.variables +2 -2
  202. package/src/themes/default/modules/transition.overrides +12 -12
  203. package/src/themes/flat/collections/form.overrides +2 -2
  204. package/src/themes/flat/globals/site.variables +1 -1
  205. package/src/themes/github/collections/form.overrides +2 -2
  206. package/src/themes/github/collections/menu.variables +1 -1
  207. package/src/themes/github/collections/message.overrides +3 -3
  208. package/src/themes/github/elements/input.overrides +2 -2
  209. package/src/themes/timeline/views/feed.overrides +3 -3
  210. package/src/themes/twitter/elements/button.overrides +2 -2
  211. package/tasks/README.md +1 -3
  212. package/tasks/admin/components/create.js +9 -16
  213. package/tasks/admin/components/init.js +7 -7
  214. package/tasks/admin/components/update.js +10 -10
  215. package/tasks/admin/distributions/create.js +16 -18
  216. package/tasks/admin/distributions/init.js +7 -7
  217. package/tasks/admin/distributions/update.js +10 -10
  218. package/tasks/admin/publish.js +1 -3
  219. package/tasks/admin/register.js +6 -6
  220. package/tasks/admin/release.js +1 -3
  221. package/tasks/build/assets.js +2 -2
  222. package/tasks/build/css.js +8 -3
  223. package/tasks/build/javascript.js +3 -1
  224. package/tasks/build.js +1 -1
  225. package/tasks/check-install.js +1 -1
  226. package/tasks/clean.js +1 -1
  227. package/tasks/collections/README.md +3 -5
  228. package/tasks/collections/admin.js +1 -1
  229. package/tasks/collections/docs.js +1 -1
  230. package/tasks/collections/install.js +1 -1
  231. package/tasks/collections/rtl.js +1 -1
  232. package/tasks/collections/various.js +1 -1
  233. package/tasks/config/admin/github.js +6 -8
  234. package/tasks/config/admin/templates/css-package.js +1 -1
  235. package/tasks/config/admin/templates/less-package.js +1 -1
  236. package/tasks/config/npm/gulpfile.js +7 -7
  237. package/tasks/config/project/config.js +14 -19
  238. package/tasks/config/project/install.js +35 -34
  239. package/tasks/config/project/release.js +15 -16
  240. package/tasks/config/tasks.js +18 -20
  241. package/tasks/config/user.js +5 -3
  242. package/tasks/docs/build.js +5 -3
  243. package/tasks/docs/metadata.js +7 -8
  244. package/tasks/docs/serve.js +6 -3
  245. package/tasks/install.js +39 -39
  246. package/tasks/rtl/build.js +1 -3
  247. package/tasks/rtl/watch.js +1 -3
  248. package/tasks/version.js +1 -3
  249. package/tasks/watch.js +1 -1
  250. package/test/.eslintrc.js +0 -4
  251. package/test/meteor/assets.js +1 -1
  252. package/test/modules/module.spec.js +15 -15
  253. package/test/modules/popup.spec.js +1 -1
  254. package/test/modules/search.spec.js +1 -1
  255. package/test/modules/tab.spec.js +1 -1
  256. package/test/modules/transition.spec.js +1 -1
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (typeof window != 'undefined' && window.Math == Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -25,11 +25,11 @@
25
25
 
26
26
  moduleSelector = $allModules.selector || '',
27
27
 
28
- time = new Date().getTime(),
28
+ time = Date.now(),
29
29
  performance = [],
30
30
 
31
31
  query = arguments[0],
32
- methodInvoked = (typeof query == 'string'),
32
+ methodInvoked = typeof query === 'string',
33
33
  queryArguments = [].slice.call(arguments, 1),
34
34
 
35
35
  returnedValue
@@ -37,7 +37,7 @@
37
37
 
38
38
  $allModules.each(function () {
39
39
  var
40
- settings = ($.isPlainObject(parameters))
40
+ settings = $.isPlainObject(parameters)
41
41
  ? $.extend(true, {}, $.fn.progress.settings, parameters)
42
42
  : $.extend({}, $.fn.progress.settings),
43
43
 
@@ -95,7 +95,7 @@
95
95
  var precision = 1;
96
96
  var ratio = min / total;
97
97
  while (precisionPower < 10) {
98
- ratio = ratio * precision;
98
+ ratio *= precision;
99
99
  if (ratio > 1) {
100
100
  break;
101
101
  }
@@ -107,11 +107,9 @@
107
107
  forceArray: function (element) {
108
108
  return Array.isArray(element)
109
109
  ? element
110
- : !isNaN(element)
110
+ : (!isNaN(element)
111
111
  ? [element]
112
- : typeof element == 'string'
113
- ? element.split(',')
114
- : [];
112
+ : (typeof element === 'string' ? element.split(',') : [])); // eslint-disable-line unicorn/no-nested-ternary
115
113
  },
116
114
  },
117
115
 
@@ -256,22 +254,25 @@
256
254
  return module.progressPoll;
257
255
  },
258
256
  total: function () {
259
- return (module.get.total() !== false);
257
+ return module.get.total() !== false;
260
258
  },
261
259
  },
262
260
 
263
261
  get: {
264
262
  text: function (templateText, index) {
263
+ if (!index) {
264
+ index = 0;
265
+ }
266
+
265
267
  var
266
- index_ = index || 0,
267
- value = module.get.value(index_),
268
+ value = module.get.value(index),
268
269
  total = module.get.total(),
269
- percent = (animating)
270
- ? module.get.displayPercent(index_)
271
- : module.get.percent(index_),
272
- left = (total !== false)
270
+ percent = animating
271
+ ? module.get.displayPercent(index)
272
+ : module.get.percent(index),
273
+ left = total !== false
273
274
  ? Math.max(0, total - value)
274
- : (100 - percent)
275
+ : 100 - percent
275
276
  ;
276
277
  templateText = templateText || '';
277
278
  templateText = templateText
@@ -279,7 +280,7 @@
279
280
  .replace('{total}', total || 0)
280
281
  .replace('{left}', left)
281
282
  .replace('{percent}', percent)
282
- .replace('{bar}', settings.text.bars[index_] || '')
283
+ .replace('{bar}', settings.text.bars[index] || '')
283
284
  ;
284
285
  module.verbose('Adding variables to progress bar text', templateText);
285
286
 
@@ -322,10 +323,10 @@
322
323
  },
323
324
 
324
325
  numericValue: function (value) {
325
- return (typeof value === 'string')
326
- ? (value.replace(/[^\d.]/g, '') !== '')
327
- ? +(value.replace(/[^\d.]/g, ''))
328
- : false
326
+ return typeof value === 'string'
327
+ ? (value.replace(/[^\d.]/g, '') !== ''
328
+ ? +value.replace(/[^\d.]/g, '')
329
+ : false)
329
330
  : value;
330
331
  },
331
332
 
@@ -354,21 +355,21 @@
354
355
  barWidth = $bar.width(),
355
356
  totalWidth = $module.width(),
356
357
  minDisplay = parseInt($bar.css('min-width'), 10),
357
- displayPercent = (barWidth > minDisplay)
358
- ? (barWidth / totalWidth * 100)
358
+ displayPercent = barWidth > minDisplay
359
+ ? (barWidth / totalWidth) * 100
359
360
  : module.percent
360
361
  ;
361
362
 
362
- return (settings.precision > 0)
363
+ return settings.precision > 0
363
364
  ? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision)
364
365
  : Math.round(displayPercent);
365
366
  },
366
367
 
367
368
  percent: function (index) {
368
- return module.percent && module.percent[index || 0] || 0;
369
+ return (module.percent && module.percent[index || 0]) || 0;
369
370
  },
370
371
  value: function (index) {
371
- return module.nextValue || module.value && module.value[index || 0] || 0;
372
+ return module.nextValue || (module.value && module.value[index || 0]) || 0;
372
373
  },
373
374
  total: function () {
374
375
  return module.total !== undefined ? module.total : false;
@@ -451,7 +452,7 @@
451
452
  var barCounts = $bars.length;
452
453
  var isMultiple = barCounts > 1;
453
454
  var percents = values.map(function (value, index) {
454
- var allZero = (index === barCounts - 1 && valuesSum === 0);
455
+ var allZero = index === barCounts - 1 && valuesSum === 0;
455
456
  var $bar = $($bars[index]);
456
457
  if (value === 0 && isMultiple && !allZero) {
457
458
  $bar.css('display', 'none');
@@ -486,7 +487,7 @@
486
487
  },
487
488
  duration: function (duration) {
488
489
  duration = duration || settings.duration;
489
- duration = (typeof duration == 'number')
490
+ duration = typeof duration === 'number'
490
491
  ? duration + 'ms'
491
492
  : duration;
492
493
  module.verbose('Setting progress bar transition duration', duration);
@@ -498,11 +499,11 @@
498
499
  },
499
500
  percent: function (percents) {
500
501
  percents = module.helper.forceArray(percents).map(function (percent) {
501
- percent = (typeof percent == 'string')
502
- ? +(percent.replace('%', ''))
502
+ percent = typeof percent === 'string'
503
+ ? +percent.replace('%', '')
503
504
  : percent;
504
505
 
505
- return (settings.limitValues)
506
+ return settings.limitValues
506
507
  ? Math.max(0, Math.min(100, percent))
507
508
  : percent;
508
509
  });
@@ -521,13 +522,13 @@
521
522
  } else {
522
523
  var autoPrecision = settings.precision > 0
523
524
  ? settings.precision
524
- : isMultipleValues
525
+ : (isMultipleValues
525
526
  ? module.helper.derivePrecision(Math.min.apply(null, module.value), module.total)
526
- : 0;
527
+ : 0);
527
528
 
528
529
  // round display percentage
529
530
  var roundedPercents = percents.map(function (percent) {
530
- return (autoPrecision > 0)
531
+ return autoPrecision > 0
531
532
  ? Math.round(percent * (10 * autoPrecision)) / (10 * autoPrecision)
532
533
  : Math.round(percent)
533
534
  ;
@@ -535,7 +536,7 @@
535
536
  module.percent = roundedPercents;
536
537
  if (hasTotal) {
537
538
  module.value = percents.map(function (percent) {
538
- return (autoPrecision > 0)
539
+ return autoPrecision > 0
539
540
  ? Math.round((percent / 100) * module.total * (10 * autoPrecision)) / (10 * autoPrecision)
540
541
  : Math.round((percent / 100) * module.total * 10) / 10;
541
542
  });
@@ -574,7 +575,6 @@
574
575
  module.set.state();
575
576
  },
576
577
  label: function (text) {
577
- text = text || '';
578
578
  if (text) {
579
579
  text = module.get.text(text);
580
580
  module.verbose('Setting label to text', text);
@@ -582,7 +582,7 @@
582
582
  }
583
583
  },
584
584
  state: function (percent) {
585
- percent = (percent !== undefined)
585
+ percent = percent !== undefined
586
586
  ? percent
587
587
  : module.helper.sum(module.percent);
588
588
  if (percent === 100) {
@@ -807,7 +807,7 @@
807
807
  previousTime
808
808
  ;
809
809
  if (settings.performance) {
810
- currentTime = new Date().getTime();
810
+ currentTime = Date.now();
811
811
  previousTime = time || currentTime;
812
812
  executionTime = currentTime - previousTime;
813
813
  time = currentTime;
@@ -858,11 +858,11 @@
858
858
  ;
859
859
  passedArguments = passedArguments || queryArguments;
860
860
  context = context || element;
861
- if (typeof query == 'string' && object !== undefined) {
862
- query = query.split(/[\. ]/);
861
+ if (typeof query === 'string' && object !== undefined) {
862
+ query = query.split(/[ .]/);
863
863
  maxDepth = query.length - 1;
864
864
  $.each(query, function (depth, value) {
865
- var camelCaseValue = (depth != maxDepth)
865
+ var camelCaseValue = depth != maxDepth
866
866
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
867
867
  : query
868
868
  ;
@@ -915,7 +915,7 @@
915
915
  }
916
916
  });
917
917
 
918
- return (returnedValue !== undefined)
918
+ return returnedValue !== undefined
919
919
  ? returnedValue
920
920
  : this;
921
921
  };
@@ -945,7 +945,7 @@
945
945
 
946
946
  label: 'percent',
947
947
  precision: 0,
948
- framerate: (1000 / 30), /// 30 fps
948
+ framerate: 1000 / 30, /// 30 fps
949
949
 
950
950
  percent: false,
951
951
  total: false,
@@ -972,7 +972,7 @@
972
972
  },
973
973
 
974
974
  regExp: {
975
- variable: /\{\$*[a-z0-9]+\}/gi,
975
+ variable: /{\$*[\da-z]+}/gi,
976
976
  },
977
977
 
978
978
  metadata: {
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (typeof window != 'undefined' && window.Math == Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -24,17 +24,17 @@
24
24
  $allModules = $(this),
25
25
  moduleSelector = $allModules.selector || '',
26
26
 
27
- time = new Date().getTime(),
27
+ time = Date.now(),
28
28
  performance = [],
29
29
 
30
30
  query = arguments[0],
31
- methodInvoked = (typeof query == 'string'),
31
+ methodInvoked = typeof query === 'string',
32
32
  queryArguments = [].slice.call(arguments, 1),
33
33
  returnedValue
34
34
  ;
35
35
  $allModules.each(function () {
36
36
  var
37
- settings = ($.isPlainObject(parameters))
37
+ settings = $.isPlainObject(parameters)
38
38
  ? $.extend(true, {}, $.fn.rating.settings, parameters)
39
39
  : $.extend({}, $.fn.rating.settings),
40
40
 
@@ -143,8 +143,8 @@
143
143
  $activeIcon = $(this),
144
144
  currentRating = module.get.rating(),
145
145
  rating = $icon.index($activeIcon) + 1,
146
- canClear = (settings.clearable == 'auto')
147
- ? ($icon.length === 1)
146
+ canClear = settings.clearable == 'auto'
147
+ ? $icon.length === 1
148
148
  : settings.clearable
149
149
  ;
150
150
  if (canClear && currentRating == rating) {
@@ -249,8 +249,8 @@
249
249
  rating: function (rating) {
250
250
  var
251
251
  ratingIndex = Math.floor(
252
- (rating - 1 >= 0)
253
- ? (rating - 1)
252
+ rating - 1 >= 0
253
+ ? rating - 1
254
254
  : 0
255
255
  ),
256
256
  $activeIcon = $icon.eq(ratingIndex),
@@ -356,7 +356,7 @@
356
356
  previousTime
357
357
  ;
358
358
  if (settings.performance) {
359
- currentTime = new Date().getTime();
359
+ currentTime = Date.now();
360
360
  previousTime = time || currentTime;
361
361
  executionTime = currentTime - previousTime;
362
362
  time = currentTime;
@@ -385,7 +385,7 @@
385
385
  title += ' \'' + moduleSelector + '\'';
386
386
  }
387
387
  if ($allModules.length > 1) {
388
- title += ' ' + '(' + $allModules.length + ')';
388
+ title += ' (' + $allModules.length + ')';
389
389
  }
390
390
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
391
391
  console.groupCollapsed(title);
@@ -410,11 +410,11 @@
410
410
  ;
411
411
  passedArguments = passedArguments || queryArguments;
412
412
  context = context || element;
413
- if (typeof query == 'string' && object !== undefined) {
414
- query = query.split(/[\. ]/);
413
+ if (typeof query === 'string' && object !== undefined) {
414
+ query = query.split(/[ .]/);
415
415
  maxDepth = query.length - 1;
416
416
  $.each(query, function (depth, value) {
417
- var camelCaseValue = (depth != maxDepth)
417
+ var camelCaseValue = depth != maxDepth
418
418
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
419
419
  : query
420
420
  ;
@@ -464,7 +464,7 @@
464
464
  }
465
465
  });
466
466
 
467
- return (returnedValue !== undefined)
467
+ return returnedValue !== undefined
468
468
  ? returnedValue
469
469
  : this;
470
470
  };