yummies 5.7.1 → 5.8.0

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 (391) hide show
  1. package/async.js +26 -59
  2. package/async.js.map +1 -0
  3. package/common.d.ts +1 -1
  4. package/common.d.ts.map +1 -1
  5. package/common.js +5 -13
  6. package/common.js.map +1 -0
  7. package/complex/global-config.d.ts +1 -1
  8. package/complex/global-config.d.ts.map +1 -1
  9. package/complex/index.d.ts +3 -3
  10. package/complex/index.d.ts.map +1 -1
  11. package/complex/modules-factory.d.ts +1 -1
  12. package/complex/modules-factory.d.ts.map +1 -1
  13. package/complex.js +66 -0
  14. package/complex.js.map +1 -0
  15. package/cookie.d.ts +1 -1
  16. package/cookie.d.ts.map +1 -1
  17. package/cookie.js +4 -8
  18. package/cookie.js.map +1 -0
  19. package/css.d.ts +1 -1
  20. package/css.js +2780 -49
  21. package/css.js.map +1 -0
  22. package/data.js +32 -50
  23. package/data.js.map +1 -0
  24. package/date-time.d.ts +2 -3
  25. package/date-time.d.ts.map +1 -1
  26. package/date-time.js +588 -154
  27. package/date-time.js.map +1 -0
  28. package/device.js +23 -20
  29. package/device.js.map +1 -0
  30. package/encodings.js +269 -265
  31. package/encodings.js.map +1 -0
  32. package/errors.d.ts +1 -1
  33. package/errors.d.ts.map +1 -1
  34. package/errors.js +8 -29
  35. package/errors.js.map +1 -0
  36. package/file.js +19 -23
  37. package/file.js.map +1 -0
  38. package/format/_exports.d.ts +4 -4
  39. package/format/_exports.d.ts.map +1 -1
  40. package/format/index.d.ts +1 -1
  41. package/format/index.d.ts.map +1 -1
  42. package/format/number.d.ts +1 -1
  43. package/format/number.d.ts.map +1 -1
  44. package/format/percent.d.ts +2 -2
  45. package/format/percent.d.ts.map +1 -1
  46. package/format.js +27 -0
  47. package/format.js.map +1 -0
  48. package/html.d.ts +2 -2
  49. package/html.d.ts.map +1 -1
  50. package/html.js +636 -169
  51. package/html.js.map +1 -0
  52. package/id.js +25 -70
  53. package/id.js.map +1 -0
  54. package/imports.js +22 -37
  55. package/imports.js.map +1 -0
  56. package/math.d.ts +1 -1
  57. package/math.d.ts.map +1 -1
  58. package/math.js +10 -14
  59. package/math.js.map +1 -0
  60. package/media.js +54 -96
  61. package/media.js.map +1 -0
  62. package/mobx/apply-observable.d.ts +1 -1
  63. package/mobx/apply-observable.d.ts.map +1 -1
  64. package/mobx/create-enhanced-atom.d.ts +2 -2
  65. package/mobx/create-enhanced-atom.d.ts.map +1 -1
  66. package/mobx/deep-observable-struct.d.ts +1 -1
  67. package/mobx/deep-observable-struct.d.ts.map +1 -1
  68. package/mobx/get-mobx-administration.d.ts +2 -2
  69. package/mobx/get-mobx-administration.d.ts.map +1 -1
  70. package/mobx/index.d.ts +5 -5
  71. package/mobx/index.d.ts.map +1 -1
  72. package/mobx.js +89 -0
  73. package/mobx.js.map +1 -0
  74. package/ms.js +12 -17
  75. package/ms.js.map +1 -0
  76. package/number.js +9 -12
  77. package/number.js.map +1 -0
  78. package/package.json +93 -92
  79. package/parser/_exports.d.ts +3 -3
  80. package/parser/_exports.d.ts.map +1 -1
  81. package/parser/index.d.ts +1 -1
  82. package/parser/index.d.ts.map +1 -1
  83. package/parser/number.d.ts +1 -1
  84. package/parser/number.d.ts.map +1 -1
  85. package/parser/percent.d.ts +2 -2
  86. package/parser/percent.d.ts.map +1 -1
  87. package/parser/string.d.ts +1 -1
  88. package/parser/string.d.ts.map +1 -1
  89. package/parser.js +15 -0
  90. package/parser.js.map +1 -0
  91. package/price.js +13 -16
  92. package/price.js.map +1 -0
  93. package/random.js +11 -13
  94. package/random.js.map +1 -0
  95. package/react/hooks/index.d.ts +21 -21
  96. package/react/hooks/index.d.ts.map +1 -1
  97. package/react/hooks/use-click-outside.d.ts +1 -1
  98. package/react/hooks/use-define-ref.d.ts +1 -1
  99. package/react/hooks/use-element-ref.d.ts +1 -1
  100. package/react/hooks/use-event.d.ts +1 -1
  101. package/react/hooks/use-event.d.ts.map +1 -1
  102. package/react/hooks/use-initial-height.d.ts +1 -1
  103. package/react/hooks/use-last-value-ref.d.ts +1 -1
  104. package/react/hooks/use-resize-observer.d.ts +1 -1
  105. package/react/hooks/use-sync-ref.d.ts +1 -1
  106. package/react/hooks/use-toggle.d.ts +1 -1
  107. package/react/hooks/use-value.d.ts +1 -1
  108. package/react/index.d.ts +1 -1
  109. package/react/index.d.ts.map +1 -1
  110. package/react.js +152 -0
  111. package/react.js.map +1 -0
  112. package/sound.js +7 -11
  113. package/sound.js.map +1 -0
  114. package/text.js +20 -46
  115. package/text.js.map +1 -0
  116. package/type-guard/_exports.d.ts +1 -1
  117. package/type-guard/_exports.d.ts.map +1 -1
  118. package/type-guard/index.d.ts +1 -1
  119. package/type-guard/index.d.ts.map +1 -1
  120. package/type-guard.js +5 -0
  121. package/type-guard.js.map +1 -0
  122. package/utility-types.d.ts.map +1 -0
  123. package/utility-types.js +2 -0
  124. package/utility-types.js.map +1 -0
  125. package/utils/types.js +2 -1
  126. package/utils/types.js.map +1 -0
  127. package/vibrate.js +6 -7
  128. package/vibrate.js.map +1 -0
  129. package/~index-C3wKHvHr.js +80 -0
  130. package/~index-C3wKHvHr.js.map +1 -0
  131. package/~number-EWff2XI6.js +25 -0
  132. package/~number-EWff2XI6.js.map +1 -0
  133. package/~number-baxVnzrJ.js +32 -0
  134. package/~number-baxVnzrJ.js.map +1 -0
  135. package/async.cjs +0 -70
  136. package/async.d.cts +0 -28
  137. package/async.d.cts.map +0 -1
  138. package/common.cjs +0 -18
  139. package/common.d.cts +0 -15
  140. package/common.d.cts.map +0 -1
  141. package/complex/counter.cjs +0 -21
  142. package/complex/counter.d.cts +0 -15
  143. package/complex/counter.d.cts.map +0 -1
  144. package/complex/counter.js +0 -17
  145. package/complex/global-config.cjs +0 -46
  146. package/complex/global-config.d.cts +0 -11
  147. package/complex/global-config.d.cts.map +0 -1
  148. package/complex/global-config.js +0 -41
  149. package/complex/index.cjs +0 -19
  150. package/complex/index.d.cts +0 -4
  151. package/complex/index.d.cts.map +0 -1
  152. package/complex/index.js +0 -3
  153. package/complex/modules-factory.cjs +0 -50
  154. package/complex/modules-factory.d.cts +0 -49
  155. package/complex/modules-factory.d.cts.map +0 -1
  156. package/complex/modules-factory.js +0 -46
  157. package/cookie.cjs +0 -13
  158. package/cookie.d.cts +0 -3
  159. package/cookie.d.cts.map +0 -1
  160. package/css.cjs +0 -64
  161. package/css.d.cts +0 -42
  162. package/css.d.cts.map +0 -1
  163. package/data.cjs +0 -58
  164. package/data.d.cts +0 -4
  165. package/data.d.cts.map +0 -1
  166. package/date-time.cjs +0 -171
  167. package/date-time.d.cts +0 -28
  168. package/date-time.d.cts.map +0 -1
  169. package/device.cjs +0 -28
  170. package/device.d.cts +0 -8
  171. package/device.d.cts.map +0 -1
  172. package/encodings.cjs +0 -270
  173. package/encodings.d.cts +0 -2
  174. package/encodings.d.cts.map +0 -1
  175. package/errors.cjs +0 -34
  176. package/errors.d.cts +0 -19
  177. package/errors.d.cts.map +0 -1
  178. package/file.cjs +0 -29
  179. package/file.d.cts +0 -3
  180. package/file.d.cts.map +0 -1
  181. package/format/_exports.cjs +0 -20
  182. package/format/_exports.d.cts +0 -5
  183. package/format/_exports.d.cts.map +0 -1
  184. package/format/_exports.js +0 -4
  185. package/format/constants.cjs +0 -6
  186. package/format/constants.d.cts +0 -4
  187. package/format/constants.d.cts.map +0 -1
  188. package/format/constants.js +0 -3
  189. package/format/index.cjs +0 -40
  190. package/format/index.d.cts +0 -3
  191. package/format/index.d.cts.map +0 -1
  192. package/format/index.js +0 -4
  193. package/format/number.cjs +0 -48
  194. package/format/number.d.cts +0 -36
  195. package/format/number.d.cts.map +0 -1
  196. package/format/number.js +0 -44
  197. package/format/percent.cjs +0 -27
  198. package/format/percent.d.cts +0 -15
  199. package/format/percent.d.cts.map +0 -1
  200. package/format/percent.js +0 -23
  201. package/format/skip-spaces.cjs +0 -8
  202. package/format/skip-spaces.d.cts +0 -5
  203. package/format/skip-spaces.d.cts.map +0 -1
  204. package/format/skip-spaces.js +0 -4
  205. package/html.cjs +0 -202
  206. package/html.d.cts +0 -44
  207. package/html.d.cts.map +0 -1
  208. package/id.cjs +0 -76
  209. package/id.d.cts +0 -63
  210. package/id.d.cts.map +0 -1
  211. package/imports.cjs +0 -45
  212. package/imports.d.cts +0 -15
  213. package/imports.d.cts.map +0 -1
  214. package/math.cjs +0 -23
  215. package/math.d.cts +0 -13
  216. package/math.d.cts.map +0 -1
  217. package/media.cjs +0 -115
  218. package/media.d.cts +0 -20
  219. package/media.d.cts.map +0 -1
  220. package/mobx/apply-observable.cjs +0 -16
  221. package/mobx/apply-observable.d.cts +0 -4
  222. package/mobx/apply-observable.d.cts.map +0 -1
  223. package/mobx/apply-observable.js +0 -12
  224. package/mobx/create-enhanced-atom.cjs +0 -16
  225. package/mobx/create-enhanced-atom.d.cts +0 -11
  226. package/mobx/create-enhanced-atom.d.cts.map +0 -1
  227. package/mobx/create-enhanced-atom.js +0 -12
  228. package/mobx/deep-observable-struct.cjs +0 -61
  229. package/mobx/deep-observable-struct.d.cts +0 -7
  230. package/mobx/deep-observable-struct.d.cts.map +0 -1
  231. package/mobx/deep-observable-struct.js +0 -57
  232. package/mobx/get-mobx-administration.cjs +0 -6
  233. package/mobx/get-mobx-administration.d.cts +0 -6
  234. package/mobx/get-mobx-administration.d.cts.map +0 -1
  235. package/mobx/get-mobx-administration.js +0 -2
  236. package/mobx/index.cjs +0 -21
  237. package/mobx/index.d.cts +0 -6
  238. package/mobx/index.d.cts.map +0 -1
  239. package/mobx/index.js +0 -5
  240. package/mobx/lazy-observe.cjs +0 -66
  241. package/mobx/lazy-observe.d.cts +0 -14
  242. package/mobx/lazy-observe.d.cts.map +0 -1
  243. package/mobx/lazy-observe.js +0 -62
  244. package/ms.cjs +0 -22
  245. package/ms.d.cts +0 -19
  246. package/ms.d.cts.map +0 -1
  247. package/number.cjs +0 -16
  248. package/number.d.cts +0 -8
  249. package/number.d.cts.map +0 -1
  250. package/parser/_exports.cjs +0 -19
  251. package/parser/_exports.d.cts +0 -4
  252. package/parser/_exports.d.cts.map +0 -1
  253. package/parser/_exports.js +0 -3
  254. package/parser/index.cjs +0 -40
  255. package/parser/index.d.cts +0 -3
  256. package/parser/index.d.cts.map +0 -1
  257. package/parser/index.js +0 -4
  258. package/parser/number.cjs +0 -48
  259. package/parser/number.d.cts +0 -21
  260. package/parser/number.d.cts.map +0 -1
  261. package/parser/number.js +0 -44
  262. package/parser/percent.cjs +0 -8
  263. package/parser/percent.d.cts +0 -4
  264. package/parser/percent.d.cts.map +0 -1
  265. package/parser/percent.js +0 -4
  266. package/parser/string.cjs +0 -18
  267. package/parser/string.d.cts +0 -7
  268. package/parser/string.d.cts.map +0 -1
  269. package/parser/string.js +0 -14
  270. package/price.cjs +0 -21
  271. package/price.d.cts +0 -6
  272. package/price.d.cts.map +0 -1
  273. package/random.cjs +0 -25
  274. package/random.d.cts +0 -9
  275. package/random.d.cts.map +0 -1
  276. package/react/hooks/index.cjs +0 -37
  277. package/react/hooks/index.d.cts +0 -22
  278. package/react/hooks/index.d.cts.map +0 -1
  279. package/react/hooks/index.js +0 -21
  280. package/react/hooks/use-abort-controller.cjs +0 -15
  281. package/react/hooks/use-abort-controller.d.cts +0 -2
  282. package/react/hooks/use-abort-controller.d.cts.map +0 -1
  283. package/react/hooks/use-abort-controller.js +0 -11
  284. package/react/hooks/use-abort-signal.cjs +0 -8
  285. package/react/hooks/use-abort-signal.d.cts +0 -2
  286. package/react/hooks/use-abort-signal.d.cts.map +0 -1
  287. package/react/hooks/use-abort-signal.js +0 -4
  288. package/react/hooks/use-click-outside.cjs +0 -17
  289. package/react/hooks/use-click-outside.d.cts +0 -9
  290. package/react/hooks/use-click-outside.d.cts.map +0 -1
  291. package/react/hooks/use-click-outside.js +0 -13
  292. package/react/hooks/use-constant.cjs +0 -19
  293. package/react/hooks/use-constant.d.cts +0 -9
  294. package/react/hooks/use-constant.d.cts.map +0 -1
  295. package/react/hooks/use-constant.js +0 -15
  296. package/react/hooks/use-define-ref.cjs +0 -19
  297. package/react/hooks/use-define-ref.d.cts +0 -10
  298. package/react/hooks/use-define-ref.d.cts.map +0 -1
  299. package/react/hooks/use-define-ref.js +0 -15
  300. package/react/hooks/use-element-ref.cjs +0 -12
  301. package/react/hooks/use-element-ref.d.cts +0 -2
  302. package/react/hooks/use-element-ref.d.cts.map +0 -1
  303. package/react/hooks/use-element-ref.js +0 -8
  304. package/react/hooks/use-event-listener.cjs +0 -17
  305. package/react/hooks/use-event-listener.d.cts +0 -8
  306. package/react/hooks/use-event-listener.d.cts.map +0 -1
  307. package/react/hooks/use-event-listener.js +0 -13
  308. package/react/hooks/use-event.cjs +0 -23
  309. package/react/hooks/use-event.d.cts +0 -3
  310. package/react/hooks/use-event.d.cts.map +0 -1
  311. package/react/hooks/use-event.js +0 -19
  312. package/react/hooks/use-flag.cjs +0 -19
  313. package/react/hooks/use-flag.d.cts +0 -8
  314. package/react/hooks/use-flag.d.cts.map +0 -1
  315. package/react/hooks/use-flag.js +0 -15
  316. package/react/hooks/use-force-update.cjs +0 -11
  317. package/react/hooks/use-force-update.d.cts +0 -2
  318. package/react/hooks/use-force-update.d.cts.map +0 -1
  319. package/react/hooks/use-force-update.js +0 -7
  320. package/react/hooks/use-initial-height.cjs +0 -15
  321. package/react/hooks/use-initial-height.d.cts +0 -5
  322. package/react/hooks/use-initial-height.d.cts.map +0 -1
  323. package/react/hooks/use-initial-height.js +0 -11
  324. package/react/hooks/use-instance.cjs +0 -31
  325. package/react/hooks/use-instance.d.cts +0 -27
  326. package/react/hooks/use-instance.d.cts.map +0 -1
  327. package/react/hooks/use-instance.js +0 -27
  328. package/react/hooks/use-intersection-observer.cjs +0 -14
  329. package/react/hooks/use-intersection-observer.d.cts +0 -2
  330. package/react/hooks/use-intersection-observer.d.cts.map +0 -1
  331. package/react/hooks/use-intersection-observer.js +0 -10
  332. package/react/hooks/use-last-defined-value.cjs +0 -12
  333. package/react/hooks/use-last-defined-value.d.cts +0 -2
  334. package/react/hooks/use-last-defined-value.d.cts.map +0 -1
  335. package/react/hooks/use-last-defined-value.js +0 -8
  336. package/react/hooks/use-last-value-ref.cjs +0 -12
  337. package/react/hooks/use-last-value-ref.d.cts +0 -2
  338. package/react/hooks/use-last-value-ref.d.cts.map +0 -1
  339. package/react/hooks/use-last-value-ref.js +0 -8
  340. package/react/hooks/use-life-cycle.cjs +0 -14
  341. package/react/hooks/use-life-cycle.d.cts +0 -5
  342. package/react/hooks/use-life-cycle.d.cts.map +0 -1
  343. package/react/hooks/use-life-cycle.js +0 -10
  344. package/react/hooks/use-resize-observer.cjs +0 -15
  345. package/react/hooks/use-resize-observer.d.cts +0 -2
  346. package/react/hooks/use-resize-observer.d.cts.map +0 -1
  347. package/react/hooks/use-resize-observer.js +0 -11
  348. package/react/hooks/use-sync-ref.cjs +0 -10
  349. package/react/hooks/use-sync-ref.d.cts +0 -2
  350. package/react/hooks/use-sync-ref.d.cts.map +0 -1
  351. package/react/hooks/use-sync-ref.js +0 -6
  352. package/react/hooks/use-toggle.cjs +0 -10
  353. package/react/hooks/use-toggle.d.cts +0 -2
  354. package/react/hooks/use-toggle.d.cts.map +0 -1
  355. package/react/hooks/use-toggle.js +0 -6
  356. package/react/hooks/use-value.cjs +0 -12
  357. package/react/hooks/use-value.d.cts +0 -5
  358. package/react/hooks/use-value.d.cts.map +0 -1
  359. package/react/hooks/use-value.js +0 -8
  360. package/react/hooks/use-visibility-state.cjs +0 -18
  361. package/react/hooks/use-visibility-state.d.cts +0 -2
  362. package/react/hooks/use-visibility-state.d.cts.map +0 -1
  363. package/react/hooks/use-visibility-state.js +0 -14
  364. package/react/index.cjs +0 -17
  365. package/react/index.d.cts +0 -2
  366. package/react/index.d.cts.map +0 -1
  367. package/react/index.js +0 -1
  368. package/sound.cjs +0 -16
  369. package/sound.d.cts +0 -7
  370. package/sound.d.cts.map +0 -1
  371. package/storage.cjs +0 -48
  372. package/storage.d.cts +0 -39
  373. package/storage.d.cts.map +0 -1
  374. package/storage.js +0 -43
  375. package/text.cjs +0 -53
  376. package/text.d.cts +0 -15
  377. package/text.d.cts.map +0 -1
  378. package/type-guard/_exports.cjs +0 -129
  379. package/type-guard/_exports.d.cts +0 -86
  380. package/type-guard/_exports.d.cts.map +0 -1
  381. package/type-guard/_exports.js +0 -125
  382. package/type-guard/index.cjs +0 -40
  383. package/type-guard/index.d.cts +0 -3
  384. package/type-guard/index.d.cts.map +0 -1
  385. package/type-guard/index.js +0 -4
  386. package/utils/types.cjs +0 -2
  387. package/utils/types.d.cts +0 -395
  388. package/utils/types.d.cts.map +0 -1
  389. package/vibrate.cjs +0 -12
  390. package/vibrate.d.cts +0 -5
  391. package/vibrate.d.cts.map +0 -1
