@thednp/shorty 1.0.2 → 2.0.0-alpha2

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 (903) hide show
  1. package/README.md +193 -202
  2. package/dist/shorty.cjs.js +1592 -0
  3. package/dist/shorty.cjs.js.map +7 -0
  4. package/dist/shorty.cjs.min.js +3 -0
  5. package/dist/shorty.cjs.min.js.map +7 -0
  6. package/dist/shorty.es5.js +1593 -0
  7. package/dist/shorty.es5.js.map +7 -0
  8. package/dist/shorty.es5.min.js +4 -0
  9. package/dist/shorty.es5.min.js.map +7 -0
  10. package/dist/shorty.js +1494 -2550
  11. package/dist/shorty.js.map +7 -0
  12. package/dist/shorty.min.js +3 -2
  13. package/dist/shorty.min.js.map +7 -0
  14. package/package.json +30 -30
  15. package/src/attr/getAttribute.js +2 -9
  16. package/src/attr/getAttribute.js.map +1 -0
  17. package/src/attr/getAttribute.ts +10 -0
  18. package/src/attr/getAttributeNS.js +2 -10
  19. package/src/attr/getAttributeNS.js.map +1 -0
  20. package/src/attr/getAttributeNS.ts +11 -0
  21. package/src/attr/hasAttribute.js +2 -9
  22. package/src/attr/hasAttribute.js.map +1 -0
  23. package/src/attr/hasAttribute.ts +9 -0
  24. package/src/attr/hasAttributeNS.js +2 -10
  25. package/src/attr/hasAttributeNS.js.map +1 -0
  26. package/src/attr/hasAttributeNS.ts +11 -0
  27. package/src/attr/removeAttribute.js +2 -9
  28. package/src/attr/removeAttribute.js.map +1 -0
  29. package/src/attr/removeAttribute.ts +8 -0
  30. package/src/attr/removeAttributeNS.js +2 -10
  31. package/src/attr/removeAttributeNS.js.map +1 -0
  32. package/src/attr/removeAttributeNS.ts +10 -0
  33. package/src/attr/setAttribute.js +2 -10
  34. package/src/attr/setAttribute.js.map +1 -0
  35. package/src/attr/setAttribute.ts +10 -0
  36. package/src/attr/setAttributeNS.js +2 -11
  37. package/src/attr/setAttributeNS.js.map +1 -0
  38. package/src/attr/setAttributeNS.ts +11 -0
  39. package/src/blocks/documentBody.js +2 -5
  40. package/src/blocks/documentBody.js.map +1 -0
  41. package/src/blocks/documentBody.ts +5 -0
  42. package/src/blocks/documentElement.js +2 -5
  43. package/src/blocks/documentElement.js.map +1 -0
  44. package/src/blocks/documentElement.ts +5 -0
  45. package/src/blocks/documentHead.js +2 -5
  46. package/src/blocks/documentHead.js.map +1 -0
  47. package/src/blocks/documentHead.ts +5 -0
  48. package/src/boolean/isApple.js +7 -13
  49. package/src/boolean/isApple.js.map +1 -0
  50. package/src/boolean/isApple.ts +14 -0
  51. package/src/boolean/isFirefox.js +3 -10
  52. package/src/boolean/isFirefox.js.map +1 -0
  53. package/src/boolean/isFirefox.ts +9 -0
  54. package/src/boolean/isMobile.js +12 -20
  55. package/src/boolean/isMobile.js.map +1 -0
  56. package/src/boolean/isMobile.ts +19 -0
  57. package/src/boolean/support3DTransform.js +3 -9
  58. package/src/boolean/support3DTransform.js.map +1 -0
  59. package/src/boolean/support3DTransform.ts +10 -0
  60. package/src/boolean/supportAnimation.js +3 -9
  61. package/src/boolean/supportAnimation.js.map +1 -0
  62. package/src/boolean/supportAnimation.ts +8 -0
  63. package/src/boolean/supportPassive.js +18 -28
  64. package/src/boolean/supportPassive.js.map +1 -0
  65. package/src/boolean/supportPassive.ts +28 -0
  66. package/src/boolean/supportTouch.js +2 -7
  67. package/src/boolean/supportTouch.js.map +1 -0
  68. package/src/boolean/supportTouch.ts +7 -0
  69. package/src/boolean/supportTransform.js +3 -9
  70. package/src/boolean/supportTransform.js.map +1 -0
  71. package/src/boolean/supportTransform.ts +8 -0
  72. package/src/boolean/supportTransition.js +3 -9
  73. package/src/boolean/supportTransition.js.map +1 -0
  74. package/src/boolean/supportTransition.ts +8 -0
  75. package/src/class/addClass.js +4 -10
  76. package/src/class/addClass.js.map +1 -0
  77. package/src/class/addClass.ts +11 -0
  78. package/src/class/hasClass.js +4 -10
  79. package/src/class/hasClass.js.map +1 -0
  80. package/src/class/hasClass.ts +11 -0
  81. package/src/class/removeClass.js +4 -10
  82. package/src/class/removeClass.js.map +1 -0
  83. package/src/class/removeClass.ts +11 -0
  84. package/src/event/off.js +4 -9
  85. package/src/event/off.js.map +1 -0
  86. package/src/event/off.ts +12 -0
  87. package/src/event/on.js +4 -9
  88. package/src/event/on.js.map +1 -0
  89. package/src/event/on.ts +12 -0
  90. package/src/event/one.js +12 -23
  91. package/src/event/one.js.map +1 -0
  92. package/src/event/one.ts +25 -0
  93. package/src/get/getBoundingClientRect.js +22 -37
  94. package/src/get/getBoundingClientRect.js.map +1 -0
  95. package/src/get/getBoundingClientRect.ts +38 -0
  96. package/src/get/getDocument.js +13 -16
  97. package/src/get/getDocument.js.map +1 -0
  98. package/src/get/getDocument.ts +23 -0
  99. package/src/get/getDocumentBody.js +5 -10
  100. package/src/get/getDocumentBody.js.map +1 -0
  101. package/src/get/getDocumentBody.ts +13 -0
  102. package/src/get/getDocumentElement.js +5 -11
  103. package/src/get/getDocumentElement.js.map +1 -0
  104. package/src/get/getDocumentElement.ts +13 -0
  105. package/src/get/getDocumentHead.js +5 -10
  106. package/src/get/getDocumentHead.js.map +1 -0
  107. package/src/get/getDocumentHead.ts +12 -0
  108. package/src/get/getElementAnimationDelay.js +11 -21
  109. package/src/get/getElementAnimationDelay.js.map +1 -0
  110. package/src/get/getElementAnimationDelay.ts +22 -0
  111. package/src/get/getElementAnimationDuration.js +11 -20
  112. package/src/get/getElementAnimationDuration.js.map +1 -0
  113. package/src/get/getElementAnimationDuration.ts +22 -0
  114. package/src/get/getElementStyle.js +7 -20
  115. package/src/get/getElementStyle.js.map +1 -0
  116. package/src/get/getElementStyle.ts +24 -0
  117. package/src/get/getElementTransitionDelay.js +11 -20
  118. package/src/get/getElementTransitionDelay.js.map +1 -0
  119. package/src/get/getElementTransitionDelay.ts +22 -0
  120. package/src/get/getElementTransitionDuration.js +11 -20
  121. package/src/get/getElementTransitionDuration.js.map +1 -0
  122. package/src/get/getElementTransitionDuration.ts +22 -0
  123. package/src/get/getNodeScroll.js +8 -16
  124. package/src/get/getNodeScroll.js.map +1 -0
  125. package/src/get/getNodeScroll.ts +20 -0
  126. package/src/get/getParentNode.js +14 -23
  127. package/src/get/getParentNode.js.map +1 -0
  128. package/src/get/getParentNode.ts +27 -0
  129. package/src/get/getRectRelativeToOffsetParent.js +20 -32
  130. package/src/get/getRectRelativeToOffsetParent.js.map +1 -0
  131. package/src/get/getRectRelativeToOffsetParent.ts +39 -0
  132. package/src/get/getUID.js +31 -34
  133. package/src/get/getUID.js.map +1 -0
  134. package/src/get/getUID.ts +42 -0
  135. package/src/get/getWindow.js +12 -29
  136. package/src/get/getWindow.js.map +1 -0
  137. package/src/get/getWindow.ts +22 -0
  138. package/src/index.js +416 -475
  139. package/src/index.js.map +1 -0
  140. package/src/index.ts +448 -0
  141. package/src/interface/boundingClientRect.js +1 -0
  142. package/src/interface/boundingClientRect.js.map +1 -0
  143. package/src/interface/boundingClientRect.ts +10 -0
  144. package/src/interface/css4Declaration.js +1 -0
  145. package/src/interface/css4Declaration.js.map +1 -0
  146. package/src/interface/css4Declaration.ts +3 -0
  147. package/src/interface/customElement.js +1 -0
  148. package/src/interface/customElement.js.map +1 -0
  149. package/src/interface/customElement.ts +8 -0
  150. package/src/interface/navigatorUA.js +1 -0
  151. package/src/interface/navigatorUA.js.map +1 -0
  152. package/src/interface/navigatorUA.ts +15 -0
  153. package/src/interface/offsetRect.js +1 -0
  154. package/src/interface/offsetRect.js.map +1 -0
  155. package/src/interface/offsetRect.ts +6 -0
  156. package/src/interface/originalEvent.js +1 -0
  157. package/src/interface/originalEvent.js.map +1 -0
  158. package/src/interface/originalEvent.ts +3 -0
  159. package/src/is/isArray.js +2 -8
  160. package/src/is/isArray.js.map +1 -0
  161. package/src/is/isArray.ts +9 -0
  162. package/src/is/isCanvas.js +2 -0
  163. package/src/is/isCanvas.js.map +1 -0
  164. package/src/is/isCanvas.ts +11 -0
  165. package/src/is/isCustomElement.js +2 -8
  166. package/src/is/isCustomElement.js.map +1 -0
  167. package/src/is/isCustomElement.ts +12 -0
  168. package/src/is/isDocument.js +2 -10
  169. package/src/is/isDocument.js.map +1 -0
  170. package/src/is/isDocument.ts +10 -0
  171. package/src/is/isElement.js +2 -22
  172. package/src/is/isElement.js.map +1 -0
  173. package/src/is/isElement.ts +22 -0
  174. package/src/is/isElementInScrollRange.js +11 -20
  175. package/src/is/isElementInScrollRange.js.map +1 -0
  176. package/src/is/isElementInScrollRange.ts +20 -0
  177. package/src/is/isElementInViewport.js +11 -26
  178. package/src/is/isElementInViewport.js.map +1 -0
  179. package/src/is/isElementInViewport.ts +20 -0
  180. package/src/is/isElementsArray.js +4 -12
  181. package/src/is/isElementsArray.js.map +1 -0
  182. package/src/is/isElementsArray.ts +13 -0
  183. package/src/is/isFunction.js +2 -8
  184. package/src/is/isFunction.js.map +1 -0
  185. package/src/is/isFunction.ts +10 -0
  186. package/src/is/isHTMLCollection.js +2 -8
  187. package/src/is/isHTMLCollection.js.map +1 -0
  188. package/src/is/isHTMLCollection.ts +10 -0
  189. package/src/is/isHTMLElement.js +2 -9
  190. package/src/is/isHTMLElement.js.map +1 -0
  191. package/src/is/isHTMLElement.ts +10 -0
  192. package/src/is/isHTMLImageElement.js +2 -8
  193. package/src/is/isHTMLImageElement.js.map +1 -0
  194. package/src/is/isHTMLImageElement.ts +9 -0
  195. package/src/is/isMap.js +2 -0
  196. package/src/is/isMap.js.map +1 -0
  197. package/src/is/isMap.ts +8 -0
  198. package/src/is/isMedia.js +5 -14
  199. package/src/is/isMedia.js.map +1 -0
  200. package/src/is/isMedia.ts +18 -0
  201. package/src/is/isNode.js +2 -9
  202. package/src/is/isNode.js.map +1 -0
  203. package/src/is/isNode.ts +11 -0
  204. package/src/is/isNodeList.js +2 -9
  205. package/src/is/isNodeList.js.map +1 -0
  206. package/src/is/isNodeList.ts +11 -0
  207. package/src/is/isNumber.js +2 -8
  208. package/src/is/isNumber.js.map +1 -0
  209. package/src/is/isNumber.ts +9 -0
  210. package/src/is/isObject.js +2 -0
  211. package/src/is/isObject.js.map +1 -0
  212. package/src/is/isObject.ts +9 -0
  213. package/src/is/isRTL.js +3 -9
  214. package/src/is/isRTL.js.map +1 -0
  215. package/src/is/isRTL.ts +10 -0
  216. package/src/is/isSVGElement.js +2 -11
  217. package/src/is/isSVGElement.js.map +1 -0
  218. package/src/is/isSVGElement.ts +11 -0
  219. package/src/is/isScaledElement.js +9 -17
  220. package/src/is/isScaledElement.js.map +1 -0
  221. package/src/is/isScaledElement.ts +16 -0
  222. package/src/is/isShadowRoot.js +2 -9
  223. package/src/is/isShadowRoot.js.map +1 -0
  224. package/src/is/isShadowRoot.ts +10 -0
  225. package/src/is/isString.js +2 -8
  226. package/src/is/isString.js.map +1 -0
  227. package/src/is/isString.ts +9 -0
  228. package/src/is/isTableElement.js +2 -11
  229. package/src/is/isTableElement.js.map +1 -0
  230. package/src/is/isTableElement.ts +12 -0
  231. package/src/is/isWeakMap.js +2 -0
  232. package/src/is/isWeakMap.js.map +1 -0
  233. package/src/is/isWeakMap.ts +9 -0
  234. package/src/is/isWindow.js +2 -9
  235. package/src/is/isWindow.js.map +1 -0
  236. package/src/is/isWindow.ts +10 -0
  237. package/src/misc/ArrayFrom.js +2 -8
  238. package/src/misc/ArrayFrom.js.map +1 -0
  239. package/src/misc/ArrayFrom.ts +11 -0
  240. package/src/misc/Float32ArrayFrom.js +2 -7
  241. package/src/misc/Float32ArrayFrom.js.map +1 -0
  242. package/src/misc/Float32ArrayFrom.ts +9 -0
  243. package/src/misc/Float64ArrayFrom.js +2 -7
  244. package/src/misc/Float64ArrayFrom.js.map +1 -0
  245. package/src/misc/Float64ArrayFrom.ts +9 -0
  246. package/src/misc/ObjectAssign.js +2 -7
  247. package/src/misc/ObjectAssign.js.map +1 -0
  248. package/src/misc/ObjectAssign.ts +11 -0
  249. package/src/misc/ObjectEntries.js +2 -7
  250. package/src/misc/ObjectEntries.js.map +1 -0
  251. package/src/misc/ObjectEntries.ts +8 -0
  252. package/src/misc/ObjectKeys.js +2 -7
  253. package/src/misc/ObjectKeys.js.map +1 -0
  254. package/src/misc/ObjectKeys.ts +8 -0
  255. package/src/misc/ObjectValues.js +2 -7
  256. package/src/misc/ObjectValues.js.map +1 -0
  257. package/src/misc/ObjectValues.ts +8 -0
  258. package/src/misc/OriginalEvent.js +13 -19
  259. package/src/misc/OriginalEvent.js.map +1 -0
  260. package/src/misc/OriginalEvent.ts +24 -0
  261. package/src/misc/createElement.js +24 -27
  262. package/src/misc/createElement.js.map +1 -0
  263. package/src/misc/createElement.ts +39 -0
  264. package/src/misc/createElementNS.js +24 -30
  265. package/src/misc/createElementNS.js.map +1 -0
  266. package/src/misc/createElementNS.ts +44 -0
  267. package/src/misc/data.js +35 -78
  268. package/src/misc/data.js.map +1 -0
  269. package/src/misc/data.ts +81 -0
  270. package/src/misc/dispatchEvent.js +2 -8
  271. package/src/misc/dispatchEvent.js.map +1 -0
  272. package/src/misc/dispatchEvent.ts +9 -0
  273. package/src/misc/distinct.js +2 -10
  274. package/src/misc/distinct.js.map +1 -0
  275. package/src/misc/distinct.ts +17 -0
  276. package/src/misc/emulateAnimationEnd.js +28 -40
  277. package/src/misc/emulateAnimationEnd.js.map +1 -0
  278. package/src/misc/emulateAnimationEnd.ts +39 -0
  279. package/src/misc/emulateTransitionEnd.js +28 -40
  280. package/src/misc/emulateTransitionEnd.js.map +1 -0
  281. package/src/misc/emulateTransitionEnd.ts +39 -0
  282. package/src/misc/focus.js +2 -7
  283. package/src/misc/focus.js.map +1 -0
  284. package/src/misc/focus.ts +9 -0
  285. package/src/misc/noop.js +2 -3
  286. package/src/misc/noop.js.map +1 -0
  287. package/src/misc/noop.ts +4 -0
  288. package/src/misc/normalizeOptions.js +33 -49
  289. package/src/misc/normalizeOptions.js.map +1 -0
  290. package/src/misc/normalizeOptions.ts +55 -0
  291. package/src/misc/normalizeValue.js +16 -34
  292. package/src/misc/normalizeValue.js.map +1 -0
  293. package/src/misc/normalizeValue.ts +30 -0
  294. package/src/misc/passiveHandler.js +2 -7
  295. package/src/misc/passiveHandler.js.map +1 -0
  296. package/src/misc/passiveHandler.ts +6 -0
  297. package/src/misc/reflow.js +2 -8
  298. package/src/misc/reflow.js.map +1 -0
  299. package/src/misc/reflow.ts +9 -0
  300. package/src/misc/setElementStyle.js +15 -19
  301. package/src/misc/setElementStyle.js.map +1 -0
  302. package/src/misc/setElementStyle.ts +21 -0
  303. package/src/misc/timer.js +50 -75
  304. package/src/misc/timer.js.map +1 -0
  305. package/src/misc/timer.ts +81 -0
  306. package/src/misc/toLowerCase.js +2 -8
  307. package/src/misc/toLowerCase.js.map +1 -0
  308. package/src/misc/toLowerCase.ts +9 -0
  309. package/src/misc/toUpperCase.js +2 -8
  310. package/src/misc/toUpperCase.js.map +1 -0
  311. package/src/misc/toUpperCase.ts +9 -0
  312. package/src/selectors/closest.js +7 -16
  313. package/src/selectors/closest.js.map +1 -0
  314. package/src/selectors/closest.ts +20 -0
  315. package/src/selectors/getCustomElements.js +7 -16
  316. package/src/selectors/getCustomElements.js.map +1 -0
  317. package/src/selectors/getCustomElements.ts +19 -0
  318. package/src/selectors/getElementById.js +5 -14
  319. package/src/selectors/getElementById.js.map +1 -0
  320. package/src/selectors/getElementById.ts +16 -0
  321. package/src/selectors/getElementsByClassName.js +7 -15
  322. package/src/selectors/getElementsByClassName.js.map +1 -0
  323. package/src/selectors/getElementsByClassName.ts +22 -0
  324. package/src/selectors/getElementsByTagName.js +7 -15
  325. package/src/selectors/getElementsByTagName.js.map +1 -0
  326. package/src/selectors/getElementsByTagName.ts +20 -0
  327. package/src/selectors/matches.js +2 -10
  328. package/src/selectors/matches.js.map +1 -0
  329. package/src/selectors/matches.ts +10 -0
  330. package/src/selectors/querySelector.js +10 -19
  331. package/src/selectors/querySelector.js.map +1 -0
  332. package/src/selectors/querySelector.ts +21 -0
  333. package/src/selectors/querySelectorAll.js +7 -14
  334. package/src/selectors/querySelectorAll.js.map +1 -0
  335. package/src/selectors/querySelectorAll.ts +16 -0
  336. package/src/strings/DOMContentLoadedEvent.js +2 -6
  337. package/src/strings/DOMContentLoadedEvent.js.map +1 -0
  338. package/src/strings/DOMContentLoadedEvent.ts +5 -0
  339. package/src/strings/DOMMouseScrollEvent.js +2 -6
  340. package/src/strings/DOMMouseScrollEvent.js.map +1 -0
  341. package/src/strings/DOMMouseScrollEvent.ts +5 -0
  342. package/src/strings/abortEvent.js +2 -6
  343. package/src/strings/abortEvent.js.map +1 -0
  344. package/src/strings/abortEvent.ts +5 -0
  345. package/src/strings/addEventListener.js +2 -6
  346. package/src/strings/addEventListener.js.map +1 -0
  347. package/src/strings/addEventListener.ts +5 -0
  348. package/src/strings/animationDelay.js +2 -6
  349. package/src/strings/animationDelay.js.map +1 -0
  350. package/src/strings/animationDelay.ts +5 -0
  351. package/src/strings/animationDuration.js +2 -6
  352. package/src/strings/animationDuration.js.map +1 -0
  353. package/src/strings/animationDuration.ts +5 -0
  354. package/src/strings/animationEndEvent.js +2 -6
  355. package/src/strings/animationEndEvent.js.map +1 -0
  356. package/src/strings/animationEndEvent.ts +5 -0
  357. package/src/strings/animationName.js +2 -6
  358. package/src/strings/animationName.js.map +1 -0
  359. package/src/strings/animationName.ts +5 -0
  360. package/src/strings/ariaChecked.js +2 -6
  361. package/src/strings/ariaChecked.js.map +1 -0
  362. package/src/strings/ariaChecked.ts +5 -0
  363. package/src/strings/ariaDescribedBy.js +2 -6
  364. package/src/strings/ariaDescribedBy.js.map +1 -0
  365. package/src/strings/ariaDescribedBy.ts +5 -0
  366. package/src/strings/ariaDescription.js +2 -6
  367. package/src/strings/ariaDescription.js.map +1 -0
  368. package/src/strings/ariaDescription.ts +5 -0
  369. package/src/strings/ariaExpanded.js +2 -6
  370. package/src/strings/ariaExpanded.js.map +1 -0
  371. package/src/strings/ariaExpanded.ts +5 -0
  372. package/src/strings/ariaHasPopup.js +2 -6
  373. package/src/strings/ariaHasPopup.js.map +1 -0
  374. package/src/strings/ariaHasPopup.ts +5 -0
  375. package/src/strings/ariaHidden.js +2 -6
  376. package/src/strings/ariaHidden.js.map +1 -0
  377. package/src/strings/ariaHidden.ts +5 -0
  378. package/src/strings/ariaLabel.js +2 -6
  379. package/src/strings/ariaLabel.js.map +1 -0
  380. package/src/strings/ariaLabel.ts +5 -0
  381. package/src/strings/ariaLabelledBy.js +2 -6
  382. package/src/strings/ariaLabelledBy.js.map +1 -0
  383. package/src/strings/ariaLabelledBy.ts +5 -0
  384. package/src/strings/ariaModal.js +2 -6
  385. package/src/strings/ariaModal.js.map +1 -0
  386. package/src/strings/ariaModal.ts +5 -0
  387. package/src/strings/ariaPressed.js +2 -6
  388. package/src/strings/ariaPressed.js.map +1 -0
  389. package/src/strings/ariaPressed.ts +5 -0
  390. package/src/strings/ariaSelected.js +2 -6
  391. package/src/strings/ariaSelected.js.map +1 -0
  392. package/src/strings/ariaSelected.ts +5 -0
  393. package/src/strings/ariaValueMax.js +2 -6
  394. package/src/strings/ariaValueMax.js.map +1 -0
  395. package/src/strings/ariaValueMax.ts +5 -0
  396. package/src/strings/ariaValueMin.js +2 -6
  397. package/src/strings/ariaValueMin.js.map +1 -0
  398. package/src/strings/ariaValueMin.ts +5 -0
  399. package/src/strings/ariaValueNow.js +2 -6
  400. package/src/strings/ariaValueNow.js.map +1 -0
  401. package/src/strings/ariaValueNow.ts +5 -0
  402. package/src/strings/ariaValueText.js +2 -6
  403. package/src/strings/ariaValueText.js.map +1 -0
  404. package/src/strings/ariaValueText.ts +5 -0
  405. package/src/strings/beforeunloadEvent.js +2 -6
  406. package/src/strings/beforeunloadEvent.js.map +1 -0
  407. package/src/strings/beforeunloadEvent.ts +5 -0
  408. package/src/strings/bezierEasings.js +28 -33
  409. package/src/strings/bezierEasings.js.map +1 -0
  410. package/src/strings/bezierEasings.ts +32 -0
  411. package/src/strings/blurEvent.js +2 -6
  412. package/src/strings/blurEvent.js.map +1 -0
  413. package/src/strings/blurEvent.ts +5 -0
  414. package/src/strings/changeEvent.js +2 -6
  415. package/src/strings/changeEvent.js.map +1 -0
  416. package/src/strings/changeEvent.ts +5 -0
  417. package/src/strings/contextmenuEvent.js +2 -6
  418. package/src/strings/contextmenuEvent.js.map +1 -0
  419. package/src/strings/contextmenuEvent.ts +5 -0
  420. package/src/strings/errorEvent.js +2 -6
  421. package/src/strings/errorEvent.js.map +1 -0
  422. package/src/strings/errorEvent.ts +5 -0
  423. package/src/strings/focusEvent.js +2 -6
  424. package/src/strings/focusEvent.js.map +1 -0
  425. package/src/strings/focusEvent.ts +5 -0
  426. package/src/strings/focusEvents.js +2 -6
  427. package/src/strings/focusEvents.js.map +1 -0
  428. package/src/strings/focusEvents.ts +5 -0
  429. package/src/strings/focusinEvent.js +2 -6
  430. package/src/strings/focusinEvent.js.map +1 -0
  431. package/src/strings/focusinEvent.ts +5 -0
  432. package/src/strings/focusoutEvent.js +2 -6
  433. package/src/strings/focusoutEvent.js.map +1 -0
  434. package/src/strings/focusoutEvent.ts +5 -0
  435. package/src/strings/gesturechangeEvent.js +2 -6
  436. package/src/strings/gesturechangeEvent.js.map +1 -0
  437. package/src/strings/gesturechangeEvent.ts +5 -0
  438. package/src/strings/gestureendEvent.js +2 -6
  439. package/src/strings/gestureendEvent.js.map +1 -0
  440. package/src/strings/gestureendEvent.ts +5 -0
  441. package/src/strings/gesturestartEvent.js +2 -6
  442. package/src/strings/gesturestartEvent.js.map +1 -0
  443. package/src/strings/gesturestartEvent.ts +5 -0
  444. package/src/strings/keyAlt.js +2 -7
  445. package/src/strings/keyAlt.js.map +1 -0
  446. package/src/strings/keyAlt.ts +7 -0
  447. package/src/strings/keyArrowDown.js +2 -7
  448. package/src/strings/keyArrowDown.js.map +1 -0
  449. package/src/strings/keyArrowDown.ts +7 -0
  450. package/src/strings/keyArrowLeft.js +2 -7
  451. package/src/strings/keyArrowLeft.js.map +1 -0
  452. package/src/strings/keyArrowLeft.ts +7 -0
  453. package/src/strings/keyArrowRight.js +2 -7
  454. package/src/strings/keyArrowRight.js.map +1 -0
  455. package/src/strings/keyArrowRight.ts +7 -0
  456. package/src/strings/keyArrowUp.js +2 -7
  457. package/src/strings/keyArrowUp.js.map +1 -0
  458. package/src/strings/keyArrowUp.ts +7 -0
  459. package/src/strings/keyBackspace.js +2 -7
  460. package/src/strings/keyBackspace.js.map +1 -0
  461. package/src/strings/keyBackspace.ts +7 -0
  462. package/src/strings/keyCapsLock.js +2 -7
  463. package/src/strings/keyCapsLock.js.map +1 -0
  464. package/src/strings/keyCapsLock.ts +7 -0
  465. package/src/strings/keyControl.js +2 -7
  466. package/src/strings/keyControl.js.map +1 -0
  467. package/src/strings/keyControl.ts +7 -0
  468. package/src/strings/keyDelete.js +2 -7
  469. package/src/strings/keyDelete.js.map +1 -0
  470. package/src/strings/keyDelete.ts +7 -0
  471. package/src/strings/keyEnter.js +2 -7
  472. package/src/strings/keyEnter.js.map +1 -0
  473. package/src/strings/keyEnter.ts +7 -0
  474. package/src/strings/keyEscape.js +2 -7
  475. package/src/strings/keyEscape.js.map +1 -0
  476. package/src/strings/keyEscape.ts +7 -0
  477. package/src/strings/keyInsert.js +2 -7
  478. package/src/strings/keyInsert.js.map +1 -0
  479. package/src/strings/keyInsert.ts +7 -0
  480. package/src/strings/keyMeta.js +2 -7
  481. package/src/strings/keyMeta.js.map +1 -0
  482. package/src/strings/keyMeta.ts +7 -0
  483. package/src/strings/keyPause.js +2 -7
  484. package/src/strings/keyPause.js.map +1 -0
  485. package/src/strings/keyPause.ts +7 -0
  486. package/src/strings/keyScrollLock.js +2 -7
  487. package/src/strings/keyScrollLock.js.map +1 -0
  488. package/src/strings/keyScrollLock.ts +7 -0
  489. package/src/strings/keyShift.js +2 -7
  490. package/src/strings/keyShift.js.map +1 -0
  491. package/src/strings/keyShift.ts +7 -0
  492. package/src/strings/keySpace.js +2 -7
  493. package/src/strings/keySpace.js.map +1 -0
  494. package/src/strings/keySpace.ts +7 -0
  495. package/src/strings/keyTab.js +2 -7
  496. package/src/strings/keyTab.js.map +1 -0
  497. package/src/strings/keyTab.ts +7 -0
  498. package/src/strings/keyboardEventKeys.js +22 -27
  499. package/src/strings/keyboardEventKeys.js.map +1 -0
  500. package/src/strings/keyboardEventKeys.ts +26 -0
  501. package/src/strings/keydownEvent.js +2 -6
  502. package/src/strings/keydownEvent.js.map +1 -0
  503. package/src/strings/keydownEvent.ts +5 -0
  504. package/src/strings/keypressEvent.js +2 -6
  505. package/src/strings/keypressEvent.js.map +1 -0
  506. package/src/strings/keypressEvent.ts +5 -0
  507. package/src/strings/keyupEvent.js +2 -6
  508. package/src/strings/keyupEvent.js.map +1 -0
  509. package/src/strings/keyupEvent.ts +5 -0
  510. package/src/strings/loadEvent.js +2 -6
  511. package/src/strings/loadEvent.js.map +1 -0
  512. package/src/strings/loadEvent.ts +5 -0
  513. package/src/strings/loadstartEvent.js +2 -6
  514. package/src/strings/loadstartEvent.js.map +1 -0
  515. package/src/strings/loadstartEvent.ts +5 -0
  516. package/src/strings/mouseClickEvents.js +2 -6
  517. package/src/strings/mouseClickEvents.js.map +1 -0
  518. package/src/strings/mouseClickEvents.ts +5 -0
  519. package/src/strings/mouseHoverEvents.js +4 -7
  520. package/src/strings/mouseHoverEvents.js.map +1 -0
  521. package/src/strings/mouseHoverEvents.ts +8 -0
  522. package/src/strings/mouseSwipeEvents.js +7 -8
  523. package/src/strings/mouseSwipeEvents.js.map +1 -0
  524. package/src/strings/mouseSwipeEvents.ts +10 -0
  525. package/src/strings/mouseclickEvent.js +2 -6
  526. package/src/strings/mouseclickEvent.js.map +1 -0
  527. package/src/strings/mouseclickEvent.ts +5 -0
  528. package/src/strings/mousedblclickEvent.js +2 -6
  529. package/src/strings/mousedblclickEvent.js.map +1 -0
  530. package/src/strings/mousedblclickEvent.ts +5 -0
  531. package/src/strings/mousedownEvent.js +2 -6
  532. package/src/strings/mousedownEvent.js.map +1 -0
  533. package/src/strings/mousedownEvent.ts +5 -0
  534. package/src/strings/mouseenterEvent.js +2 -6
  535. package/src/strings/mouseenterEvent.js.map +1 -0
  536. package/src/strings/mouseenterEvent.ts +5 -0
  537. package/src/strings/mousehoverEvent.js +2 -6
  538. package/src/strings/mousehoverEvent.js.map +1 -0
  539. package/src/strings/mousehoverEvent.ts +5 -0
  540. package/src/strings/mouseinEvent.js +2 -6
  541. package/src/strings/mouseinEvent.js.map +1 -0
  542. package/src/strings/mouseinEvent.ts +5 -0
  543. package/src/strings/mouseleaveEvent.js +2 -6
  544. package/src/strings/mouseleaveEvent.js.map +1 -0
  545. package/src/strings/mouseleaveEvent.ts +5 -0
  546. package/src/strings/mousemoveEvent.js +2 -6
  547. package/src/strings/mousemoveEvent.js.map +1 -0
  548. package/src/strings/mousemoveEvent.ts +5 -0
  549. package/src/strings/mouseoutEvent.js +2 -6
  550. package/src/strings/mouseoutEvent.js.map +1 -0
  551. package/src/strings/mouseoutEvent.ts +5 -0
  552. package/src/strings/mouseoverEvent.js +2 -6
  553. package/src/strings/mouseoverEvent.js.map +1 -0
  554. package/src/strings/mouseoverEvent.ts +5 -0
  555. package/src/strings/mouseupEvent.js +2 -6
  556. package/src/strings/mouseupEvent.js.map +1 -0
  557. package/src/strings/mouseupEvent.ts +5 -0
  558. package/src/strings/mousewheelEvent.js +2 -6
  559. package/src/strings/mousewheelEvent.js.map +1 -0
  560. package/src/strings/mousewheelEvent.ts +5 -0
  561. package/src/strings/moveEvent.js +2 -6
  562. package/src/strings/moveEvent.js.map +1 -0
  563. package/src/strings/moveEvent.ts +5 -0
  564. package/src/strings/nativeEvents.js +103 -108
  565. package/src/strings/nativeEvents.js.map +1 -0
  566. package/src/strings/nativeEvents.ts +108 -0
  567. package/src/strings/offsetHeight.js +2 -6
  568. package/src/strings/offsetHeight.js.map +1 -0
  569. package/src/strings/offsetHeight.ts +5 -0
  570. package/src/strings/offsetWidth.js +2 -6
  571. package/src/strings/offsetWidth.js.map +1 -0
  572. package/src/strings/offsetWidth.ts +5 -0
  573. package/src/strings/orientationchangeEvent.js +2 -6
  574. package/src/strings/orientationchangeEvent.js.map +1 -0
  575. package/src/strings/orientationchangeEvent.ts +5 -0
  576. package/src/strings/pointercancelEvent.js +2 -6
  577. package/src/strings/pointercancelEvent.js.map +1 -0
  578. package/src/strings/pointercancelEvent.ts +5 -0
  579. package/src/strings/pointerdownEvent.js +2 -6
  580. package/src/strings/pointerdownEvent.js.map +1 -0
  581. package/src/strings/pointerdownEvent.ts +5 -0
  582. package/src/strings/pointerleaveEvent.js +2 -6
  583. package/src/strings/pointerleaveEvent.js.map +1 -0
  584. package/src/strings/pointerleaveEvent.ts +5 -0
  585. package/src/strings/pointermoveEvent.js +2 -6
  586. package/src/strings/pointermoveEvent.js.map +1 -0
  587. package/src/strings/pointermoveEvent.ts +5 -0
  588. package/src/strings/pointerupEvent.js +2 -6
  589. package/src/strings/pointerupEvent.js.map +1 -0
  590. package/src/strings/pointerupEvent.ts +5 -0
  591. package/src/strings/readystatechangeEvent.js +2 -6
  592. package/src/strings/readystatechangeEvent.js.map +1 -0
  593. package/src/strings/readystatechangeEvent.ts +5 -0
  594. package/src/strings/removeEventListener.js +2 -6
  595. package/src/strings/removeEventListener.js.map +1 -0
  596. package/src/strings/removeEventListener.ts +5 -0
  597. package/src/strings/resetEvent.js +2 -6
  598. package/src/strings/resetEvent.js.map +1 -0
  599. package/src/strings/resetEvent.ts +5 -0
  600. package/src/strings/resizeEvent.js +2 -6
  601. package/src/strings/resizeEvent.js.map +1 -0
  602. package/src/strings/resizeEvent.ts +5 -0
  603. package/src/strings/scrollEvent.js +2 -6
  604. package/src/strings/scrollEvent.js.map +1 -0
  605. package/src/strings/scrollEvent.ts +5 -0
  606. package/src/strings/scrollHeight.js +2 -6
  607. package/src/strings/scrollHeight.js.map +1 -0
  608. package/src/strings/scrollHeight.ts +5 -0
  609. package/src/strings/scrollWidth.js +2 -6
  610. package/src/strings/scrollWidth.js.map +1 -0
  611. package/src/strings/scrollWidth.ts +5 -0
  612. package/src/strings/selectEvent.js +2 -6
  613. package/src/strings/selectEvent.js.map +1 -0
  614. package/src/strings/selectEvent.ts +5 -0
  615. package/src/strings/selectendEvent.js +2 -6
  616. package/src/strings/selectendEvent.js.map +1 -0
  617. package/src/strings/selectendEvent.ts +5 -0
  618. package/src/strings/selectstartEvent.js +2 -6
  619. package/src/strings/selectstartEvent.js.map +1 -0
  620. package/src/strings/selectstartEvent.ts +5 -0
  621. package/src/strings/submitEvent.js +2 -6
  622. package/src/strings/submitEvent.js.map +1 -0
  623. package/src/strings/submitEvent.ts +5 -0
  624. package/src/strings/tabindex.js +2 -0
  625. package/src/strings/tabindex.js.map +1 -0
  626. package/src/strings/tabindex.ts +5 -0
  627. package/src/strings/touchEvents.js +7 -8
  628. package/src/strings/touchEvents.js.map +1 -0
  629. package/src/strings/touchEvents.ts +10 -0
  630. package/src/strings/touchcancelEvent.js +2 -6
  631. package/src/strings/touchcancelEvent.js.map +1 -0
  632. package/src/strings/touchcancelEvent.ts +5 -0
  633. package/src/strings/touchendEvent.js +2 -6
  634. package/src/strings/touchendEvent.js.map +1 -0
  635. package/src/strings/touchendEvent.ts +5 -0
  636. package/src/strings/touchmoveEvent.js +2 -6
  637. package/src/strings/touchmoveEvent.js.map +1 -0
  638. package/src/strings/touchmoveEvent.ts +5 -0
  639. package/src/strings/touchstartEvent.js +2 -6
  640. package/src/strings/touchstartEvent.js.map +1 -0
  641. package/src/strings/touchstartEvent.ts +5 -0
  642. package/src/strings/transitionDelay.js +2 -6
  643. package/src/strings/transitionDelay.js.map +1 -0
  644. package/src/strings/transitionDelay.ts +5 -0
  645. package/src/strings/transitionDuration.js +2 -6
  646. package/src/strings/transitionDuration.js.map +1 -0
  647. package/src/strings/transitionDuration.ts +5 -0
  648. package/src/strings/transitionEndEvent.js +2 -6
  649. package/src/strings/transitionEndEvent.js.map +1 -0
  650. package/src/strings/transitionEndEvent.ts +5 -0
  651. package/src/strings/transitionProperty.js +2 -7
  652. package/src/strings/transitionProperty.js.map +1 -0
  653. package/src/strings/transitionProperty.ts +5 -0
  654. package/src/strings/unloadEvent.js +2 -6
  655. package/src/strings/unloadEvent.js.map +1 -0
  656. package/src/strings/unloadEvent.ts +5 -0
  657. package/src/strings/userAgent.js +3 -7
  658. package/src/strings/userAgent.js.map +1 -0
  659. package/src/strings/userAgent.ts +7 -0
  660. package/src/strings/userAgentData.js +3 -7
  661. package/src/strings/userAgentData.js.map +1 -0
  662. package/src/strings/userAgentData.ts +9 -0
  663. package/src/types.js +1 -0
  664. package/src/types.js.map +1 -0
  665. package/src/types.ts +1 -0
  666. package/types/attr/getAttribute.d.ts +2 -0
  667. package/types/attr/getAttributeNS.d.ts +2 -0
  668. package/types/attr/hasAttribute.d.ts +2 -0
  669. package/types/attr/hasAttributeNS.d.ts +2 -0
  670. package/types/attr/removeAttribute.d.ts +2 -0
  671. package/types/attr/removeAttributeNS.d.ts +2 -0
  672. package/types/attr/setAttribute.d.ts +2 -0
  673. package/types/attr/setAttributeNS.d.ts +2 -0
  674. package/types/blocks/documentBody.d.ts +2 -0
  675. package/types/blocks/documentElement.d.ts +2 -0
  676. package/types/blocks/documentHead.d.ts +2 -0
  677. package/types/boolean/isApple.d.ts +2 -0
  678. package/types/boolean/isFirefox.d.ts +2 -0
  679. package/types/boolean/isMobile.d.ts +2 -0
  680. package/types/boolean/support3DTransform.d.ts +2 -0
  681. package/types/boolean/supportAnimation.d.ts +2 -0
  682. package/types/boolean/supportPassive.d.ts +2 -0
  683. package/types/boolean/supportTouch.d.ts +2 -0
  684. package/types/boolean/supportTransform.d.ts +2 -0
  685. package/types/boolean/supportTransition.d.ts +2 -0
  686. package/types/class/addClass.d.ts +2 -0
  687. package/types/class/hasClass.d.ts +2 -0
  688. package/types/class/removeClass.d.ts +2 -0
  689. package/types/event/off.d.ts +1 -0
  690. package/types/event/on.d.ts +1 -0
  691. package/types/event/one.d.ts +2 -0
  692. package/types/get/getBoundingClientRect.d.ts +3 -0
  693. package/types/get/getDocument.d.ts +2 -0
  694. package/types/get/getDocumentBody.d.ts +2 -0
  695. package/types/get/getDocumentElement.d.ts +2 -0
  696. package/types/get/getDocumentHead.d.ts +2 -0
  697. package/types/get/getElementAnimationDelay.d.ts +2 -0
  698. package/types/get/getElementAnimationDuration.d.ts +2 -0
  699. package/types/get/getElementStyle.d.ts +2 -0
  700. package/types/get/getElementTransitionDelay.d.ts +2 -0
  701. package/types/get/getElementTransitionDuration.d.ts +2 -0
  702. package/types/get/getNodeScroll.d.ts +5 -0
  703. package/types/get/getParentNode.d.ts +2 -0
  704. package/types/get/getRectRelativeToOffsetParent.d.ts +6 -0
  705. package/types/get/getUID.d.ts +2 -0
  706. package/types/get/getWindow.d.ts +2 -0
  707. package/types/index.d.ts +351 -256
  708. package/types/interface/boundingClientRect.d.ts +10 -0
  709. package/types/interface/css4Declaration.d.ts +3 -0
  710. package/types/interface/customElement.d.ts +8 -0
  711. package/types/interface/navigatorUA.d.ts +12 -0
  712. package/types/interface/offsetRect.d.ts +6 -0
  713. package/types/interface/originalEvent.d.ts +3 -0
  714. package/types/is/isArray.d.ts +2 -0
  715. package/types/is/isCanvas.d.ts +2 -0
  716. package/types/is/isCustomElement.d.ts +3 -0
  717. package/types/is/isDocument.d.ts +2 -0
  718. package/types/is/isElement.d.ts +2 -0
  719. package/types/is/isElementInScrollRange.d.ts +2 -0
  720. package/types/is/isElementInViewport.d.ts +2 -0
  721. package/types/is/isElementsArray.d.ts +2 -0
  722. package/types/is/isFunction.d.ts +2 -0
  723. package/types/is/isHTMLCollection.d.ts +2 -0
  724. package/types/is/isHTMLElement.d.ts +2 -0
  725. package/types/is/isHTMLImageElement.d.ts +2 -0
  726. package/types/is/isMap.d.ts +2 -0
  727. package/types/is/isMedia.d.ts +2 -0
  728. package/types/is/isNode.d.ts +2 -0
  729. package/types/is/isNodeList.d.ts +2 -0
  730. package/types/is/isNumber.d.ts +2 -0
  731. package/types/is/isObject.d.ts +2 -0
  732. package/types/is/isRTL.d.ts +2 -0
  733. package/types/is/isSVGElement.d.ts +2 -0
  734. package/types/is/isScaledElement.d.ts +1 -0
  735. package/types/is/isShadowRoot.d.ts +2 -0
  736. package/types/is/isString.d.ts +2 -0
  737. package/types/is/isTableElement.d.ts +2 -0
  738. package/types/is/isWeakMap.d.ts +2 -0
  739. package/types/is/isWindow.d.ts +2 -0
  740. package/types/misc/ArrayFrom.d.ts +2 -0
  741. package/types/misc/Float32ArrayFrom.d.ts +2 -0
  742. package/types/misc/Float64ArrayFrom.d.ts +2 -0
  743. package/types/misc/ObjectAssign.d.ts +2 -0
  744. package/types/misc/ObjectEntries.d.ts +2 -0
  745. package/types/misc/ObjectKeys.d.ts +2 -0
  746. package/types/misc/ObjectValues.d.ts +2 -0
  747. package/types/misc/OriginalEvent.d.ts +3 -0
  748. package/types/misc/createElement.d.ts +2 -0
  749. package/types/misc/createElementNS.d.ts +2 -0
  750. package/types/misc/data.d.ts +10 -0
  751. package/types/misc/dispatchEvent.d.ts +2 -0
  752. package/types/misc/distinct.d.ts +2 -0
  753. package/types/misc/emulateAnimationEnd.d.ts +2 -0
  754. package/types/misc/emulateTransitionEnd.d.ts +2 -0
  755. package/types/misc/focus.d.ts +2 -0
  756. package/types/misc/noop.d.ts +2 -0
  757. package/types/misc/normalizeOptions.d.ts +5 -0
  758. package/types/misc/normalizeValue.d.ts +3 -0
  759. package/types/misc/passiveHandler.d.ts +2 -0
  760. package/types/misc/reflow.d.ts +2 -0
  761. package/types/misc/setElementStyle.d.ts +3 -0
  762. package/types/misc/timer.d.ts +6 -0
  763. package/types/misc/toLowerCase.d.ts +2 -0
  764. package/types/misc/toUpperCase.d.ts +2 -0
  765. package/types/selectors/closest.d.ts +2 -0
  766. package/types/selectors/getCustomElements.d.ts +3 -0
  767. package/types/selectors/getElementById.d.ts +2 -0
  768. package/types/selectors/getElementsByClassName.d.ts +2 -0
  769. package/types/selectors/getElementsByTagName.d.ts +2 -0
  770. package/types/selectors/matches.d.ts +2 -0
  771. package/types/selectors/querySelector.d.ts +2 -0
  772. package/types/selectors/querySelectorAll.d.ts +2 -0
  773. package/types/strings/DOMContentLoadedEvent.d.ts +2 -0
  774. package/types/strings/DOMMouseScrollEvent.d.ts +2 -0
  775. package/types/strings/abortEvent.d.ts +2 -0
  776. package/types/strings/addEventListener.d.ts +2 -0
  777. package/types/strings/animationDelay.d.ts +2 -0
  778. package/types/strings/animationDuration.d.ts +2 -0
  779. package/types/strings/animationEndEvent.d.ts +2 -0
  780. package/types/strings/animationName.d.ts +2 -0
  781. package/types/strings/ariaChecked.d.ts +2 -0
  782. package/types/strings/ariaDescribedBy.d.ts +2 -0
  783. package/types/strings/ariaDescription.d.ts +2 -0
  784. package/types/strings/ariaExpanded.d.ts +2 -0
  785. package/types/strings/ariaHasPopup.d.ts +2 -0
  786. package/types/strings/ariaHidden.d.ts +2 -0
  787. package/types/strings/ariaLabel.d.ts +2 -0
  788. package/types/strings/ariaLabelledBy.d.ts +2 -0
  789. package/types/strings/ariaModal.d.ts +2 -0
  790. package/types/strings/ariaPressed.d.ts +2 -0
  791. package/types/strings/ariaSelected.d.ts +2 -0
  792. package/types/strings/ariaValueMax.d.ts +2 -0
  793. package/types/strings/ariaValueMin.d.ts +2 -0
  794. package/types/strings/ariaValueNow.d.ts +2 -0
  795. package/types/strings/ariaValueText.d.ts +2 -0
  796. package/types/strings/beforeunloadEvent.d.ts +2 -0
  797. package/types/strings/bezierEasings.d.ts +28 -0
  798. package/types/strings/blurEvent.d.ts +2 -0
  799. package/types/strings/changeEvent.d.ts +2 -0
  800. package/types/strings/contextmenuEvent.d.ts +2 -0
  801. package/types/strings/errorEvent.d.ts +2 -0
  802. package/types/strings/focusEvent.d.ts +2 -0
  803. package/types/strings/focusEvents.d.ts +5 -0
  804. package/types/strings/focusinEvent.d.ts +2 -0
  805. package/types/strings/focusoutEvent.d.ts +2 -0
  806. package/types/strings/gesturechangeEvent.d.ts +2 -0
  807. package/types/strings/gestureendEvent.d.ts +2 -0
  808. package/types/strings/gesturestartEvent.d.ts +2 -0
  809. package/types/strings/keyAlt.d.ts +2 -0
  810. package/types/strings/keyArrowDown.d.ts +2 -0
  811. package/types/strings/keyArrowLeft.d.ts +2 -0
  812. package/types/strings/keyArrowRight.d.ts +2 -0
  813. package/types/strings/keyArrowUp.d.ts +2 -0
  814. package/types/strings/keyBackspace.d.ts +2 -0
  815. package/types/strings/keyCapsLock.d.ts +2 -0
  816. package/types/strings/keyControl.d.ts +2 -0
  817. package/types/strings/keyDelete.d.ts +2 -0
  818. package/types/strings/keyEnter.d.ts +2 -0
  819. package/types/strings/keyEscape.d.ts +2 -0
  820. package/types/strings/keyInsert.d.ts +2 -0
  821. package/types/strings/keyMeta.d.ts +2 -0
  822. package/types/strings/keyPause.d.ts +2 -0
  823. package/types/strings/keyScrollLock.d.ts +2 -0
  824. package/types/strings/keyShift.d.ts +2 -0
  825. package/types/strings/keySpace.d.ts +2 -0
  826. package/types/strings/keyTab.d.ts +2 -0
  827. package/types/strings/keyboardEventKeys.d.ts +22 -0
  828. package/types/strings/keydownEvent.d.ts +2 -0
  829. package/types/strings/keypressEvent.d.ts +2 -0
  830. package/types/strings/keyupEvent.d.ts +2 -0
  831. package/types/strings/loadEvent.d.ts +2 -0
  832. package/types/strings/loadstartEvent.d.ts +2 -0
  833. package/types/strings/mouseClickEvents.d.ts +5 -0
  834. package/types/strings/mouseHoverEvents.d.ts +2 -0
  835. package/types/strings/mouseSwipeEvents.d.ts +7 -0
  836. package/types/strings/mouseclickEvent.d.ts +2 -0
  837. package/types/strings/mousedblclickEvent.d.ts +2 -0
  838. package/types/strings/mousedownEvent.d.ts +2 -0
  839. package/types/strings/mouseenterEvent.d.ts +2 -0
  840. package/types/strings/mousehoverEvent.d.ts +2 -0
  841. package/types/strings/mouseinEvent.d.ts +2 -0
  842. package/types/strings/mouseleaveEvent.d.ts +2 -0
  843. package/types/strings/mousemoveEvent.d.ts +2 -0
  844. package/types/strings/mouseoutEvent.d.ts +2 -0
  845. package/types/strings/mouseoverEvent.d.ts +2 -0
  846. package/types/strings/mouseupEvent.d.ts +2 -0
  847. package/types/strings/mousewheelEvent.d.ts +2 -0
  848. package/types/strings/moveEvent.d.ts +2 -0
  849. package/types/strings/nativeEvents.d.ts +53 -0
  850. package/types/strings/offsetHeight.d.ts +2 -0
  851. package/types/strings/offsetWidth.d.ts +2 -0
  852. package/types/strings/orientationchangeEvent.d.ts +2 -0
  853. package/types/strings/pointercancelEvent.d.ts +2 -0
  854. package/types/strings/pointerdownEvent.d.ts +2 -0
  855. package/types/strings/pointerleaveEvent.d.ts +2 -0
  856. package/types/strings/pointermoveEvent.d.ts +2 -0
  857. package/types/strings/pointerupEvent.d.ts +2 -0
  858. package/types/strings/readystatechangeEvent.d.ts +2 -0
  859. package/types/strings/removeEventListener.d.ts +2 -0
  860. package/types/strings/resetEvent.d.ts +2 -0
  861. package/types/strings/resizeEvent.d.ts +2 -0
  862. package/types/strings/scrollEvent.d.ts +2 -0
  863. package/types/strings/scrollHeight.d.ts +2 -0
  864. package/types/strings/scrollWidth.d.ts +2 -0
  865. package/types/strings/selectEvent.d.ts +2 -0
  866. package/types/strings/selectendEvent.d.ts +2 -0
  867. package/types/strings/selectstartEvent.d.ts +2 -0
  868. package/types/strings/submitEvent.d.ts +2 -0
  869. package/types/strings/tabindex.d.ts +2 -0
  870. package/types/strings/touchEvents.d.ts +7 -0
  871. package/types/strings/touchcancelEvent.d.ts +2 -0
  872. package/types/strings/touchendEvent.d.ts +2 -0
  873. package/types/strings/touchmoveEvent.d.ts +2 -0
  874. package/types/strings/touchstartEvent.d.ts +2 -0
  875. package/types/strings/transitionDelay.d.ts +2 -0
  876. package/types/strings/transitionDuration.d.ts +2 -0
  877. package/types/strings/transitionEndEvent.d.ts +2 -0
  878. package/types/strings/transitionProperty.d.ts +2 -0
  879. package/types/strings/unloadEvent.d.ts +2 -0
  880. package/types/strings/userAgent.d.ts +2 -0
  881. package/types/strings/userAgentData.d.ts +3 -0
  882. package/types/types.d.ts +1 -0
  883. package/dist/shorty.esm.js +0 -2594
  884. package/dist/shorty.esm.min.js +0 -2
  885. package/src/get/getElementAnimationDelayLegacy.js +0 -21
  886. package/src/get/getElementAnimationDurationLegacy.js +0 -21
  887. package/src/get/getElementTransitionDelayLegacy.js +0 -21
  888. package/src/get/getElementTransitionDurationLegacy.js +0 -21
  889. package/src/misc/emulateAnimationEndLegacy.js +0 -41
  890. package/src/misc/emulateTransitionEndLegacy.js +0 -41
  891. package/src/misc/passiveHandlerLegacy.js +0 -10
  892. package/src/misc/version.js +0 -8
  893. package/src/selectors/matchesLegacy.js +0 -23
  894. package/src/strings/animationDelayLegacy.js +0 -9
  895. package/src/strings/animationDurationLegacy.js +0 -9
  896. package/src/strings/animationEndEventLegacy.js +0 -9
  897. package/src/strings/animationNameLegacy.js +0 -9
  898. package/src/strings/transitionDelayLegacy.js +0 -9
  899. package/src/strings/transitionDurationLegacy.js +0 -9
  900. package/src/strings/transitionEndEventLegacy.js +0 -9
  901. package/src/strings/transitionPropertyLegacy.js +0 -12
  902. package/types/module/shorty.ts +0 -247
  903. package/types/shorty.d.ts +0 -2305