package/encodings.js CHANGED
@@ -1,267 +1,271 @@
1
- const DMap = {
2
- 0: 0,
3
- 1: 1,
4
- 2: 2,
5
- 3: 3,
6
- 4: 4,
7
- 5: 5,
8
- 6: 6,
9
- 7: 7,
10
- 8: 8,
11
- 9: 9,
12
- 10: 10,
13
- 11: 11,
14
- 12: 12,
15
- 13: 13,
16
- 14: 14,
17
- 15: 15,
18
- 16: 16,
19
- 17: 17,
20
- 18: 18,
21
- 19: 19,
22
- 20: 20,
23
- 21: 21,
24
- 22: 22,
25
- 23: 23,
26
- 24: 24,
27
- 25: 25,
28
- 26: 26,
29
- 27: 27,
30
- 28: 28,
31
- 29: 29,
32
- 30: 30,
33
- 31: 31,
34
- 32: 32,
35
- 33: 33,
36
- 34: 34,
37
- 35: 35,
38
- 36: 36,
39
- 37: 37,
40
- 38: 38,
41
- 39: 39,
42
- 40: 40,
43
- 41: 41,
44
- 42: 42,
45
- 43: 43,
46
- 44: 44,
47
- 45: 45,
48
- 46: 46,
49
- 47: 47,
50
- 48: 48,
51
- 49: 49,
52
- 50: 50,
53
- 51: 51,
54
- 52: 52,
55
- 53: 53,
56
- 54: 54,
57
- 55: 55,
58
- 56: 56,
59
- 57: 57,
60
- 58: 58,
61
- 59: 59,
62
- 60: 60,
63
- 61: 61,
64
- 62: 62,
65
- 63: 63,
66
- 64: 64,
67
- 65: 65,
68
- 66: 66,
69
- 67: 67,
70
- 68: 68,
71
- 69: 69,
72
- 70: 70,
73
- 71: 71,
74
- 72: 72,
75
- 73: 73,
76
- 74: 74,
77
- 75: 75,
78
- 76: 76,
79
- 77: 77,
80
- 78: 78,
81
- 79: 79,
82
- 80: 80,
83
- 81: 81,
84
- 82: 82,
85
- 83: 83,
86
- 84: 84,
87
- 85: 85,
88
- 86: 86,
89
- 87: 87,
90
- 88: 88,
91
- 89: 89,
92
- 90: 90,
93
- 91: 91,
94
- 92: 92,
95
- 93: 93,
96
- 94: 94,
97
- 95: 95,
98
- 96: 96,
99
- 97: 97,
100
- 98: 98,
101
- 99: 99,
102
- 100: 100,
103
- 101: 101,
104
- 102: 102,
105
- 103: 103,
106
- 104: 104,
107
- 105: 105,
108
- 106: 106,
109
- 107: 107,
110
- 108: 108,
111
- 109: 109,
112
- 110: 110,
113
- 111: 111,
114
- 112: 112,
115
- 113: 113,
116
- 114: 114,
117
- 115: 115,
118
- 116: 116,
119
- 117: 117,
120
- 118: 118,
121
- 119: 119,
122
- 120: 120,
123
- 121: 121,
124
- 122: 122,
125
- 123: 123,
126
- 124: 124,
127
- 125: 125,
128
- 126: 126,
129
- 127: 127,
130
- 1027: 129,
131
- 8225: 135,
132
- 1046: 198,
133
- 8222: 132,
134
- 1047: 199,
135
- 1168: 165,
136
- 1048: 200,
137
- 1113: 154,
138
- 1049: 201,
139
- 1045: 197,
140
- 1050: 202,
141
- 1028: 170,
142
- 160: 160,
143
- 1040: 192,
144
- 1051: 203,
145
- 164: 164,
146
- 166: 166,
147
- 167: 167,
148
- 169: 169,
149
- 171: 171,
150
- 172: 172,
151
- 173: 173,
152
- 174: 174,
153
- 1053: 205,
154
- 176: 176,
155
- 177: 177,
156
- 1114: 156,
157
- 181: 181,
158
- 182: 182,
159
- 183: 183,
160
- 8221: 148,
161
- 187: 187,
162
- 1029: 189,
163
- 1056: 208,
164
- 1057: 209,
165
- 1058: 210,
166
- 8364: 136,
167
- 1112: 188,
168
- 1115: 158,
169
- 1059: 211,
170
- 1060: 212,
171
- 1030: 178,
172
- 1061: 213,
173
- 1062: 214,
174
- 1063: 215,
175
- 1116: 157,
176
- 1064: 216,
177
- 1065: 217,
178
- 1031: 175,
179
- 1066: 218,
180
- 1067: 219,
181
- 1068: 220,
182
- 1069: 221,
183
- 1070: 222,
184
- 1032: 163,
185
- 8226: 149,
186
- 1071: 223,
187
- 1072: 224,
188
- 8482: 153,
189
- 1073: 225,
190
- 8240: 137,
191
- 1118: 162,
192
- 1074: 226,
193
- 1110: 179,
194
- 8230: 133,
195
- 1075: 227,
196
- 1033: 138,
197
- 1076: 228,
198
- 1077: 229,
199
- 8211: 150,
200
- 1078: 230,
201
- 1119: 159,
202
- 1079: 231,
203
- 1042: 194,
204
- 1080: 232,
205
- 1034: 140,
206
- 1025: 168,
207
- 1081: 233,
208
- 1082: 234,
209
- 8212: 151,
210
- 1083: 235,
211
- 1169: 180,
212
- 1084: 236,
213
- 1052: 204,
214
- 1085: 237,
215
- 1035: 142,
216
- 1086: 238,
217
- 1087: 239,
218
- 1088: 240,
219
- 1089: 241,
220
- 1090: 242,
221
- 1036: 141,
222
- 1041: 193,
223
- 1091: 243,
224
- 1092: 244,
225
- 8224: 134,
226
- 1093: 245,
227
- 8470: 185,
228
- 1094: 246,
229
- 1054: 206,
230
- 1095: 247,
231
- 1096: 248,
232
- 8249: 139,
233
- 1097: 249,
234
- 1098: 250,
235
- 1044: 196,
236
- 1099: 251,
237
- 1111: 191,
238
- 1055: 207,
239
- 1100: 252,
240
- 1038: 161,
241
- 8220: 147,
242
- 1101: 253,
243
- 8250: 155,
244
- 1102: 254,
245
- 8216: 145,
246
- 1103: 255,
247
- 1043: 195,
248
- 1105: 184,
249
- 1039: 143,
250
- 1026: 128,
251
- 1106: 144,
252
- 8218: 130,
253
- 1107: 131,
254
- 8217: 146,
255
- 1108: 186,
256
- 1109: 190,
1
+ const e = {
2
+ 0: 0,
3
+ 1: 1,
4
+ 2: 2,
5
+ 3: 3,
6
+ 4: 4,
7
+ 5: 5,
8
+ 6: 6,
9
+ 7: 7,
10
+ 8: 8,
11
+ 9: 9,
12
+ 10: 10,
13
+ 11: 11,
14
+ 12: 12,
15
+ 13: 13,
16
+ 14: 14,
17
+ 15: 15,
18
+ 16: 16,
19
+ 17: 17,
20
+ 18: 18,
21
+ 19: 19,
22
+ 20: 20,
23
+ 21: 21,
24
+ 22: 22,
25
+ 23: 23,
26
+ 24: 24,
27
+ 25: 25,
28
+ 26: 26,
29
+ 27: 27,
30
+ 28: 28,
31
+ 29: 29,
32
+ 30: 30,
33
+ 31: 31,
34
+ 32: 32,
35
+ 33: 33,
36
+ 34: 34,
37
+ 35: 35,
38
+ 36: 36,
39
+ 37: 37,
40
+ 38: 38,
41
+ 39: 39,
42
+ 40: 40,
43
+ 41: 41,
44
+ 42: 42,
45
+ 43: 43,
46
+ 44: 44,
47
+ 45: 45,
48
+ 46: 46,
49
+ 47: 47,
50
+ 48: 48,
51
+ 49: 49,
52
+ 50: 50,
53
+ 51: 51,
54
+ 52: 52,
55
+ 53: 53,
56
+ 54: 54,
57
+ 55: 55,
58
+ 56: 56,
59
+ 57: 57,
60
+ 58: 58,
61
+ 59: 59,
62
+ 60: 60,
63
+ 61: 61,
64
+ 62: 62,
65
+ 63: 63,
66
+ 64: 64,
67
+ 65: 65,
68
+ 66: 66,
69
+ 67: 67,
70
+ 68: 68,
71
+ 69: 69,
72
+ 70: 70,
73
+ 71: 71,
74
+ 72: 72,
75
+ 73: 73,
76
+ 74: 74,
77
+ 75: 75,
78
+ 76: 76,
79
+ 77: 77,
80
+ 78: 78,
81
+ 79: 79,
82
+ 80: 80,
83
+ 81: 81,
84
+ 82: 82,
85
+ 83: 83,
86
+ 84: 84,
87
+ 85: 85,
88
+ 86: 86,
89
+ 87: 87,
90
+ 88: 88,
91
+ 89: 89,
92
+ 90: 90,
93
+ 91: 91,
94
+ 92: 92,
95
+ 93: 93,
96
+ 94: 94,
97
+ 95: 95,
98
+ 96: 96,
99
+ 97: 97,
100
+ 98: 98,
101
+ 99: 99,
102
+ 100: 100,
103
+ 101: 101,
104
+ 102: 102,
105
+ 103: 103,
106
+ 104: 104,
107
+ 105: 105,
108
+ 106: 106,
109
+ 107: 107,
110
+ 108: 108,
111
+ 109: 109,
112
+ 110: 110,
113
+ 111: 111,
114
+ 112: 112,
115
+ 113: 113,
116
+ 114: 114,
117
+ 115: 115,
118
+ 116: 116,
119
+ 117: 117,
120
+ 118: 118,
121
+ 119: 119,
122
+ 120: 120,
123
+ 121: 121,
124
+ 122: 122,
125
+ 123: 123,
126
+ 124: 124,
127
+ 125: 125,
128
+ 126: 126,
129
+ 127: 127,
130
+ 1027: 129,
131
+ 8225: 135,
132
+ 1046: 198,
133
+ 8222: 132,
134
+ 1047: 199,
135
+ 1168: 165,
136
+ 1048: 200,
137
+ 1113: 154,
138
+ 1049: 201,
139
+ 1045: 197,
140
+ 1050: 202,
141
+ 1028: 170,
142
+ 160: 160,
143
+ 1040: 192,
144
+ 1051: 203,
145
+ 164: 164,
146
+ 166: 166,
147
+ 167: 167,
148
+ 169: 169,
149
+ 171: 171,
150
+ 172: 172,
151
+ 173: 173,
152
+ 174: 174,
153
+ 1053: 205,
154
+ 176: 176,
155
+ 177: 177,
156
+ 1114: 156,
157
+ 181: 181,
158
+ 182: 182,
159
+ 183: 183,
160
+ 8221: 148,
161
+ 187: 187,
162
+ 1029: 189,
163
+ 1056: 208,
164
+ 1057: 209,
165
+ 1058: 210,
166
+ 8364: 136,
167
+ 1112: 188,
168
+ 1115: 158,
169
+ 1059: 211,
170
+ 1060: 212,
171
+ 1030: 178,
172
+ 1061: 213,
173
+ 1062: 214,
174
+ 1063: 215,
175
+ 1116: 157,
176
+ 1064: 216,
177
+ 1065: 217,
178
+ 1031: 175,
179
+ 1066: 218,
180
+ 1067: 219,
181
+ 1068: 220,
182
+ 1069: 221,
183
+ 1070: 222,
184
+ 1032: 163,
185
+ 8226: 149,
186
+ 1071: 223,
187
+ 1072: 224,
188
+ 8482: 153,
189
+ 1073: 225,
190
+ 8240: 137,
191
+ 1118: 162,
192
+ 1074: 226,
193
+ 1110: 179,
194
+ 8230: 133,
195
+ 1075: 227,
196
+ 1033: 138,
197
+ 1076: 228,
198
+ 1077: 229,
199
+ 8211: 150,
200
+ 1078: 230,
201
+ 1119: 159,
202
+ 1079: 231,
203
+ 1042: 194,
204
+ 1080: 232,
205
+ 1034: 140,
206
+ 1025: 168,
207
+ 1081: 233,
208
+ 1082: 234,
209
+ 8212: 151,
210
+ 1083: 235,
211
+ 1169: 180,
212
+ 1084: 236,
213
+ 1052: 204,
214
+ 1085: 237,
215
+ 1035: 142,
216
+ 1086: 238,
217
+ 1087: 239,
218
+ 1088: 240,
219
+ 1089: 241,
220
+ 1090: 242,
221
+ 1036: 141,
222
+ 1041: 193,
223
+ 1091: 243,
224
+ 1092: 244,
225
+ 8224: 134,
226
+ 1093: 245,
227
+ 8470: 185,
228
+ 1094: 246,
229
+ 1054: 206,
230
+ 1095: 247,
231
+ 1096: 248,
232
+ 8249: 139,
233
+ 1097: 249,
234
+ 1098: 250,
235
+ 1044: 196,
236
+ 1099: 251,
237
+ 1111: 191,
238
+ 1055: 207,
239
+ 1100: 252,
240
+ 1038: 161,
241
+ 8220: 147,
242
+ 1101: 253,
243
+ 8250: 155,
244
+ 1102: 254,
245
+ 8216: 145,
246
+ 1103: 255,
247
+ 1043: 195,
248
+ 1105: 184,
249
+ 1039: 143,
250
+ 1026: 128,
251
+ 1106: 144,
252
+ 8218: 130,
253
+ 1107: 131,
254
+ 8217: 146,
255
+ 1108: 186,
256
+ 1109: 190
257
257
  };
258
- export function unicodeToWin1251(s) {
259
- const L = [];
260
- for (let i = 0; i < s.length; i++) {
261
- const ord = s.charCodeAt(i);
262
- if (!(ord in DMap))
263
- throw new Error(`Character ${s.charAt(i)} isn't supported by win1251!`);
264
- L.push(String.fromCharCode(DMap[ord]));
265
- }
266
- return L.join('');
258
+ function i(o) {
259
+ const n = [];
260
+ for (let r = 0; r < o.length; r++) {
261
+ const t = o.charCodeAt(r);
262
+ if (!(t in e))
263
+ throw new Error(`Character ${o.charAt(r)} isn't supported by win1251!`);
264
+ n.push(String.fromCharCode(e[t]));
265
+ }
266
+ return n.join("");
267
267
  }
268
+ export {
269
+ i as unicodeToWin1251
270
+ };
271
+ //# sourceMappingURL=encodings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodings.js","sources":["../src/encodings.ts"],"sourcesContent":["import type { AnyObject } from 'yummies/utils/types';\n\nconst DMap: AnyObject = {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n 5: 5,\n 6: 6,\n 7: 7,\n 8: 8,\n 9: 9,\n 10: 10,\n 11: 11,\n 12: 12,\n 13: 13,\n 14: 14,\n 15: 15,\n 16: 16,\n 17: 17,\n 18: 18,\n 19: 19,\n 20: 20,\n 21: 21,\n 22: 22,\n 23: 23,\n 24: 24,\n 25: 25,\n 26: 26,\n 27: 27,\n 28: 28,\n 29: 29,\n 30: 30,\n 31: 31,\n 32: 32,\n 33: 33,\n 34: 34,\n 35: 35,\n 36: 36,\n 37: 37,\n 38: 38,\n 39: 39,\n 40: 40,\n 41: 41,\n 42: 42,\n 43: 43,\n 44: 44,\n 45: 45,\n 46: 46,\n 47: 47,\n 48: 48,\n 49: 49,\n 50: 50,\n 51: 51,\n 52: 52,\n 53: 53,\n 54: 54,\n 55: 55,\n 56: 56,\n 57: 57,\n 58: 58,\n 59: 59,\n 60: 60,\n 61: 61,\n 62: 62,\n 63: 63,\n 64: 64,\n 65: 65,\n 66: 66,\n 67: 67,\n 68: 68,\n 69: 69,\n 70: 70,\n 71: 71,\n 72: 72,\n 73: 73,\n 74: 74,\n 75: 75,\n 76: 76,\n 77: 77,\n 78: 78,\n 79: 79,\n 80: 80,\n 81: 81,\n 82: 82,\n 83: 83,\n 84: 84,\n 85: 85,\n 86: 86,\n 87: 87,\n 88: 88,\n 89: 89,\n 90: 90,\n 91: 91,\n 92: 92,\n 93: 93,\n 94: 94,\n 95: 95,\n 96: 96,\n 97: 97,\n 98: 98,\n 99: 99,\n 100: 100,\n 101: 101,\n 102: 102,\n 103: 103,\n 104: 104,\n 105: 105,\n 106: 106,\n 107: 107,\n 108: 108,\n 109: 109,\n 110: 110,\n 111: 111,\n 112: 112,\n 113: 113,\n 114: 114,\n 115: 115,\n 116: 116,\n 117: 117,\n 118: 118,\n 119: 119,\n 120: 120,\n 121: 121,\n 122: 122,\n 123: 123,\n 124: 124,\n 125: 125,\n 126: 126,\n 127: 127,\n 1027: 129,\n 8225: 135,\n 1046: 198,\n 8222: 132,\n 1047: 199,\n 1168: 165,\n 1048: 200,\n 1113: 154,\n 1049: 201,\n 1045: 197,\n 1050: 202,\n 1028: 170,\n 160: 160,\n 1040: 192,\n 1051: 203,\n 164: 164,\n 166: 166,\n 167: 167,\n 169: 169,\n 171: 171,\n 172: 172,\n 173: 173,\n 174: 174,\n 1053: 205,\n 176: 176,\n 177: 177,\n 1114: 156,\n 181: 181,\n 182: 182,\n 183: 183,\n 8221: 148,\n 187: 187,\n 1029: 189,\n 1056: 208,\n 1057: 209,\n 1058: 210,\n 8364: 136,\n 1112: 188,\n 1115: 158,\n 1059: 211,\n 1060: 212,\n 1030: 178,\n 1061: 213,\n 1062: 214,\n 1063: 215,\n 1116: 157,\n 1064: 216,\n 1065: 217,\n 1031: 175,\n 1066: 218,\n 1067: 219,\n 1068: 220,\n 1069: 221,\n 1070: 222,\n 1032: 163,\n 8226: 149,\n 1071: 223,\n 1072: 224,\n 8482: 153,\n 1073: 225,\n 8240: 137,\n 1118: 162,\n 1074: 226,\n 1110: 179,\n 8230: 133,\n 1075: 227,\n 1033: 138,\n 1076: 228,\n 1077: 229,\n 8211: 150,\n 1078: 230,\n 1119: 159,\n 1079: 231,\n 1042: 194,\n 1080: 232,\n 1034: 140,\n 1025: 168,\n 1081: 233,\n 1082: 234,\n 8212: 151,\n 1083: 235,\n 1169: 180,\n 1084: 236,\n 1052: 204,\n 1085: 237,\n 1035: 142,\n 1086: 238,\n 1087: 239,\n 1088: 240,\n 1089: 241,\n 1090: 242,\n 1036: 141,\n 1041: 193,\n 1091: 243,\n 1092: 244,\n 8224: 134,\n 1093: 245,\n 8470: 185,\n 1094: 246,\n 1054: 206,\n 1095: 247,\n 1096: 248,\n 8249: 139,\n 1097: 249,\n 1098: 250,\n 1044: 196,\n 1099: 251,\n 1111: 191,\n 1055: 207,\n 1100: 252,\n 1038: 161,\n 8220: 147,\n 1101: 253,\n 8250: 155,\n 1102: 254,\n 8216: 145,\n 1103: 255,\n 1043: 195,\n 1105: 184,\n 1039: 143,\n 1026: 128,\n 1106: 144,\n 8218: 130,\n 1107: 131,\n 8217: 146,\n 1108: 186,\n 1109: 190,\n};\n\nexport function unicodeToWin1251(s: string) {\n const L = [];\n for (let i = 0; i < s.length; i++) {\n const ord = s.charCodeAt(i);\n if (!(ord in DMap))\n throw new Error(`Character ${s.charAt(i)} isn't supported by win1251!`);\n L.push(String.fromCharCode(DMap[ord]));\n }\n return L.join('');\n}\n"],"names":["DMap","unicodeToWin1251","s","L","i","ord"],"mappings":"AAEA,MAAMA,IAAkB;AAAA,EACtB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,I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M;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEO,SAASC,EAAiBC,GAAW;AAC1C,QAAMC,IAAI,CAAA;AACV,WAASC,IAAI,GAAGA,IAAIF,EAAE,QAAQE,KAAK;AACjC,UAAMC,IAAMH,EAAE,WAAWE,CAAC;AAC1B,QAAI,EAAEC,KAAOL;AACX,YAAM,IAAI,MAAM,aAAaE,EAAE,OAAOE,CAAC,CAAC,8BAA8B;AACxE,IAAAD,EAAE,KAAK,OAAO,aAAaH,EAAKK,CAAG,CAAC,CAAC;AAAA,EACvC;AACA,SAAOF,EAAE,KAAK,EAAE;AAClB;"}
package/errors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Maybe } from "./utils/types.js";
1
+ import { Maybe } from './utils/types.ts';
2
2
  type GetErrorTextEnhancer = (error: any) => string;
3
3
  type GetErrorTextFormatErrorFn = (error: Error) => string;
4
4
  /**
package/errors.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,yBAAyB;AAE9C,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;AACnD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;YAAW,OAAO;;;;CAqB1C,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;AACnD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;YAAW,OAAO;;;;CAqB1C,CAAC"}
package/errors.js CHANGED
@@ -1,30 +1,9 @@
1
- import { typeGuard } from "./type-guard/index.js";
2
- /**
3
- * Universal function for transforming any errors into readable error text
4
- *
5
- * This function can be enhanced with custom handlers using:
6
- * - `getErrorText.unknownErrorText`
7
- * - `getErrorText.formatError`
8
- * - `getErrorText.enhance`
9
- */
10
- export const getErrorText = (error) => {
11
- if (!error) {
12
- return getErrorText.unknownErrorText;
13
- }
14
- if (typeGuard.isString(error)) {
15
- return error || getErrorText.unknownErrorText;
16
- }
17
- if (error instanceof Error) {
18
- return ((getErrorText.formatError?.(error) ?? error.message) ||
19
- getErrorText.unknownErrorText);
20
- }
21
- if (getErrorText.enhance) {
22
- return getErrorText.enhance(error) ?? getErrorText.unknownErrorText;
23
- }
24
- else {
25
- return getErrorText.unknownErrorText;
26
- }
1
+ import { i as t } from "./~index-C3wKHvHr.js";
2
+ const n = (r) => r ? t(r) ? r || n.unknownErrorText : r instanceof Error ? (n.formatError?.(r) ?? r.message) || n.unknownErrorText : n.enhance ? n.enhance(r) ?? n.unknownErrorText : n.unknownErrorText : n.unknownErrorText;
3
+ n.unknownErrorText = "";
4
+ n.formatError = null;
5
+ n.enhance = null;
6
+ export {
7
+ n as getErrorText
27
8
  };
28
- getErrorText.unknownErrorText = '';
29
- getErrorText.formatError = null;
30
- getErrorText.enhance = null;
9
+ //# sourceMappingURL=errors.js.map
package/errors.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sources":["../src/errors.ts"],"sourcesContent":["import type { Maybe } from 'yummies/utils/types';\nimport { typeGuard } from './type-guard/index.js';\n\ntype GetErrorTextEnhancer = (error: any) => string;\ntype GetErrorTextFormatErrorFn = (error: Error) => string;\n\n/**\n * Universal function for transforming any errors into readable error text\n *\n * This function can be enhanced with custom handlers using:\n * - `getErrorText.unknownErrorText`\n * - `getErrorText.formatError`\n * - `getErrorText.enhance`\n */\nexport const getErrorText = (error: unknown) => {\n if (!error) {\n return getErrorText.unknownErrorText;\n }\n\n if (typeGuard.isString(error)) {\n return error || getErrorText.unknownErrorText;\n }\n\n if (error instanceof Error) {\n return (\n (getErrorText.formatError?.(error) ?? error.message) ||\n getErrorText.unknownErrorText\n );\n }\n\n if (getErrorText.enhance) {\n return getErrorText.enhance(error) ?? getErrorText.unknownErrorText;\n } else {\n return getErrorText.unknownErrorText;\n }\n};\n\ngetErrorText.unknownErrorText = '';\ngetErrorText.formatError = null as Maybe<GetErrorTextFormatErrorFn>;\ngetErrorText.enhance = null as Maybe<GetErrorTextEnhancer>;\n"],"names":["getErrorText","error","typeGuard.isString"],"mappings":";AAcO,MAAMA,IAAe,CAACC,MACtBA,IAIDC,EAAmBD,CAAK,IACnBA,KAASD,EAAa,mBAG3BC,aAAiB,SAEhBD,EAAa,cAAcC,CAAK,KAAKA,EAAM,YAC5CD,EAAa,mBAIbA,EAAa,UACRA,EAAa,QAAQC,CAAK,KAAKD,EAAa,mBAE5CA,EAAa,mBAjBbA,EAAa;AAqBxBA,EAAa,mBAAmB;AAChCA,EAAa,cAAc;AAC3BA,EAAa,UAAU;"}
package/file.js CHANGED
@@ -1,24 +1,20 @@
1
- export const getBase64FromFile = (file) => {
2
- return new Promise((resolve, reject) => {
3
- const reader = new FileReader();
4
- reader.readAsDataURL(file);
5
- reader.onload = () => {
6
- resolve(reader.result.toString());
7
- };
8
- reader.onerror = (error) => {
9
- reject(error);
10
- };
11
- });
12
- };
13
- export const getTextFromFile = (file, encoding) => {
14
- return new Promise((resolve, reject) => {
15
- const reader = new FileReader();
16
- reader.readAsText(file, encoding);
17
- reader.onload = () => {
18
- resolve(reader.result.toString());
19
- };
20
- reader.onerror = (error) => {
21
- reject(error);
22
- };
23
- });
1
+ const s = (o) => new Promise((t, n) => {
2
+ const e = new FileReader();
3
+ e.readAsDataURL(o), e.onload = () => {
4
+ t(e.result.toString());
5
+ }, e.onerror = (r) => {
6
+ n(r);
7
+ };
8
+ }), d = (o, t) => new Promise((n, e) => {
9
+ const r = new FileReader();
10
+ r.readAsText(o, t), r.onload = () => {
11
+ n(r.result.toString());
12
+ }, r.onerror = (a) => {
13
+ e(a);
14
+ };
15
+ });
16
+ export {
17
+ s as getBase64FromFile,
18
+ d as getTextFromFile
24
19
  };
20
+ //# sourceMappingURL=file.js.map
package/file.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.js","sources":["../src/file.ts"],"sourcesContent":["export const getBase64FromFile = (file: File) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n resolve(reader.result!.toString());\n };\n reader.onerror = (error) => {\n reject(error);\n };\n });\n};\n\nexport const getTextFromFile = (file: File, encoding?: string) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsText(file, encoding);\n reader.onload = () => {\n resolve(reader.result!.toString());\n };\n reader.onerror = (error) => {\n reject(error);\n };\n });\n};\n"],"names":["getBase64FromFile","file","resolve","reject","reader","error","getTextFromFile","encoding"],"mappings":"AAAO,MAAMA,IAAoB,CAACC,MACzB,IAAI,QAAgB,CAACC,GAASC,MAAW;AAC9C,QAAMC,IAAS,IAAI,WAAA;AACnB,EAAAA,EAAO,cAAcH,CAAI,GACzBG,EAAO,SAAS,MAAM;AACpB,IAAAF,EAAQE,EAAO,OAAQ,UAAU;AAAA,EACnC,GACAA,EAAO,UAAU,CAACC,MAAU;AAC1B,IAAAF,EAAOE,CAAK;AAAA,EACd;AACF,CAAC,GAGUC,IAAkB,CAACL,GAAYM,MACnC,IAAI,QAAgB,CAACL,GAASC,MAAW;AAC9C,QAAMC,IAAS,IAAI,WAAA;AACnB,EAAAA,EAAO,WAAWH,GAAMM,CAAQ,GAChCH,EAAO,SAAS,MAAM;AACpB,IAAAF,EAAQE,EAAO,OAAQ,UAAU;AAAA,EACnC,GACAA,EAAO,UAAU,CAACC,MAAU;AAC1B,IAAAF,EAAOE,CAAK;AAAA,EACd;AACF,CAAC;"}
@@ -1,5 +1,5 @@
1
- export * from "./constants.js";
2
- export * from "./number.js";
3
- export * from "./percent.js";
4
- export * from "./skip-spaces.js";
1
+ export * from './constants.js';
2
+ export * from './number.js';
3
+ export * from './percent.js';
4
+ export * from './skip-spaces.js';
5
5
  //# sourceMappingURL=_exports.d.ts.map