package/README.md CHANGED
@@ -1,31 +1,33 @@
1
1
  # shorty
2
+
2
3
  [![Coverage Status](https://coveralls.io/repos/github/thednp/shorty/badge.svg)](https://coveralls.io/github/thednp/shorty)
3
4
  [![ci](https://github.com/thednp/shorty/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/shorty/actions/workflows/ci.yml)
4
- [![NPM Version](https://img.shields.io/npm/v/@thednp/shorty.svg)](https://www.npmjs.com/package/shorty)
5
- [![NPM Downloads](https://img.shields.io/npm/dm/@thednp/shorty.svg)](http://npm-stat.com/charts.html?package=shorty)
6
- ![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hw/@thednp/shorty)
7
- ![cypress version](https://img.shields.io/badge/cypress-9.6.1-brightgreen)
8
- ![typescript version](https://img.shields.io/badge/typescript-4.5.2-brightgreen)
9
-
10
- A small ES6+ library with various JavaScript tools, all ESLint valid and with TypeScript definitions, everything useful for creating light libraries or web components. If there is anything that is consistently repeating itself, **shorty** can help you save up to 50% of the code required, with little to no performance cost.
5
+ [![NPM Version](https://img.shields.io/npm/v/@thednp/shorty.svg)](https://www.npmjs.com/package/@thednp/shorty)
6
+ [![NPM Downloads](https://img.shields.io/npm/dm/@thednp/shorty.svg)](http://npm-stat.com/charts.html?package=@thednp/shorty)
7
+ [![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hw/@thednp/shorty)](https://www.jsdelivr.com/package/npm/@thednp/shorty)
8
+ ![cypress version](https://img.shields.io/badge/cypress-10.3.1-brightgreen)
9
+ ![typescript version](https://img.shields.io/badge/typescript-4.7.4-brightgreen)
11
10
 
11
+ A small TypeScript library with various tools, all ESLint valid and featuring everything useful for creating light libraries or web components. If there is anything that is consistently repeating itself, **shorty** can help you save up to 50% of the code required, with little to no performance cost.
12
12
 
13
13
  **shorty** is featured in [ColorPicker](https://github.com/thednp/color-picker), [KUTE.js](https://github.com/thednp/kute.js), [BSN](https://github.com/thednp/bootstrap.native), [Navbar.js](https://github.com/thednp/navbar.js) and other libraries.
14
14
 
15
- * The purpose of the library is to speed up the development workflow, minimize the size of larger libraries by providing a shorter syntax for most used JavaScript API methods, most used strings or other helpful utilities.
16
- * Another excellent use for the library is for its selectors in a testing environment where you need to check the `instanceof` for various objects.
17
- * While the library comes with a working build in the `dist` folder, that is mainly for build consistency testing. You can make use of "tree shaking" to import one or anything your code needs.
18
- * On that note, all shorties are organized in folders inside the `src` root folder, the structure is key to understanding the purpose of each type of shortie, whether we have `boolean` for various basic browser detection or browser feature support, `attr` for all things *Element* attributes or `strings` for most common and most used *Element.prototype* methods.
15
+ - The purpose of the library is to speed up the development workflow, minimize the size of larger libraries by providing a shorter syntax for most used JavaScript API methods, most used strings or other helpful utilities.
16
+ - Another excellent use for the library is for its selectors in a testing environment where you need to check the `instanceof` for various objects.
17
+ - While the library comes with a working build in the `dist` folder, that is mainly for build consistency testing. You can make use of "tree shaking" to import one or anything your code needs.
18
+ - On that note, all shorties are organized in folders inside the `src` root folder, the structure is key to understanding the purpose of each type of shortie, whether we have `boolean` for various basic browser detection or browser feature support, `attr` for all things _Element_ attributes or `strings` for most common and most used _Element.prototype_ methods.
19
19
 
20
20
  # npm
21
+
21
22
  ```
22
23
  npm install @thednp/shorty
23
24
  ```
24
25
 
25
- # ES6+ Base usage
26
+ # TypeScript / ES6+ Base usage
27
+
26
28
  ```js
27
29
  // import the tool you need
28
- import { supportTransform } from '@thednp/shorty';
30
+ import { supportTransform } from "@thednp/shorty";
29
31
 
30
32
  // use the tool in your ES6/ES7 sources
31
33
  if (supportTransform) {
@@ -34,160 +36,155 @@ if (supportTransform) {
34
36
  ```
35
37
 
36
38
  # attr
37
- * ***getAttribute*** - returns the value of a specified *Element* attribute;
38
- * ***getAttributeNS*** - returns the value of a specified namespaced *Element* attribute (eg: namespaced SVG attributes);
39
- * ***hasAttribute*** - check if element has a specified attribute;
40
- * ***hasAttributeNS*** - check if element has a specified namespaced attribute;
41
- * ***removeAttribute*** - removes a specified attribute from an element;
42
- * ***removeAttributeNS*** - removes a specified namespaced attribute from an element;
43
- * ***setAttribute*** - set a new attribute value for a given element;
44
- * ***setAttributeNS*** - set a new namespaced attribute value for a given element;
45
-
46
- ```js
39
+
40
+ - **_getAttribute_** - returns the value of a specified _Element_ attribute;
41
+ - **_getAttributeNS_** - returns the value of a specified namespaced _Element_ attribute (eg: namespaced SVG attributes);
42
+ - **_hasAttribute_** - check if element has a specified attribute;
43
+ - **_hasAttributeNS_** - check if element has a specified namespaced attribute;
44
+ - **_removeAttribute_** - removes a specified attribute from an element;
45
+ - **_removeAttributeNS_** - removes a specified namespaced attribute from an element;
46
+ - **_setAttribute_** - set a new attribute value for a given element;
47
+ - **_setAttributeNS_** - set a new namespaced attribute value for a given element;
48
+
49
+ ```js
47
50
  // EXAMPLES
48
- import { getAttribute, hasAttribute, setAttribute } from '@thednp/shorty';
51
+ import { getAttribute, hasAttribute, setAttribute } from "@thednp/shorty";
49
52
 
50
53
  // check target has certain attribute
51
- if (!hasAttribute(myTarget, 'attribute-name')) {
52
- setAttribute(myTarget, 'attribute-name', 'new-value');
54
+ if (!hasAttribute(myTarget, "attribute-name")) {
55
+ setAttribute(myTarget, "attribute-name", "new-value");
53
56
  }
54
57
 
55
58
  // get attribute value
56
- const currentAttrValue = getAttribute(myTarget, 'attribute-name');
59
+ const currentAttrValue = getAttribute(myTarget, "attribute-name");
57
60
  ```
58
61
 
59
-
60
62
  # blocks
61
- * ***documentBody*** - a shortie for `document.body`;
62
- * ***documentElement*** - a shortie for `document.documentElement`;
63
- * ***documentHead*** - a shortie for `document.head`;
63
+
64
+ - **_documentBody_** - a shortie for `document.body`;
65
+ - **_documentElement_** - a shortie for `document.documentElement`;
66
+ - **_documentHead_** - a shortie for `document.head`;
64
67
 
65
68
  # boolean
66
- * ***isApple*** - checks and preserves a `boolean` value for the client browser is either Apple **Safari** browser or not;
67
- * ***isFirefox*** - checks and preserves a `boolean` value for the client browser is either **Firefox** or not;
68
- * ***isMobile*** - checks and preserves a `boolean` value for the client browser is either a Mobile device or not;
69
- * ***support3DTransform*** - checks and preserves a `boolean` value for the client browser capability for webKit `perspective`;
70
- * ***supportTouch*** - checks and preserves a `boolean` value for the client browser capability for `touch` events;
71
- * ***supportPassive*** - checks and preserves a `boolean` value for the client browser capability for `passive` event option;
72
- * ***supportTransform*** - checks and preserves a `boolean` value for the client browser capability for webKit `transform`;
73
- * ***supportAnimation*** - checks and preserves a `boolean` value for the client browser capability for webKit keyframe `animation`;
74
- * ***supportTransition*** - checks and preserves a `boolean` value for the client browser capability for webKit `transition`;
75
-
76
- ```js
69
+
70
+ - **_isApple_** - checks and preserves a `boolean` value for the client browser is either Apple **Safari** browser or not;
71
+ - **_isFirefox_** - checks and preserves a `boolean` value for the client browser is either **Firefox** or not;
72
+ - **_isMobile_** - checks and preserves a `boolean` value for the client browser is either a Mobile device or not;
73
+ - **_support3DTransform_** - checks and preserves a `boolean` value for the client browser capability for webKit `perspective`;
74
+ - **_supportTouch_** - checks and preserves a `boolean` value for the client browser capability for `touch` events;
75
+ - **_supportPassive_** - checks and preserves a `boolean` value for the client browser capability for `passive` event option;
76
+ - **_supportTransform_** - checks and preserves a `boolean` value for the client browser capability for webKit `transform`;
77
+ - **_supportAnimation_** - checks and preserves a `boolean` value for the client browser capability for webKit keyframe `animation`;
78
+ - **_supportTransition_** - checks and preserves a `boolean` value for the client browser capability for webKit `transition`;
79
+
80
+ ```js
77
81
  // EXAMPLES
78
- import { support3DTransform } from '@thednp/shorty';
82
+ import { support3DTransform } from "@thednp/shorty";
79
83
 
80
84
  // filter myAction to supported browsers
81
85
  if (support3DTransform) {
82
86
  // do something with modern browsers
83
87
  }
84
88
  ```
85
-
89
+
86
90
  # class
87
- * ***addClass*** - add a class to a target *Element*;
88
- * ***removeClass*** - remove a class from a target *Element*;
89
- * ***hasClass*** - checks the existence of a class for a target *Element*;
90
91
 
91
- ```js
92
+ - **_addClass_** - add a class to a target _Element_;
93
+ - **_removeClass_** - remove a class from a target _Element_;
94
+ - **_hasClass_** - checks the existence of a class for a target _Element_;
95
+
96
+ ```js
92
97
  // EXAMPLES
93
- import { addClass, removeClass, hasClass } from '@thednp/shorty'
98
+ import { addClass, removeClass, hasClass } from "@thednp/shorty";
94
99
 
95
100
  // add a class
96
- addClass(targetElement, 'className');
101
+ addClass(targetElement, "className");
97
102
 
98
103
  // remove a class
99
- removeClass(targetElement, 'className');
104
+ removeClass(targetElement, "className");
100
105
 
101
106
  // check for a class
102
- if (hasClass(targetElement, 'className')) {
107
+ if (hasClass(targetElement, "className")) {
103
108
  // do something about that
104
109
  }
105
110
  ```
106
111
 
107
112
  # event
108
- * ***on*** - attach an event listener to a specific target *Element*;
109
- * ***off*** - detach an event listener from a specific target *Element*;
110
- * ***one*** - attach an event listener to a specific target *Element*, and detach when complete;
111
113
 
112
- ```js
114
+ - **_on_** - attach an event listener to a specific target _Element_;
115
+ - **_off_** - detach an event listener from a specific target _Element_;
116
+ - **_one_** - attach an event listener to a specific target _Element_, and detach when complete;
117
+
118
+ ```js
113
119
  // EXAMPLES
114
- import { on, off, one, passiveHandler } from '@thednp/shorty';
120
+ import { on, off, one, passiveHandler } from "@thednp/shorty";
115
121
 
116
122
  // attach a passive mousedown eventHandler
117
- on(targetElement, 'click', eventHandler, passiveHandler);
123
+ on(targetElement, "click", eventHandler, passiveHandler);
118
124
 
119
125
  // detach a passive mouseup eventHandler
120
- off(targetElement, 'mouseup', eventHandler, passiveHandler);
126
+ off(targetElement, "mouseup", eventHandler, passiveHandler);
121
127
 
122
128
  // attach a single instance passive touchstart eventHandler
123
- one(targetElement, 'touchstart', eventHandler, passiveHandler);
129
+ one(targetElement, "touchstart", eventHandler, passiveHandler);
124
130
  ```
125
131
 
126
- For a more advanced method to handle event listeners, I recommend using the [event-listener.js](github.com/thednp/event-listener.js).
127
-
132
+ For a more advanced method to handle event listeners, I recommend using the [event-listener](github.com/thednp/event-listener).
128
133
 
129
134
  # get
130
- * ***getBoundingClientRect*** - returns the bounding client rectangle of a given *Element*;
131
- * ***getDocument*** - returns the containing `#Document` for a given *Element* or just any *Document*, useful when working with *iframe*s;
132
- * ***getDocumentBody*** - returns the containing `<body>` for a given *Element* or just any;
133
- * ***getDocumentElement*** - returns the containing `<html>` for a given *Element* or just any;
134
- * ***getDocumentHead*** - returns the containing `<head>` for a given *Element* or just any;
135
- * ***getElementAnimationDelay*** - returns the `animationDelay` property of an `animation` property;
136
- * ***getElementAnimationDelayLegacy*** - for legacy browsers;
137
- * ***getElementAnimationDuration*** - returns the `animationDuration` property of a `animation` property;
138
- * ***getElementAnimationDurationLegacy*** - for legacy browsers;
139
- * ***getElementTransitionDelay*** - returns the `transitionDelay` property of a `transition` property;
140
- * ***getElementTransitionDelayLegacy*** - for legacy browsers;
141
- * ***getElementTransitionDuration*** - returns the `transitionDuration` property of a `transition` property;
142
- * ***getElementTransitionDurationLegacy*** - for legacy browsers;
143
- * ***getElementStyle*** - returns the *Element* computed style for a given property;
144
- * ***getNodeScroll*** - returns the *Element* / *Window* current `{ x, y }` scroll position;
145
- * ***getParentNode*** - returns parent of a given *Element*;
146
- * ***getRectRelativeToOffsetParent*** - returns the bounding client rectangle of a given *Element* relative to a given `offsetParent`;
147
- * ***getUID*** - a nice utility that creates a unique ID for a given *Element* and returns it;
148
- * ***getWindow*** - returns the containing `Window` for a given *Element* or just any *Window*;
149
-
150
- ```js
135
+
136
+ - **_getBoundingClientRect_** - returns the bounding client rectangle of a given _Element_;
137
+ - **_getDocument_** - returns the containing `#Document` for a given _Element_ or just any _Document_, useful when working with *iframe*s;
138
+ - **_getDocumentBody_** - returns the containing `<body>` for a given _Element_ or just any;
139
+ - **_getDocumentElement_** - returns the containing `<html>` for a given _Element_ or just any;
140
+ - **_getDocumentHead_** - returns the containing `<head>` for a given _Element_ or just any;
141
+ - **_getElementAnimationDelay_** - returns the `animationDelay` property of an `animation` property;
142
+ - **_getElementAnimationDuration_** - returns the `animationDuration` property of a `animation` property;
143
+ - **_getElementTransitionDelay_** - returns the `transitionDelay` property of a `transition` property;
144
+ - **_getElementTransitionDuration_** - returns the `transitionDuration` property of a `transition` property;
145
+ - **_getElementStyle_** - returns the _Element_ computed style for a given property;
146
+ - **_getNodeScroll_** - returns the _Element_ / _Window_ current `{ x, y }` scroll position;
147
+ - **_getParentNode_** - returns parent of a given _Element_;
148
+ - **_getRectRelativeToOffsetParent_** - returns the bounding client rectangle of a given _Element_ relative to a given `offsetParent`;
149
+ - **_getUID_** - a nice utility that creates a unique ID for a given _Element_ and returns it;
150
+ - **_getWindow_** - returns the containing `Window` for a given _Element_ or just any _Window_;
151
+
152
+ ```js
151
153
  // EXAMPLES
152
- import {
153
- getElementAnimationDuration,
154
- getElementAnimationDurationLegacy,
155
- } from '@thednp/shorty'
154
+ import { getElementAnimationDuration } from "@thednp/shorty";
156
155
 
157
156
  // store the transition duration for target element on a modern browser
158
157
  const duration = getElementAnimationDuration(target);
159
-
160
- // or do the same with legacy browser fallback
161
- const duration = getElementAnimationDurationLegacy(target);
162
158
  ```
163
159
 
164
160
  # is
165
- * ***isArray*** - check if a given value is an `Array`;
166
- * ***isCustomElement*** - check if a given value is a `CustomElement` instance;
167
- * ***isDocument*** - check if a given value is a `Document` instance;
168
- * ***isElement*** - check if a given value is an `Element` instance;
169
- * ***isElementInScrollRange*** - check if a given `Element` is partially visible in the viewport;
170
- * ***isElementInViewport*** - check if a given `Element` is fully visible in the viewport;
171
- * ***isElementsArray*** - check if a given value is an `Array` with `Element` instances;
172
- * ***isFunction*** - check if a given value is a `Function` instance;
173
- * ***isHTMLCollection*** - check if a given value is an `HTMLCollection` instance;
174
- * ***isHTMLElement*** - check if a given value is an `HTMLElement` instance;
175
- * ***isHTMLImageElement*** - check if a given value is an `HTMLImageElement` instance;
176
- * ***isMedia*** - check if a given value is an `SVGElement`, `HTMLImageElement` or `HTMLVideoElement` instance;
177
- * ***isNode*** - check if a given value is a `Node` instance;
178
- * ***isNodeList*** - check if a given value is a `NodeList` instance;
179
- * ***isNumber*** - check if a given value is string;
180
- * ***isRTL*** - check if a given node is contained in a `<html dir="rtl">`;
181
- * ***isScaledElement*** - check if a given *Element* is affected by scale;
182
- * ***isShadowRoot*** - check if a given *Node* is a `ShadowRoot` instance;
183
- * ***isString*** - check if a given value is string;
184
- * ***isSVGElement*** - check if a given value is `SVGElement` instance;
185
- * ***isTableElement*** - check if a given value is `<table>`, `<td>` or `<th>` *Element*;
186
- * ***isWindow*** - check if a given value is a `Window` instance;
187
-
188
- ```js
161
+
162
+ - **_isArray_** - check if a given value is an `Array`;
163
+ - **_isCustomElement_** - check if a given value is a `CustomElement` instance;
164
+ - **_isDocument_** - check if a given value is a `Document` instance;
165
+ - **_isElement_** - check if a given value is an `Element` instance;
166
+ - **_isElementInScrollRange_** - check if a given `Element` is partially visible in the viewport;
167
+ - **_isElementInViewport_** - check if a given `Element` is fully visible in the viewport;
168
+ - **_isElementsArray_** - check if a given value is an `Array` with `Element` instances;
169
+ - **_isFunction_** - check if a given value is a `Function` instance;
170
+ - **_isHTMLCollection_** - check if a given value is an `HTMLCollection` instance;
171
+ - **_isHTMLElement_** - check if a given value is an `HTMLElement` instance;
172
+ - **_isHTMLImageElement_** - check if a given value is an `HTMLImageElement` instance;
173
+ - **_isMedia_** - check if a given value is an `SVGElement`, `HTMLImageElement` or `HTMLVideoElement` instance;
174
+ - **_isNode_** - check if a given value is a `Node` instance;
175
+ - **_isNodeList_** - check if a given value is a `NodeList` instance;
176
+ - **_isNumber_** - check if a given value is string;
177
+ - **_isRTL_** - check if a given node is contained in a `<html dir="rtl">`;
178
+ - **_isScaledElement_** - check if a given _Element_ is affected by scale;
179
+ - **_isShadowRoot_** - check if a given _Node_ is a `ShadowRoot` instance;
180
+ - **_isString_** - check if a given value is string;
181
+ - **_isSVGElement_** - check if a given value is `SVGElement` instance;
182
+ - **_isTableElement_** - check if a given value is `<table>`, `<td>` or `<th>` _Element_;
183
+ - **_isWindow_** - check if a given value is a `Window` instance;
184
+
185
+ ```js
189
186
  // EXAMPLES
190
- import { isArray, isHTMLElement, isElementsArray } from '@thednp/shorty';
187
+ import { isArray, isHTMLElement, isElementsArray } from "@thednp/shorty";
191
188
 
192
189
  // check if a value is an `Array` of `Element` instances
193
190
  if (isArray(myValue) && myValue.every(isHTMLElement)) {
@@ -201,40 +198,38 @@ if (isElementsArray(myValue)) {
201
198
  ```
202
199
 
203
200
  # misc
204
- * ***ArrayFrom*** - a shortie for `Array.from()` method;
205
- * ***Data*** - a small utility to store web components data that makes use of the native `Map`;
206
- * ***dispatchEvent*** - a shortie for `Element.dispatchEvent()` method;
207
- * ***distinct*** - a shortie you can use to filter duplicate values in an `Array`;
208
- * ***emulateAnimationEnd*** - utility to execute a callback function when `animationend` event is triggered, or execute the callback right after for legacy browsers;
209
- * ***emulateAnimationEndLegacy*** - for legacy browsers;
210
- * ***emulateTransitionEnd*** - utility to execute a callback function when `transitionend` event is triggered, or execute the callback right after for legacy browsers;
211
- * ***emulateTransitionEndLegacy*** - for legacy browsers;
212
- * ***Float32ArrayFrom*** - a shortie for `Float32Array.from()` method;
213
- * ***Float64ArrayFrom*** - a shortie for `Float64Array.from()` method;
214
- * ***focus*** - a shortie for `Element.focus()` method;
215
- * ***noop*** - is your regular `() => {}` NOOP;
216
- * ***normalizeOptions*** - a cool utility to normalize and crosscheck JavaScript options and their DATA API counterparts for various web components; supports namespaced options like `data-NAMESPACE-option="value"`; priority: JavaScript options > DATA API options > default options
217
- * ***ObjectAssign*** - a shortie for `Object.assign()` method;
218
- * ***ObjectEntries*** - a shortie for `Object.entries()` method;
219
- * ***ObjectKeys*** - a shortie for `Object.keys()` method;
220
- * ***ObjectValues*** - a shortie for `Object.values()` method;
221
- * ***OriginalEvent*** - a small utility that returns a synthetic `CustomEvent` with the added `relatedTarget` and other properties;
222
- * ***passiveHandler*** - a constant that preserves a standard listener `options` with `passive: true` event option used;
223
- * ***passiveHandlerLegacy*** - for legacy browsers;
224
- * ***reflow*** - a small utility that force repaint of a given *Element* by "checking" its `offsetHeight` value, also because using just `element.offsetHeight;` won't validate on ESLint;
225
- * ***setElementStyle*** - a small utility that allows you to set multiple CSS properties at once for a given *Element* target;
226
- * ***Timer*** - a small but powerful utility that makes `setTimeout` have a meaning;
227
- * ***toLowerCase*** - a shortie for `String.toLowerCase()` method;
228
- * ***toUpperCase*** - a shortie for `String.toUpperCase()` method;
229
-
230
- The ***Data*** and ***Timer*** utilities have their own specifics, you might want to check the [wiki](https://github.com/thednp/shorty/wiki).
231
-
232
- ```js
201
+
202
+ - **_ArrayFrom_** - a shortie for `Array.from()` method;
203
+ - **_Data_** - a small utility to store web components data that makes use of the native `Map`;
204
+ - **_dispatchEvent_** - a shortie for `Element.dispatchEvent()` method;
205
+ - **_distinct_** - a shortie you can use to filter duplicate values in an `Array`;
206
+ - **_emulateAnimationEnd_** - utility to execute a callback function when `animationend` event is triggered, or execute the callback right after for legacy browsers;
207
+ - **_emulateAnimationEndLegacy_** - for legacy browsers;
208
+ - **_emulateTransitionEnd_** - utility to execute a callback function when `transitionend` event is triggered, or execute the callback right after for legacy browsers;
209
+ - **_emulateTransitionEndLegacy_** - for legacy browsers;
210
+ - **_Float32ArrayFrom_** - a shortie for `Float32Array.from()` method;
211
+ - **_Float64ArrayFrom_** - a shortie for `Float64Array.from()` method;
212
+ - **_focus_** - a shortie for `Element.focus()` method;
213
+ - **_noop_** - is your regular `() => {}` NOOP;
214
+ - **_normalizeOptions_** - a cool utility to normalize and crosscheck JavaScript options and their DATA API counterparts for various web components; supports namespaced options like `data-NAMESPACE-option="value"`; priority: JavaScript options > DATA API options > default options
215
+ - **_ObjectAssign_** - a shortie for `Object.assign()` method;
216
+ - **_ObjectEntries_** - a shortie for `Object.entries()` method;
217
+ - **_ObjectKeys_** - a shortie for `Object.keys()` method;
218
+ - **_ObjectValues_** - a shortie for `Object.values()` method;
219
+ - **_OriginalEvent_** - a small utility that returns a synthetic `CustomEvent` with the added `relatedTarget` and other properties;
220
+ - **_passiveHandler_** - a constant that preserves a standard listener `options` with `passive: true` event option used;
221
+ - **_passiveHandlerLegacy_** - for legacy browsers;
222
+ - **_reflow_** - a small utility that force repaint of a given _Element_ by "checking" its `offsetHeight` value, also because using just `element.offsetHeight;` won't validate on ESLint;
223
+ - **_setElementStyle_** - a small utility that allows you to set multiple CSS properties at once for a given _Element_ target;
224
+ - **_Timer_** - a small but powerful utility that makes `setTimeout` have a meaning;
225
+ - **_toLowerCase_** - a shortie for `String.toLowerCase()` method;
226
+ - **_toUpperCase_** - a shortie for `String.toUpperCase()` method;
227
+
228
+ The **_Data_** and **_Timer_** utilities have their own specifics, you might want to check the [wiki](https://github.com/thednp/shorty/wiki).
229
+
230
+ ```js
233
231
  // EXAMPLES
234
- import {
235
- emulateTransitionEnd,
236
- distinct,
237
- } from '@thednp/shorty';
232
+ import { emulateTransitionEnd, distinct } from "@thednp/shorty";
238
233
 
239
234
  // execute a callback when transitionend is triggered for the target
240
235
  emulateTransitionEnd(targetElement, callback);
@@ -249,60 +244,54 @@ const array3 = [...array1, ...array2].filter(distinct);
249
244
  ```
250
245
 
251
246
  # selectors
252
- * ***closest*** - a shortie for `Element.closest()` method;
253
- * ***getCustomElements*** - returns an `Array` with all registered `CustomElement`;
254
- * ***getElementById*** - a shortie for `document.getElementById()` method;
255
- * ***getElementsByClassName*** - a shortie for `Element.getElementsByClassName()` method;
256
- * ***getElementsByTagName*** - a shortie for `Element.getElementsByTagName()` method;
257
- * ***matches*** - a shortie for `Element.matches()` method;
258
- * ***matchesLegacy*** - for legacy browsers;
259
- * ***querySelector*** - a simple utility to check if a given value is an *Element* or a selector string, and if a selector string find the FIRST *Element* and return it;
260
- * ***querySelectorAll*** - a simple utility to check if a certain item is an *Element* or a selector string, and if a selector string find the FIRST *Element* and return it;
261
-
262
- ```js
247
+
248
+ - **_closest_** - a shortie for `Element.closest()` method;
249
+ - **_getCustomElements_** - returns an `Array` with all registered `CustomElement`;
250
+ - **_getElementById_** - a shortie for `document.getElementById()` method;
251
+ - **_getElementsByClassName_** - a shortie for `Element.getElementsByClassName()` method;
252
+ - **_getElementsByTagName_** - a shortie for `Element.getElementsByTagName()` method;
253
+ - **_matches_** - a shortie for `Element.matches()` method;
254
+ - **_matchesLegacy_** - for legacy browsers;
255
+ - **_querySelector_** - a simple utility to check if a given value is an _Element_ or a selector string, and if a selector string find the FIRST _Element_ and return it;
256
+ - **_querySelectorAll_** - a simple utility to check if a certain item is an _Element_ or a selector string, and if a selector string find the FIRST _Element_ and return it;
257
+
258
+ ```js
263
259
  // EXAMPLES
264
- import { querySelector, querySelectorAll, documentAll, matches } from '@thednp/shorty';
260
+ import { querySelector, querySelectorAll, documentAll, matches } from "@thednp/shorty";
265
261
 
266
262
  // get first element that matches a certain selector
267
- const element = querySelector('.my-class-name');
263
+ const element = querySelector(".my-class-name");
268
264
 
269
265
  // get all elements that matches same selector
270
- const elements = querySelectorAll('.my-class-name');
266
+ const elements = querySelectorAll(".my-class-name");
271
267
 
272
268
  // now do the same as the above, but differently
273
- const elements = [...documentAll].filter((x) => matches(x, '.my-class-name'));
269
+ const elements = [...documentAll].filter((x) => matches(x, ".my-class-name"));
274
270
  ```
275
271
 
276
272
  # strings
277
- * ***bezierEasings*** - an *Object* comprised or a set of valid CSS `transition-timing-function` based on Cubic Bezier; EG: `cubic-bezier(0.215,0.61,0.355,1)` for `bezierEasings.easingCubicOut`;
278
- * ***mouseSwipeEvents*** - preserves the pointer events from mouse actions: start: `mousedown`, end: `mouseup`, move: `mousemove`, cancel: `mouseout`;
279
- * ***mouseClickEvents*** - preserves the pointer events from mouse actions: down: `mousedown`, up: `mouseup`;
280
- * ***mouseHoverEvents*** - preserve browser specific mouse hover events: `mouseenter` and `mouseleave` OR `mouseover` and `mouseout`;
281
- * ***touchEvents*** - preserves the pointer events from touch actions: start: `touchstart`, end: `touchend`, move: `touchmove`, cancel: `touchcancel`;
282
- * ***animationDuration*** - preserves the `animationDuration` property for modern browsers;
283
- * ***animationDurationLegacy*** - for legacy browsers fallback;
284
- * ***animationDelay*** - preserves the `animationDelay` property for modern browsers;
285
- * ***animationDelayLegacy*** - for legacy browsers fallback;
286
- * ***animationEndEvent*** - preserves the `animationEndEvent` event for modern browsers;
287
- * ***animationEndEventLegacy*** - for legacy browsers fallback;
288
- * ***animationName*** - preserves the `animationName` property name for modern browsers;
289
- * ***animationNameLegacy*** - for legacy browsers fallback;
290
- * ***transitionDuration*** - preserves the `transitionDuration` property name for modern browsers;
291
- * ***transitionDurationLegacy*** - for legacy browsers fallback;
292
- * ***transitionDelay*** - preserves the `transitionDelay` property name for modern browsers;
293
- * ***transitionDelayLegacy*** - for legacy browsers fallback;
294
- * ***transitionEndEvent*** - preserves the `transitionend` event name for modern browsers;
295
- * ***transitionEndEventLegacy*** - for legacy browsers fallback;
296
- * ***transitionProperty*** - preserves the `transitionProperty` property name for modern browsers;
297
- * ***transitionPropertyLegacy*** - for legacy browsers fallback;
298
- * ***addEventListener*** - preserves the `addEventListener` method name;
299
- * ***removeEventListener*** - preserves the `removeEventListener` method name;
273
+
274
+ - **_bezierEasings_** - an _Object_ comprised or a set of valid CSS `transition-timing-function` based on Cubic Bezier; EG: `cubic-bezier(0.215,0.61,0.355,1)` for `bezierEasings.easingCubicOut`;
275
+ - **_mouseSwipeEvents_** - preserves the pointer events from mouse actions: start: `mousedown`, end: `mouseup`, move: `mousemove`, cancel: `mouseout`;
276
+ - **_mouseClickEvents_** - preserves the pointer events from mouse actions: down: `mousedown`, up: `mouseup`;
277
+ - **_mouseHoverEvents_** - preserve browser specific mouse hover events: `mouseenter` and `mouseleave` OR `mouseover` and `mouseout`;
278
+ - **_touchEvents_** - preserves the pointer events from touch actions: start: `touchstart`, end: `touchend`, move: `touchmove`, cancel: `touchcancel`;
279
+ - **_animationDuration_** - preserves the `animationDuration` property for modern browsers;
280
+ - **_animationDelay_** - preserves the `animationDelay` property for modern browsers;
281
+ - **_animationEndEvent_** - preserves the `animationEndEvent` event for modern browsers;
282
+ - **_animationName_** - preserves the `animationName` property name for modern browsers;
283
+ - **_transitionDuration_** - preserves the `transitionDuration` property name for modern browsers;
284
+ - **_transitionDelay_** - preserves the `transitionDelay` property name for modern browsers;
285
+ - **_transitionEndEvent_** - preserves the `transitionend` event name for modern browsers;
286
+ - **_transitionProperty_** - preserves the `transitionProperty` property name for modern browsers;
287
+ - **_addEventListener_** - preserves the `addEventListener` method name;
288
+ - **_removeEventListener_** - preserves the `removeEventListener` method name;
300
289
 
301
290
  There are lots more string constants available which include native event names, browser strings, keyboard key codes or ARIA specific attribute names. Be sure to check the `src/strings` folder for a complete list.
302
291
 
303
- ```js
292
+ ```js
304
293
  // EXAMPLES
305
- import {on, off, one, mouseClickEvents, touchEvents, passiveHandler} from '@thednp/shorty';
294
+ import { on, off, one, mouseClickEvents, touchEvents, passiveHandler } from "@thednp/shorty";
306
295
 
307
296
  // attach a passive mousedown eventHandler
308
297
  on(targetElement, mouseClickEvents.down, eventHandler, passiveHandler);
@@ -315,32 +304,34 @@ one(targetElement, touchEvents.start, eventHandler, passiveHandler);
315
304
  ```
316
305
 
317
306
  # Advanced Use
318
- Here's a simple example to showcase the benefit of using ***shorty***.
307
+
308
+ Here's a simple example to showcase the benefit of using **_shorty_**.
319
309
 
320
310
  ```js
321
311
  // This is your typical day to day scripting
322
- const target = document.getElementById('my-element');
312
+ const target = document.getElementById("my-element");
323
313
 
324
- target.addEventListener('click', function(e) {
325
- target.classList.add('my-className');
326
- })
314
+ target.addEventListener("click", function (e) {
315
+ target.classList.add("my-className");
316
+ });
327
317
  ```
328
318
 
329
319
  Now make it all shorty. You might want to import shorties directly from their location, something we like to call "tree shaking".
320
+
330
321
  ```js
331
322
  // Example
332
- import on from '@thednp/shorty/src/event/on';
333
- import addClass from '@thednp/shorty/src/class/addClass';
334
- import getElementById from '@thednp/shorty/src/selectors/getElementById';
335
- import mouseclickEvent from '@thednp/shorty/src/strings/mouseclickEvent';
323
+ import on from "@thednp/shorty/src/event/on";
324
+ import addClass from "@thednp/shorty/src/class/addClass";
325
+ import getElementById from "@thednp/shorty/src/selectors/getElementById";
326
+ import mouseclickEvent from "@thednp/shorty/src/strings/mouseclickEvent";
336
327
 
337
- const target = getElementById('my-element');
328
+ const target = getElementById("my-element");
338
329
 
339
- on(target, mouseclickEvent, function(e) {
340
- addClass(target, 'my-className')
341
- })
330
+ on(target, mouseclickEvent, function (e) {
331
+ addClass(target, "my-className");
332
+ });
342
333
  ```
343
334
 
344
-
345
335
  # License
336
+
346
337
  **shorty** is released under the [MIT License](https://github.com/thednp/shorty/blob/master/LICENSE)