tinybase 5.0.0-beta.23 → 5.0.0-beta.25

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 (447) hide show
  1. package/cjs/common/index.cjs +9 -1
  2. package/cjs/common/with-schemas/index.cjs +9 -1
  3. package/cjs/es6/common/index.cjs +9 -1
  4. package/cjs/es6/common/with-schemas/index.cjs +9 -1
  5. package/cjs/es6/index.cjs +12 -5
  6. package/cjs/es6/mergeable-store/index.cjs +11 -4
  7. package/cjs/es6/mergeable-store/with-schemas/index.cjs +11 -4
  8. package/cjs/es6/metrics/index.cjs +3 -2
  9. package/cjs/es6/metrics/with-schemas/index.cjs +3 -2
  10. package/cjs/es6/min/common/index.cjs +1 -1
  11. package/cjs/es6/min/common/index.cjs.gz +0 -0
  12. package/cjs/es6/min/common/with-schemas/index.cjs +1 -1
  13. package/cjs/es6/min/common/with-schemas/index.cjs.gz +0 -0
  14. package/cjs/es6/min/index.cjs +1 -1
  15. package/cjs/es6/min/index.cjs.gz +0 -0
  16. package/cjs/es6/min/mergeable-store/index.cjs +1 -1
  17. package/cjs/es6/min/mergeable-store/index.cjs.gz +0 -0
  18. package/cjs/es6/min/mergeable-store/with-schemas/index.cjs +1 -1
  19. package/cjs/es6/min/mergeable-store/with-schemas/index.cjs.gz +0 -0
  20. package/cjs/es6/min/metrics/index.cjs +1 -1
  21. package/cjs/es6/min/metrics/index.cjs.gz +0 -0
  22. package/cjs/es6/min/metrics/with-schemas/index.cjs +1 -1
  23. package/cjs/es6/min/metrics/with-schemas/index.cjs.gz +0 -0
  24. package/cjs/es6/min/persisters/persister-browser/index.cjs +1 -1
  25. package/cjs/es6/min/persisters/persister-browser/index.cjs.gz +0 -0
  26. package/cjs/es6/min/persisters/persister-browser/with-schemas/index.cjs +1 -1
  27. package/cjs/es6/min/persisters/persister-browser/with-schemas/index.cjs.gz +0 -0
  28. package/cjs/es6/min/persisters/persister-indexed-db/index.cjs +1 -1
  29. package/cjs/es6/min/persisters/persister-indexed-db/index.cjs.gz +0 -0
  30. package/cjs/es6/min/persisters/persister-indexed-db/with-schemas/index.cjs +1 -1
  31. package/cjs/es6/min/persisters/persister-indexed-db/with-schemas/index.cjs.gz +0 -0
  32. package/cjs/es6/min/queries/index.cjs +1 -1
  33. package/cjs/es6/min/queries/index.cjs.gz +0 -0
  34. package/cjs/es6/min/queries/with-schemas/index.cjs +1 -1
  35. package/cjs/es6/min/queries/with-schemas/index.cjs.gz +0 -0
  36. package/cjs/es6/min/synchronizers/index.cjs +1 -1
  37. package/cjs/es6/min/synchronizers/index.cjs.gz +0 -0
  38. package/cjs/es6/min/synchronizers/synchronizer-local/index.cjs +1 -1
  39. package/cjs/es6/min/synchronizers/synchronizer-local/index.cjs.gz +0 -0
  40. package/cjs/es6/min/synchronizers/synchronizer-local/with-schemas/index.cjs +1 -1
  41. package/cjs/es6/min/synchronizers/synchronizer-local/with-schemas/index.cjs.gz +0 -0
  42. package/cjs/es6/min/synchronizers/synchronizer-ws-client/index.cjs +1 -1
  43. package/cjs/es6/min/synchronizers/synchronizer-ws-client/index.cjs.gz +0 -0
  44. package/cjs/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +1 -1
  45. package/cjs/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs.gz +0 -0
  46. package/cjs/es6/min/synchronizers/with-schemas/index.cjs +1 -1
  47. package/cjs/es6/min/synchronizers/with-schemas/index.cjs.gz +0 -0
  48. package/cjs/es6/min/ui-react-dom/index.cjs +1 -1
  49. package/cjs/es6/min/ui-react-dom/index.cjs.gz +0 -0
  50. package/cjs/es6/min/ui-react-dom/with-schemas/index.cjs +1 -1
  51. package/cjs/es6/min/ui-react-dom/with-schemas/index.cjs.gz +0 -0
  52. package/cjs/es6/min/ui-react-inspector/index.cjs +1 -1
  53. package/cjs/es6/min/ui-react-inspector/index.cjs.gz +0 -0
  54. package/cjs/es6/min/ui-react-inspector/with-schemas/index.cjs +1 -1
  55. package/cjs/es6/min/ui-react-inspector/with-schemas/index.cjs.gz +0 -0
  56. package/cjs/es6/min/with-schemas/index.cjs +1 -1
  57. package/cjs/es6/min/with-schemas/index.cjs.gz +0 -0
  58. package/cjs/es6/persisters/persister-browser/index.cjs +2 -1
  59. package/cjs/es6/persisters/persister-browser/with-schemas/index.cjs +2 -1
  60. package/cjs/es6/persisters/persister-indexed-db/index.cjs +2 -1
  61. package/cjs/es6/persisters/persister-indexed-db/with-schemas/index.cjs +2 -1
  62. package/cjs/es6/queries/index.cjs +3 -2
  63. package/cjs/es6/queries/with-schemas/index.cjs +3 -2
  64. package/cjs/es6/synchronizers/index.cjs +9 -2
  65. package/cjs/es6/synchronizers/synchronizer-local/index.cjs +9 -2
  66. package/cjs/es6/synchronizers/synchronizer-local/with-schemas/index.cjs +9 -2
  67. package/cjs/es6/synchronizers/synchronizer-ws-client/index.cjs +9 -2
  68. package/cjs/es6/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +9 -2
  69. package/cjs/es6/synchronizers/with-schemas/index.cjs +9 -2
  70. package/cjs/es6/ui-react-dom/index.cjs +3 -1
  71. package/cjs/es6/ui-react-dom/with-schemas/index.cjs +3 -1
  72. package/cjs/es6/ui-react-inspector/index.cjs +6 -3
  73. package/cjs/es6/ui-react-inspector/with-schemas/index.cjs +6 -3
  74. package/cjs/es6/with-schemas/index.cjs +12 -5
  75. package/cjs/index.cjs +12 -5
  76. package/cjs/mergeable-store/index.cjs +11 -4
  77. package/cjs/mergeable-store/with-schemas/index.cjs +11 -4
  78. package/cjs/metrics/index.cjs +3 -2
  79. package/cjs/metrics/with-schemas/index.cjs +3 -2
  80. package/cjs/min/common/index.cjs +1 -1
  81. package/cjs/min/common/index.cjs.gz +0 -0
  82. package/cjs/min/common/with-schemas/index.cjs +1 -1
  83. package/cjs/min/common/with-schemas/index.cjs.gz +0 -0
  84. package/cjs/min/index.cjs +1 -1
  85. package/cjs/min/index.cjs.gz +0 -0
  86. package/cjs/min/mergeable-store/index.cjs +1 -1
  87. package/cjs/min/mergeable-store/index.cjs.gz +0 -0
  88. package/cjs/min/mergeable-store/with-schemas/index.cjs +1 -1
  89. package/cjs/min/mergeable-store/with-schemas/index.cjs.gz +0 -0
  90. package/cjs/min/metrics/index.cjs +1 -1
  91. package/cjs/min/metrics/index.cjs.gz +0 -0
  92. package/cjs/min/metrics/with-schemas/index.cjs +1 -1
  93. package/cjs/min/metrics/with-schemas/index.cjs.gz +0 -0
  94. package/cjs/min/persisters/persister-browser/index.cjs +1 -1
  95. package/cjs/min/persisters/persister-browser/index.cjs.gz +0 -0
  96. package/cjs/min/persisters/persister-browser/with-schemas/index.cjs +1 -1
  97. package/cjs/min/persisters/persister-browser/with-schemas/index.cjs.gz +0 -0
  98. package/cjs/min/persisters/persister-indexed-db/index.cjs +1 -1
  99. package/cjs/min/persisters/persister-indexed-db/index.cjs.gz +0 -0
  100. package/cjs/min/persisters/persister-indexed-db/with-schemas/index.cjs +1 -1
  101. package/cjs/min/persisters/persister-indexed-db/with-schemas/index.cjs.gz +0 -0
  102. package/cjs/min/queries/index.cjs +1 -1
  103. package/cjs/min/queries/index.cjs.gz +0 -0
  104. package/cjs/min/queries/with-schemas/index.cjs +1 -1
  105. package/cjs/min/queries/with-schemas/index.cjs.gz +0 -0
  106. package/cjs/min/synchronizers/index.cjs +1 -1
  107. package/cjs/min/synchronizers/index.cjs.gz +0 -0
  108. package/cjs/min/synchronizers/synchronizer-local/index.cjs +1 -1
  109. package/cjs/min/synchronizers/synchronizer-local/index.cjs.gz +0 -0
  110. package/cjs/min/synchronizers/synchronizer-local/with-schemas/index.cjs +1 -1
  111. package/cjs/min/synchronizers/synchronizer-local/with-schemas/index.cjs.gz +0 -0
  112. package/cjs/min/synchronizers/synchronizer-ws-client/index.cjs +1 -1
  113. package/cjs/min/synchronizers/synchronizer-ws-client/index.cjs.gz +0 -0
  114. package/cjs/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +1 -1
  115. package/cjs/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs.gz +0 -0
  116. package/cjs/min/synchronizers/with-schemas/index.cjs +1 -1
  117. package/cjs/min/synchronizers/with-schemas/index.cjs.gz +0 -0
  118. package/cjs/min/ui-react-dom/index.cjs +1 -1
  119. package/cjs/min/ui-react-dom/index.cjs.gz +0 -0
  120. package/cjs/min/ui-react-dom/with-schemas/index.cjs +1 -1
  121. package/cjs/min/ui-react-dom/with-schemas/index.cjs.gz +0 -0
  122. package/cjs/min/ui-react-inspector/index.cjs +1 -1
  123. package/cjs/min/ui-react-inspector/index.cjs.gz +0 -0
  124. package/cjs/min/ui-react-inspector/with-schemas/index.cjs +1 -1
  125. package/cjs/min/ui-react-inspector/with-schemas/index.cjs.gz +0 -0
  126. package/cjs/min/with-schemas/index.cjs +1 -1
  127. package/cjs/min/with-schemas/index.cjs.gz +0 -0
  128. package/cjs/persisters/persister-browser/index.cjs +2 -1
  129. package/cjs/persisters/persister-browser/with-schemas/index.cjs +2 -1
  130. package/cjs/persisters/persister-indexed-db/index.cjs +2 -1
  131. package/cjs/persisters/persister-indexed-db/with-schemas/index.cjs +2 -1
  132. package/cjs/queries/index.cjs +3 -2
  133. package/cjs/queries/with-schemas/index.cjs +3 -2
  134. package/cjs/synchronizers/index.cjs +9 -2
  135. package/cjs/synchronizers/synchronizer-local/index.cjs +9 -2
  136. package/cjs/synchronizers/synchronizer-local/with-schemas/index.cjs +9 -2
  137. package/cjs/synchronizers/synchronizer-ws-client/index.cjs +9 -2
  138. package/cjs/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +9 -2
  139. package/cjs/synchronizers/with-schemas/index.cjs +9 -2
  140. package/cjs/ui-react-dom/index.cjs +3 -1
  141. package/cjs/ui-react-dom/with-schemas/index.cjs +3 -1
  142. package/cjs/ui-react-inspector/index.cjs +6 -3
  143. package/cjs/ui-react-inspector/with-schemas/index.cjs +6 -3
  144. package/cjs/with-schemas/index.cjs +12 -5
  145. package/common/index.js +9 -1
  146. package/common/with-schemas/index.js +9 -1
  147. package/es6/common/index.js +9 -1
  148. package/es6/common/with-schemas/index.js +9 -1
  149. package/es6/index.js +12 -5
  150. package/es6/mergeable-store/index.js +11 -4
  151. package/es6/mergeable-store/with-schemas/index.js +11 -4
  152. package/es6/metrics/index.js +3 -2
  153. package/es6/metrics/with-schemas/index.js +3 -2
  154. package/es6/min/common/index.js +1 -1
  155. package/es6/min/common/index.js.gz +0 -0
  156. package/es6/min/common/with-schemas/index.js +1 -1
  157. package/es6/min/common/with-schemas/index.js.gz +0 -0
  158. package/es6/min/index.js +1 -1
  159. package/es6/min/index.js.gz +0 -0
  160. package/es6/min/mergeable-store/index.js +1 -1
  161. package/es6/min/mergeable-store/index.js.gz +0 -0
  162. package/es6/min/mergeable-store/with-schemas/index.js +1 -1
  163. package/es6/min/mergeable-store/with-schemas/index.js.gz +0 -0
  164. package/es6/min/metrics/index.js +1 -1
  165. package/es6/min/metrics/index.js.gz +0 -0
  166. package/es6/min/metrics/with-schemas/index.js +1 -1
  167. package/es6/min/metrics/with-schemas/index.js.gz +0 -0
  168. package/es6/min/persisters/persister-browser/index.js +1 -1
  169. package/es6/min/persisters/persister-browser/index.js.gz +0 -0
  170. package/es6/min/persisters/persister-browser/with-schemas/index.js +1 -1
  171. package/es6/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
  172. package/es6/min/persisters/persister-indexed-db/index.js +1 -1
  173. package/es6/min/persisters/persister-indexed-db/index.js.gz +0 -0
  174. package/es6/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
  175. package/es6/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
  176. package/es6/min/queries/index.js +1 -1
  177. package/es6/min/queries/index.js.gz +0 -0
  178. package/es6/min/queries/with-schemas/index.js +1 -1
  179. package/es6/min/queries/with-schemas/index.js.gz +0 -0
  180. package/es6/min/synchronizers/index.js +1 -1
  181. package/es6/min/synchronizers/index.js.gz +0 -0
  182. package/es6/min/synchronizers/synchronizer-local/index.js +1 -1
  183. package/es6/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  184. package/es6/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  185. package/es6/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  186. package/es6/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  187. package/es6/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  188. package/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  189. package/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  190. package/es6/min/synchronizers/with-schemas/index.js +1 -1
  191. package/es6/min/synchronizers/with-schemas/index.js.gz +0 -0
  192. package/es6/min/ui-react-dom/index.js +1 -1
  193. package/es6/min/ui-react-dom/index.js.gz +0 -0
  194. package/es6/min/ui-react-dom/with-schemas/index.js +1 -1
  195. package/es6/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  196. package/es6/min/ui-react-inspector/index.js +1 -1
  197. package/es6/min/ui-react-inspector/index.js.gz +0 -0
  198. package/es6/min/ui-react-inspector/with-schemas/index.js +1 -1
  199. package/es6/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  200. package/es6/min/with-schemas/index.js +1 -1
  201. package/es6/min/with-schemas/index.js.gz +0 -0
  202. package/es6/persisters/persister-browser/index.js +2 -1
  203. package/es6/persisters/persister-browser/with-schemas/index.js +2 -1
  204. package/es6/persisters/persister-indexed-db/index.js +2 -1
  205. package/es6/persisters/persister-indexed-db/with-schemas/index.js +2 -1
  206. package/es6/queries/index.js +3 -2
  207. package/es6/queries/with-schemas/index.js +3 -2
  208. package/es6/synchronizers/index.js +9 -2
  209. package/es6/synchronizers/synchronizer-local/index.js +9 -2
  210. package/es6/synchronizers/synchronizer-local/with-schemas/index.js +9 -2
  211. package/es6/synchronizers/synchronizer-ws-client/index.js +9 -2
  212. package/es6/synchronizers/synchronizer-ws-client/with-schemas/index.js +9 -2
  213. package/es6/synchronizers/with-schemas/index.js +9 -2
  214. package/es6/ui-react-dom/index.js +3 -1
  215. package/es6/ui-react-dom/with-schemas/index.js +3 -1
  216. package/es6/ui-react-inspector/index.js +6 -3
  217. package/es6/ui-react-inspector/with-schemas/index.js +6 -3
  218. package/es6/with-schemas/index.js +12 -5
  219. package/index.js +12 -5
  220. package/mergeable-store/index.js +11 -4
  221. package/mergeable-store/with-schemas/index.js +11 -4
  222. package/metrics/index.js +3 -2
  223. package/metrics/with-schemas/index.js +3 -2
  224. package/min/common/index.js +1 -1
  225. package/min/common/index.js.gz +0 -0
  226. package/min/common/with-schemas/index.js +1 -1
  227. package/min/common/with-schemas/index.js.gz +0 -0
  228. package/min/index.js +1 -1
  229. package/min/index.js.gz +0 -0
  230. package/min/mergeable-store/index.js +1 -1
  231. package/min/mergeable-store/index.js.gz +0 -0
  232. package/min/mergeable-store/with-schemas/index.js +1 -1
  233. package/min/mergeable-store/with-schemas/index.js.gz +0 -0
  234. package/min/metrics/index.js +1 -1
  235. package/min/metrics/index.js.gz +0 -0
  236. package/min/metrics/with-schemas/index.js +1 -1
  237. package/min/metrics/with-schemas/index.js.gz +0 -0
  238. package/min/persisters/persister-browser/index.js +1 -1
  239. package/min/persisters/persister-browser/index.js.gz +0 -0
  240. package/min/persisters/persister-browser/with-schemas/index.js +1 -1
  241. package/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
  242. package/min/persisters/persister-indexed-db/index.js +1 -1
  243. package/min/persisters/persister-indexed-db/index.js.gz +0 -0
  244. package/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
  245. package/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
  246. package/min/queries/index.js +1 -1
  247. package/min/queries/index.js.gz +0 -0
  248. package/min/queries/with-schemas/index.js +1 -1
  249. package/min/queries/with-schemas/index.js.gz +0 -0
  250. package/min/synchronizers/index.js +1 -1
  251. package/min/synchronizers/index.js.gz +0 -0
  252. package/min/synchronizers/synchronizer-local/index.js +1 -1
  253. package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  254. package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  255. package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  256. package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  257. package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  258. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  259. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  260. package/min/synchronizers/with-schemas/index.js +1 -1
  261. package/min/synchronizers/with-schemas/index.js.gz +0 -0
  262. package/min/ui-react-dom/index.js +1 -1
  263. package/min/ui-react-dom/index.js.gz +0 -0
  264. package/min/ui-react-dom/with-schemas/index.js +1 -1
  265. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  266. package/min/ui-react-inspector/index.js +1 -1
  267. package/min/ui-react-inspector/index.js.gz +0 -0
  268. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  269. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  270. package/min/with-schemas/index.js +1 -1
  271. package/min/with-schemas/index.js.gz +0 -0
  272. package/package.json +8 -7
  273. package/persisters/persister-browser/index.js +2 -1
  274. package/persisters/persister-browser/with-schemas/index.js +2 -1
  275. package/persisters/persister-indexed-db/index.js +2 -1
  276. package/persisters/persister-indexed-db/with-schemas/index.js +2 -1
  277. package/queries/index.js +3 -2
  278. package/queries/with-schemas/index.js +3 -2
  279. package/readme.md +2 -2
  280. package/releases.md +2 -2
  281. package/synchronizers/index.js +9 -2
  282. package/synchronizers/synchronizer-local/index.js +9 -2
  283. package/synchronizers/synchronizer-local/with-schemas/index.js +9 -2
  284. package/synchronizers/synchronizer-ws-client/index.js +9 -2
  285. package/synchronizers/synchronizer-ws-client/with-schemas/index.js +9 -2
  286. package/synchronizers/with-schemas/index.js +9 -2
  287. package/ui-react-dom/index.js +3 -1
  288. package/ui-react-dom/with-schemas/index.js +3 -1
  289. package/ui-react-inspector/index.js +6 -3
  290. package/ui-react-inspector/with-schemas/index.js +6 -3
  291. package/umd/common/index.js +9 -1
  292. package/umd/common/with-schemas/index.js +9 -1
  293. package/umd/es6/common/index.js +9 -1
  294. package/umd/es6/common/with-schemas/index.js +9 -1
  295. package/umd/es6/index.js +12 -5
  296. package/umd/es6/mergeable-store/index.js +11 -4
  297. package/umd/es6/mergeable-store/with-schemas/index.js +11 -4
  298. package/umd/es6/metrics/index.js +3 -2
  299. package/umd/es6/metrics/with-schemas/index.js +3 -2
  300. package/umd/es6/min/common/index.js +1 -1
  301. package/umd/es6/min/common/index.js.gz +0 -0
  302. package/umd/es6/min/common/with-schemas/index.js +1 -1
  303. package/umd/es6/min/common/with-schemas/index.js.gz +0 -0
  304. package/umd/es6/min/index.js +1 -1
  305. package/umd/es6/min/index.js.gz +0 -0
  306. package/umd/es6/min/mergeable-store/index.js +1 -1
  307. package/umd/es6/min/mergeable-store/index.js.gz +0 -0
  308. package/umd/es6/min/mergeable-store/with-schemas/index.js +1 -1
  309. package/umd/es6/min/mergeable-store/with-schemas/index.js.gz +0 -0
  310. package/umd/es6/min/metrics/index.js +1 -1
  311. package/umd/es6/min/metrics/index.js.gz +0 -0
  312. package/umd/es6/min/metrics/with-schemas/index.js +1 -1
  313. package/umd/es6/min/metrics/with-schemas/index.js.gz +0 -0
  314. package/umd/es6/min/persisters/persister-browser/index.js +1 -1
  315. package/umd/es6/min/persisters/persister-browser/index.js.gz +0 -0
  316. package/umd/es6/min/persisters/persister-browser/with-schemas/index.js +1 -1
  317. package/umd/es6/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
  318. package/umd/es6/min/persisters/persister-expo-sqlite/index.js +1 -1
  319. package/umd/es6/min/persisters/persister-expo-sqlite/index.js.gz +0 -0
  320. package/umd/es6/min/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
  321. package/umd/es6/min/persisters/persister-expo-sqlite/with-schemas/index.js.gz +0 -0
  322. package/umd/es6/min/persisters/persister-indexed-db/index.js +1 -1
  323. package/umd/es6/min/persisters/persister-indexed-db/index.js.gz +0 -0
  324. package/umd/es6/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
  325. package/umd/es6/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
  326. package/umd/es6/min/queries/index.js +1 -1
  327. package/umd/es6/min/queries/index.js.gz +0 -0
  328. package/umd/es6/min/queries/with-schemas/index.js +1 -1
  329. package/umd/es6/min/queries/with-schemas/index.js.gz +0 -0
  330. package/umd/es6/min/synchronizers/index.js +1 -1
  331. package/umd/es6/min/synchronizers/index.js.gz +0 -0
  332. package/umd/es6/min/synchronizers/synchronizer-local/index.js +1 -1
  333. package/umd/es6/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  334. package/umd/es6/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  335. package/umd/es6/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  336. package/umd/es6/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  337. package/umd/es6/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  338. package/umd/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  339. package/umd/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  340. package/umd/es6/min/synchronizers/with-schemas/index.js +1 -1
  341. package/umd/es6/min/synchronizers/with-schemas/index.js.gz +0 -0
  342. package/umd/es6/min/ui-react-dom/index.js +1 -1
  343. package/umd/es6/min/ui-react-dom/index.js.gz +0 -0
  344. package/umd/es6/min/ui-react-dom/with-schemas/index.js +1 -1
  345. package/umd/es6/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  346. package/umd/es6/min/ui-react-inspector/index.js +1 -1
  347. package/umd/es6/min/ui-react-inspector/index.js.gz +0 -0
  348. package/umd/es6/min/ui-react-inspector/with-schemas/index.js +1 -1
  349. package/umd/es6/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  350. package/umd/es6/min/with-schemas/index.js +1 -1
  351. package/umd/es6/min/with-schemas/index.js.gz +0 -0
  352. package/umd/es6/persisters/persister-browser/index.js +2 -1
  353. package/umd/es6/persisters/persister-browser/with-schemas/index.js +2 -1
  354. package/umd/es6/persisters/persister-expo-sqlite/index.js +4 -1
  355. package/umd/es6/persisters/persister-expo-sqlite/with-schemas/index.js +4 -1
  356. package/umd/es6/persisters/persister-indexed-db/index.js +2 -1
  357. package/umd/es6/persisters/persister-indexed-db/with-schemas/index.js +2 -1
  358. package/umd/es6/queries/index.js +3 -2
  359. package/umd/es6/queries/with-schemas/index.js +3 -2
  360. package/umd/es6/synchronizers/index.js +9 -2
  361. package/umd/es6/synchronizers/synchronizer-local/index.js +9 -2
  362. package/umd/es6/synchronizers/synchronizer-local/with-schemas/index.js +9 -2
  363. package/umd/es6/synchronizers/synchronizer-ws-client/index.js +9 -2
  364. package/umd/es6/synchronizers/synchronizer-ws-client/with-schemas/index.js +9 -2
  365. package/umd/es6/synchronizers/with-schemas/index.js +9 -2
  366. package/umd/es6/ui-react-dom/index.js +3 -1
  367. package/umd/es6/ui-react-dom/with-schemas/index.js +3 -1
  368. package/umd/es6/ui-react-inspector/index.js +6 -3
  369. package/umd/es6/ui-react-inspector/with-schemas/index.js +6 -3
  370. package/umd/es6/with-schemas/index.js +12 -5
  371. package/umd/index.js +12 -5
  372. package/umd/mergeable-store/index.js +11 -4
  373. package/umd/mergeable-store/with-schemas/index.js +11 -4
  374. package/umd/metrics/index.js +3 -2
  375. package/umd/metrics/with-schemas/index.js +3 -2
  376. package/umd/min/common/index.js +1 -1
  377. package/umd/min/common/index.js.gz +0 -0
  378. package/umd/min/common/with-schemas/index.js +1 -1
  379. package/umd/min/common/with-schemas/index.js.gz +0 -0
  380. package/umd/min/index.js +1 -1
  381. package/umd/min/index.js.gz +0 -0
  382. package/umd/min/mergeable-store/index.js +1 -1
  383. package/umd/min/mergeable-store/index.js.gz +0 -0
  384. package/umd/min/mergeable-store/with-schemas/index.js +1 -1
  385. package/umd/min/mergeable-store/with-schemas/index.js.gz +0 -0
  386. package/umd/min/metrics/index.js +1 -1
  387. package/umd/min/metrics/index.js.gz +0 -0
  388. package/umd/min/metrics/with-schemas/index.js +1 -1
  389. package/umd/min/metrics/with-schemas/index.js.gz +0 -0
  390. package/umd/min/persisters/persister-browser/index.js +1 -1
  391. package/umd/min/persisters/persister-browser/index.js.gz +0 -0
  392. package/umd/min/persisters/persister-browser/with-schemas/index.js +1 -1
  393. package/umd/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
  394. package/umd/min/persisters/persister-expo-sqlite/index.js +1 -1
  395. package/umd/min/persisters/persister-expo-sqlite/index.js.gz +0 -0
  396. package/umd/min/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
  397. package/umd/min/persisters/persister-expo-sqlite/with-schemas/index.js.gz +0 -0
  398. package/umd/min/persisters/persister-indexed-db/index.js +1 -1
  399. package/umd/min/persisters/persister-indexed-db/index.js.gz +0 -0
  400. package/umd/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
  401. package/umd/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
  402. package/umd/min/queries/index.js +1 -1
  403. package/umd/min/queries/index.js.gz +0 -0
  404. package/umd/min/queries/with-schemas/index.js +1 -1
  405. package/umd/min/queries/with-schemas/index.js.gz +0 -0
  406. package/umd/min/synchronizers/index.js +1 -1
  407. package/umd/min/synchronizers/index.js.gz +0 -0
  408. package/umd/min/synchronizers/synchronizer-local/index.js +1 -1
  409. package/umd/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  410. package/umd/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  411. package/umd/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  412. package/umd/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  413. package/umd/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  414. package/umd/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  415. package/umd/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  416. package/umd/min/synchronizers/with-schemas/index.js +1 -1
  417. package/umd/min/synchronizers/with-schemas/index.js.gz +0 -0
  418. package/umd/min/ui-react-dom/index.js +1 -1
  419. package/umd/min/ui-react-dom/index.js.gz +0 -0
  420. package/umd/min/ui-react-dom/with-schemas/index.js +1 -1
  421. package/umd/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  422. package/umd/min/ui-react-inspector/index.js +1 -1
  423. package/umd/min/ui-react-inspector/index.js.gz +0 -0
  424. package/umd/min/ui-react-inspector/with-schemas/index.js +1 -1
  425. package/umd/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  426. package/umd/min/with-schemas/index.js +1 -1
  427. package/umd/min/with-schemas/index.js.gz +0 -0
  428. package/umd/persisters/persister-browser/index.js +2 -1
  429. package/umd/persisters/persister-browser/with-schemas/index.js +2 -1
  430. package/umd/persisters/persister-expo-sqlite/index.js +4 -1
  431. package/umd/persisters/persister-expo-sqlite/with-schemas/index.js +4 -1
  432. package/umd/persisters/persister-indexed-db/index.js +2 -1
  433. package/umd/persisters/persister-indexed-db/with-schemas/index.js +2 -1
  434. package/umd/queries/index.js +3 -2
  435. package/umd/queries/with-schemas/index.js +3 -2
  436. package/umd/synchronizers/index.js +9 -2
  437. package/umd/synchronizers/synchronizer-local/index.js +9 -2
  438. package/umd/synchronizers/synchronizer-local/with-schemas/index.js +9 -2
  439. package/umd/synchronizers/synchronizer-ws-client/index.js +9 -2
  440. package/umd/synchronizers/synchronizer-ws-client/with-schemas/index.js +9 -2
  441. package/umd/synchronizers/with-schemas/index.js +9 -2
  442. package/umd/ui-react-dom/index.js +3 -1
  443. package/umd/ui-react-dom/with-schemas/index.js +3 -1
  444. package/umd/ui-react-inspector/index.js +6 -3
  445. package/umd/ui-react-inspector/with-schemas/index.js +6 -3
  446. package/umd/with-schemas/index.js +12 -5
  447. package/with-schemas/index.js +12 -5
@@ -1,6 +1,9 @@
1
1
  const EMPTY_STRING = '';
2
2
 
3
3
  const promise = Promise;
4
+ const GLOBAL = globalThis;
5
+ const math = Math;
6
+ const mathFloor = math.floor;
4
7
  const isUndefined = (thing) => thing == void 0;
5
8
  const ifNotUndefined = (value, then, otherwise) =>
6
9
  isUndefined(value) ? otherwise?.() : then(value);
@@ -60,7 +63,7 @@ const mapEnsure = (map, key, getDefaultValue, hadExistingValue) => {
60
63
  return mapGet(map, key);
61
64
  };
62
65
 
63
- new globalThis.TextEncoder();
66
+ new GLOBAL.TextEncoder();
64
67
 
65
68
  const newStamp = (value, time) => (time ? [value, time] : [value]);
66
69
  const getLatestTime = (time1, time2) =>
@@ -252,9 +255,13 @@ const ENCODE =
252
255
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
253
256
  const encode = (num) => ENCODE[num & MASK6];
254
257
 
258
+ const getRandomValues = GLOBAL.crypto
259
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
260
+ : /* istanbul ignore next */
261
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
255
262
  const getUniqueId = (length = 16) =>
256
263
  arrayReduce(
257
- crypto.getRandomValues(new Uint8Array(length)),
264
+ getRandomValues(new Uint8Array(length)),
258
265
  (uniqueId, number) => uniqueId + encode(number),
259
266
  '',
260
267
  );
@@ -1,6 +1,9 @@
1
1
  const EMPTY_STRING = '';
2
2
 
3
3
  const promise = Promise;
4
+ const GLOBAL = globalThis;
5
+ const math = Math;
6
+ const mathFloor = math.floor;
4
7
  const isUndefined = (thing) => thing == void 0;
5
8
  const ifNotUndefined = (value, then, otherwise) =>
6
9
  isUndefined(value) ? otherwise?.() : then(value);
@@ -63,7 +66,7 @@ const mapEnsure = (map, key, getDefaultValue, hadExistingValue) => {
63
66
  return mapGet(map, key);
64
67
  };
65
68
 
66
- new globalThis.TextEncoder();
69
+ new GLOBAL.TextEncoder();
67
70
 
68
71
  const newStamp = (value, time) => (time ? [value, time] : [value]);
69
72
  const getLatestTime = (time1, time2) =>
@@ -255,9 +258,13 @@ const ENCODE =
255
258
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
256
259
  const encode = (num) => ENCODE[num & MASK6];
257
260
 
261
+ const getRandomValues = GLOBAL.crypto
262
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
263
+ : /* istanbul ignore next */
264
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
258
265
  const getUniqueId = (length = 16) =>
259
266
  arrayReduce(
260
- crypto.getRandomValues(new Uint8Array(length)),
267
+ getRandomValues(new Uint8Array(length)),
261
268
  (uniqueId, number) => uniqueId + encode(number),
262
269
  '',
263
270
  );
@@ -1,6 +1,9 @@
1
1
  const EMPTY_STRING = '';
2
2
 
3
3
  const promise = Promise;
4
+ const GLOBAL = globalThis;
5
+ const math = Math;
6
+ const mathFloor = math.floor;
4
7
  const isUndefined = (thing) => thing == void 0;
5
8
  const ifNotUndefined = (value, then, otherwise) =>
6
9
  isUndefined(value) ? otherwise?.() : then(value);
@@ -63,7 +66,7 @@ const mapEnsure = (map, key, getDefaultValue, hadExistingValue) => {
63
66
  return mapGet(map, key);
64
67
  };
65
68
 
66
- new globalThis.TextEncoder();
69
+ new GLOBAL.TextEncoder();
67
70
 
68
71
  const newStamp = (value, time) => (time ? [value, time] : [value]);
69
72
  const getLatestTime = (time1, time2) =>
@@ -255,9 +258,13 @@ const ENCODE =
255
258
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
256
259
  const encode = (num) => ENCODE[num & MASK6];
257
260
 
261
+ const getRandomValues = GLOBAL.crypto
262
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
263
+ : /* istanbul ignore next */
264
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
258
265
  const getUniqueId = (length = 16) =>
259
266
  arrayReduce(
260
- crypto.getRandomValues(new Uint8Array(length)),
267
+ getRandomValues(new Uint8Array(length)),
261
268
  (uniqueId, number) => uniqueId + encode(number),
262
269
  '',
263
270
  );
@@ -3,6 +3,9 @@ const UTF8 = 'utf8';
3
3
  const UNDEFINED = '\uFFFC';
4
4
 
5
5
  const promise = Promise;
6
+ const GLOBAL = globalThis;
7
+ const math = Math;
8
+ const mathFloor = math.floor;
6
9
  const isUndefined = (thing) => thing == void 0;
7
10
  const ifNotUndefined = (value, then, otherwise) =>
8
11
  isUndefined(value) ? otherwise?.() : then(value);
@@ -70,7 +73,7 @@ const mapEnsure = (map, key, getDefaultValue, hadExistingValue) => {
70
73
  return mapGet(map, key);
71
74
  };
72
75
 
73
- new globalThis.TextEncoder();
76
+ new GLOBAL.TextEncoder();
74
77
 
75
78
  const newStamp = (value, time) => (time ? [value, time] : [value]);
76
79
  const getLatestTime = (time1, time2) =>
@@ -262,9 +265,13 @@ const ENCODE =
262
265
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
263
266
  const encode = (num) => ENCODE[num & MASK6];
264
267
 
268
+ const getRandomValues = GLOBAL.crypto
269
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
270
+ : /* istanbul ignore next */
271
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
265
272
  const getUniqueId = (length = 16) =>
266
273
  arrayReduce(
267
- crypto.getRandomValues(new Uint8Array(length)),
274
+ getRandomValues(new Uint8Array(length)),
268
275
  (uniqueId, number) => uniqueId + encode(number),
269
276
  '',
270
277
  );
@@ -3,6 +3,9 @@ const UTF8 = 'utf8';
3
3
  const UNDEFINED = '\uFFFC';
4
4
 
5
5
  const promise = Promise;
6
+ const GLOBAL = globalThis;
7
+ const math = Math;
8
+ const mathFloor = math.floor;
6
9
  const isUndefined = (thing) => thing == void 0;
7
10
  const ifNotUndefined = (value, then, otherwise) =>
8
11
  isUndefined(value) ? otherwise?.() : then(value);
@@ -70,7 +73,7 @@ const mapEnsure = (map, key, getDefaultValue, hadExistingValue) => {
70
73
  return mapGet(map, key);
71
74
  };
72
75
 
73
- new globalThis.TextEncoder();
76
+ new GLOBAL.TextEncoder();
74
77
 
75
78
  const newStamp = (value, time) => (time ? [value, time] : [value]);
76
79
  const getLatestTime = (time1, time2) =>
@@ -262,9 +265,13 @@ const ENCODE =
262
265
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
263
266
  const encode = (num) => ENCODE[num & MASK6];
264
267
 
268
+ const getRandomValues = GLOBAL.crypto
269
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
270
+ : /* istanbul ignore next */
271
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
265
272
  const getUniqueId = (length = 16) =>
266
273
  arrayReduce(
267
- crypto.getRandomValues(new Uint8Array(length)),
274
+ getRandomValues(new Uint8Array(length)),
268
275
  (uniqueId, number) => uniqueId + encode(number),
269
276
  '',
270
277
  );
@@ -1,6 +1,9 @@
1
1
  const EMPTY_STRING = '';
2
2
 
3
3
  const promise = Promise;
4
+ const GLOBAL = globalThis;
5
+ const math = Math;
6
+ const mathFloor = math.floor;
4
7
  const isUndefined = (thing) => thing == void 0;
5
8
  const ifNotUndefined = (value, then, otherwise) =>
6
9
  isUndefined(value) ? otherwise?.() : then(value);
@@ -60,7 +63,7 @@ const mapEnsure = (map, key, getDefaultValue, hadExistingValue) => {
60
63
  return mapGet(map, key);
61
64
  };
62
65
 
63
- new globalThis.TextEncoder();
66
+ new GLOBAL.TextEncoder();
64
67
 
65
68
  const newStamp = (value, time) => (time ? [value, time] : [value]);
66
69
  const getLatestTime = (time1, time2) =>
@@ -252,9 +255,13 @@ const ENCODE =
252
255
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
253
256
  const encode = (num) => ENCODE[num & MASK6];
254
257
 
258
+ const getRandomValues = GLOBAL.crypto
259
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
260
+ : /* istanbul ignore next */
261
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
255
262
  const getUniqueId = (length = 16) =>
256
263
  arrayReduce(
257
- crypto.getRandomValues(new Uint8Array(length)),
264
+ getRandomValues(new Uint8Array(length)),
258
265
  (uniqueId, number) => uniqueId + encode(number),
259
266
  '',
260
267
  );
@@ -33,6 +33,8 @@ const VALUE = 'Value';
33
33
  const CURRENT_TARGET = 'currentTarget';
34
34
  const _VALUE = 'value';
35
35
 
36
+ const math = Math;
37
+ const mathMin = math.min;
36
38
  const isFiniteNumber = isFinite;
37
39
  const isUndefined = (thing) => thing == void 0;
38
40
  const isTypeStringOrBoolean = (type) => type == STRING || type == BOOLEAN;
@@ -766,7 +768,7 @@ const SortedTablePaginator = ({
766
768
  ),
767
769
  offset + 1,
768
770
  ' to ',
769
- Math.min(total, offset + limit),
771
+ mathMin(total, offset + limit),
770
772
  ' of ',
771
773
  ),
772
774
  total,
@@ -33,6 +33,8 @@ const VALUE = 'Value';
33
33
  const CURRENT_TARGET = 'currentTarget';
34
34
  const _VALUE = 'value';
35
35
 
36
+ const math = Math;
37
+ const mathMin = math.min;
36
38
  const isFiniteNumber = isFinite;
37
39
  const isUndefined = (thing) => thing == void 0;
38
40
  const isTypeStringOrBoolean = (type) => type == STRING || type == BOOLEAN;
@@ -766,7 +768,7 @@ const SortedTablePaginator = ({
766
768
  ),
767
769
  offset + 1,
768
770
  ' to ',
769
- Math.min(total, offset + limit),
771
+ mathMin(total, offset + limit),
770
772
  ' of ',
771
773
  ),
772
774
  total,
@@ -70,7 +70,11 @@ const _VALUE = 'value';
70
70
  const UNDEFINED = '\uFFFC';
71
71
  const id = (key) => EMPTY_STRING + key;
72
72
 
73
- const mathFloor = Math.floor;
73
+ const GLOBAL = globalThis;
74
+ const WINDOW = GLOBAL.window;
75
+ const math = Math;
76
+ const mathMin = math.min;
77
+ const mathFloor = math.floor;
74
78
  const isFiniteNumber = isFinite;
75
79
  const isInstanceOf = (thing, cls) => thing instanceof cls;
76
80
  const isUndefined = (thing) => thing == void 0;
@@ -1033,7 +1037,7 @@ const SortedTablePaginator = ({
1033
1037
  ),
1034
1038
  offset + 1,
1035
1039
  ' to ',
1036
- Math.min(total, offset + limit),
1040
+ mathMin(total, offset + limit),
1037
1041
  ' of ',
1038
1042
  ),
1039
1043
  total,
@@ -1769,7 +1773,6 @@ const createCustomPersister = (
1769
1773
  };
1770
1774
 
1771
1775
  const STORAGE = 'storage';
1772
- const WINDOW = globalThis.window;
1773
1776
  const createStoragePersister = (
1774
1777
  store,
1775
1778
  storageName,
@@ -70,7 +70,11 @@ const _VALUE = 'value';
70
70
  const UNDEFINED = '\uFFFC';
71
71
  const id = (key) => EMPTY_STRING + key;
72
72
 
73
- const mathFloor = Math.floor;
73
+ const GLOBAL = globalThis;
74
+ const WINDOW = GLOBAL.window;
75
+ const math = Math;
76
+ const mathMin = math.min;
77
+ const mathFloor = math.floor;
74
78
  const isFiniteNumber = isFinite;
75
79
  const isInstanceOf = (thing, cls) => thing instanceof cls;
76
80
  const isUndefined = (thing) => thing == void 0;
@@ -1033,7 +1037,7 @@ const SortedTablePaginator = ({
1033
1037
  ),
1034
1038
  offset + 1,
1035
1039
  ' to ',
1036
- Math.min(total, offset + limit),
1040
+ mathMin(total, offset + limit),
1037
1041
  ' of ',
1038
1042
  ),
1039
1043
  total,
@@ -1769,7 +1773,6 @@ const createCustomPersister = (
1769
1773
  };
1770
1774
 
1771
1775
  const STORAGE = 'storage';
1772
- const WINDOW = globalThis.window;
1773
1776
  const createStoragePersister = (
1774
1777
  store,
1775
1778
  storageName,
@@ -11,6 +11,10 @@
11
11
 
12
12
  const EMPTY_STRING = '';
13
13
 
14
+ const GLOBAL = globalThis;
15
+ const math = Math;
16
+ const mathFloor = math.floor;
17
+
14
18
  const arrayMap = (array, cb) => array.map(cb);
15
19
  const arrayReduce = (array, cb, initial) => array.reduce(cb, initial);
16
20
 
@@ -24,11 +28,15 @@
24
28
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
25
29
  const encode = (num) => ENCODE[num & MASK6];
26
30
 
31
+ const getRandomValues = GLOBAL.crypto
32
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
33
+ : /* istanbul ignore next */
34
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
27
35
  const defaultSorter = (sortKey1, sortKey2) =>
28
36
  (sortKey1 ?? 0) < (sortKey2 ?? 0) ? -1 : 1;
29
37
  const getUniqueId = (length = 16) =>
30
38
  arrayReduce(
31
- crypto.getRandomValues(new Uint8Array(length)),
39
+ getRandomValues(new Uint8Array(length)),
32
40
  (uniqueId, number) => uniqueId + encode(number),
33
41
  '',
34
42
  );
@@ -11,6 +11,10 @@
11
11
 
12
12
  const EMPTY_STRING = '';
13
13
 
14
+ const GLOBAL = globalThis;
15
+ const math = Math;
16
+ const mathFloor = math.floor;
17
+
14
18
  const arrayMap = (array, cb) => array.map(cb);
15
19
  const arrayReduce = (array, cb, initial) => array.reduce(cb, initial);
16
20
 
@@ -24,11 +28,15 @@
24
28
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
25
29
  const encode = (num) => ENCODE[num & MASK6];
26
30
 
31
+ const getRandomValues = GLOBAL.crypto
32
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
33
+ : /* istanbul ignore next */
34
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
27
35
  const defaultSorter = (sortKey1, sortKey2) =>
28
36
  (sortKey1 ?? 0) < (sortKey2 ?? 0) ? -1 : 1;
29
37
  const getUniqueId = (length = 16) =>
30
38
  arrayReduce(
31
- crypto.getRandomValues(new Uint8Array(length)),
39
+ getRandomValues(new Uint8Array(length)),
32
40
  (uniqueId, number) => uniqueId + encode(number),
33
41
  '',
34
42
  );
@@ -11,6 +11,10 @@
11
11
 
12
12
  const EMPTY_STRING = '';
13
13
 
14
+ const GLOBAL = globalThis;
15
+ const math = Math;
16
+ const mathFloor = math.floor;
17
+
14
18
  const arrayMap = (array, cb) => array.map(cb);
15
19
  const arrayReduce = (array, cb, initial) => array.reduce(cb, initial);
16
20
 
@@ -24,13 +28,17 @@
24
28
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
25
29
  const encode = (num) => ENCODE[num & MASK6];
26
30
 
31
+ const getRandomValues = GLOBAL.crypto
32
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
33
+ : /* istanbul ignore next */
34
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
27
35
  const defaultSorter = (sortKey1, sortKey2) =>
28
36
  (sortKey1 != null ? sortKey1 : 0) < (sortKey2 != null ? sortKey2 : 0)
29
37
  ? -1
30
38
  : 1;
31
39
  const getUniqueId = (length = 16) =>
32
40
  arrayReduce(
33
- crypto.getRandomValues(new Uint8Array(length)),
41
+ getRandomValues(new Uint8Array(length)),
34
42
  (uniqueId, number) => uniqueId + encode(number),
35
43
  '',
36
44
  );
@@ -11,6 +11,10 @@
11
11
 
12
12
  const EMPTY_STRING = '';
13
13
 
14
+ const GLOBAL = globalThis;
15
+ const math = Math;
16
+ const mathFloor = math.floor;
17
+
14
18
  const arrayMap = (array, cb) => array.map(cb);
15
19
  const arrayReduce = (array, cb, initial) => array.reduce(cb, initial);
16
20
 
@@ -24,13 +28,17 @@
24
28
  mapNew(arrayMap(ENCODE, (char, index) => [char, index]));
25
29
  const encode = (num) => ENCODE[num & MASK6];
26
30
 
31
+ const getRandomValues = GLOBAL.crypto
32
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
33
+ : /* istanbul ignore next */
34
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
27
35
  const defaultSorter = (sortKey1, sortKey2) =>
28
36
  (sortKey1 != null ? sortKey1 : 0) < (sortKey2 != null ? sortKey2 : 0)
29
37
  ? -1
30
38
  : 1;
31
39
  const getUniqueId = (length = 16) =>
32
40
  arrayReduce(
33
- crypto.getRandomValues(new Uint8Array(length)),
41
+ getRandomValues(new Uint8Array(length)),
34
42
  (uniqueId, number) => uniqueId + encode(number),
35
43
  '',
36
44
  );
package/umd/es6/index.js CHANGED
@@ -44,8 +44,11 @@
44
44
  const strEndsWith = (str, suffix) => str.endsWith(suffix);
45
45
 
46
46
  const promise = Promise;
47
- const mathMax = Math.max;
48
- const mathMin = Math.min;
47
+ const GLOBAL = globalThis;
48
+ const math = Math;
49
+ const mathMax = math.max;
50
+ const mathMin = math.min;
51
+ const mathFloor = math.floor;
49
52
  const isFiniteNumber = isFinite;
50
53
  const isInstanceOf = (thing, cls) => thing instanceof cls;
51
54
  const isUndefined = (thing) => thing == void 0;
@@ -841,13 +844,17 @@
841
844
  return (_a = mapGet(DECODE, str[pos])) != null ? _a : 0;
842
845
  };
843
846
 
847
+ const getRandomValues = GLOBAL.crypto
848
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
849
+ : /* istanbul ignore next */
850
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
844
851
  const defaultSorter = (sortKey1, sortKey2) =>
845
852
  (sortKey1 != null ? sortKey1 : 0) < (sortKey2 != null ? sortKey2 : 0)
846
853
  ? -1
847
854
  : 1;
848
855
  const getUniqueId = (length = 16) =>
849
856
  arrayReduce(
850
- crypto.getRandomValues(new Uint8Array(length)),
857
+ getRandomValues(new Uint8Array(length)),
851
858
  (uniqueId, number) => uniqueId + encode(number),
852
859
  '',
853
860
  );
@@ -1484,7 +1491,7 @@
1484
1491
  return objFreeze(persister);
1485
1492
  };
1486
1493
 
1487
- const textEncoder = new globalThis.TextEncoder();
1494
+ const textEncoder = new GLOBAL.TextEncoder();
1488
1495
  const getHash = (value) => {
1489
1496
  let hash = 2166136261;
1490
1497
  arrayForEach(textEncoder.encode(value), (char) => {
@@ -3921,7 +3928,7 @@
3921
3928
  logicalTime = mathMax(
3922
3929
  previousLogicalTime,
3923
3930
  remoteLogicalTime,
3924
- (_a = globalThis.HLC_TIME) != null ? _a : Date.now(),
3931
+ (_a = GLOBAL.HLC_TIME) != null ? _a : Date.now(),
3925
3932
  );
3926
3933
  lastCounter =
3927
3934
  logicalTime == previousLogicalTime
@@ -36,7 +36,10 @@
36
36
  const strStartsWith = (str, prefix) => str.startsWith(prefix);
37
37
  const strEndsWith = (str, suffix) => str.endsWith(suffix);
38
38
 
39
- const mathMax = Math.max;
39
+ const GLOBAL = globalThis;
40
+ const math = Math;
41
+ const mathMax = math.max;
42
+ const mathFloor = math.floor;
40
43
  const isFiniteNumber = isFinite;
41
44
  const isInstanceOf = (thing, cls) => thing instanceof cls;
42
45
  const isUndefined = (thing) => thing == void 0;
@@ -253,7 +256,7 @@
253
256
  },
254
257
  );
255
258
 
256
- const textEncoder = new globalThis.TextEncoder();
259
+ const textEncoder = new GLOBAL.TextEncoder();
257
260
  const getHash = (value) => {
258
261
  let hash = 2166136261;
259
262
  arrayForEach(textEncoder.encode(value), (char) => {
@@ -457,13 +460,17 @@
457
460
  return (_a = mapGet(DECODE, str[pos])) != null ? _a : 0;
458
461
  };
459
462
 
463
+ const getRandomValues = GLOBAL.crypto
464
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
465
+ : /* istanbul ignore next */
466
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
460
467
  const defaultSorter = (sortKey1, sortKey2) =>
461
468
  (sortKey1 != null ? sortKey1 : 0) < (sortKey2 != null ? sortKey2 : 0)
462
469
  ? -1
463
470
  : 1;
464
471
  const getUniqueId = (length = 16) =>
465
472
  arrayReduce(
466
- crypto.getRandomValues(new Uint8Array(length)),
473
+ getRandomValues(new Uint8Array(length)),
467
474
  (uniqueId, number) => uniqueId + encode(number),
468
475
  '',
469
476
  );
@@ -1905,7 +1912,7 @@
1905
1912
  logicalTime = mathMax(
1906
1913
  previousLogicalTime,
1907
1914
  remoteLogicalTime,
1908
- (_a = globalThis.HLC_TIME) != null ? _a : Date.now(),
1915
+ (_a = GLOBAL.HLC_TIME) != null ? _a : Date.now(),
1909
1916
  );
1910
1917
  lastCounter =
1911
1918
  logicalTime == previousLogicalTime
@@ -36,7 +36,10 @@
36
36
  const strStartsWith = (str, prefix) => str.startsWith(prefix);
37
37
  const strEndsWith = (str, suffix) => str.endsWith(suffix);
38
38
 
39
- const mathMax = Math.max;
39
+ const GLOBAL = globalThis;
40
+ const math = Math;
41
+ const mathMax = math.max;
42
+ const mathFloor = math.floor;
40
43
  const isFiniteNumber = isFinite;
41
44
  const isInstanceOf = (thing, cls) => thing instanceof cls;
42
45
  const isUndefined = (thing) => thing == void 0;
@@ -253,7 +256,7 @@
253
256
  },
254
257
  );
255
258
 
256
- const textEncoder = new globalThis.TextEncoder();
259
+ const textEncoder = new GLOBAL.TextEncoder();
257
260
  const getHash = (value) => {
258
261
  let hash = 2166136261;
259
262
  arrayForEach(textEncoder.encode(value), (char) => {
@@ -457,13 +460,17 @@
457
460
  return (_a = mapGet(DECODE, str[pos])) != null ? _a : 0;
458
461
  };
459
462
 
463
+ const getRandomValues = GLOBAL.crypto
464
+ ? (array) => GLOBAL.crypto.getRandomValues(array)
465
+ : /* istanbul ignore next */
466
+ (array) => arrayMap(array, () => mathFloor(math.random() * 256));
460
467
  const defaultSorter = (sortKey1, sortKey2) =>
461
468
  (sortKey1 != null ? sortKey1 : 0) < (sortKey2 != null ? sortKey2 : 0)
462
469
  ? -1
463
470
  : 1;
464
471
  const getUniqueId = (length = 16) =>
465
472
  arrayReduce(
466
- crypto.getRandomValues(new Uint8Array(length)),
473
+ getRandomValues(new Uint8Array(length)),
467
474
  (uniqueId, number) => uniqueId + encode(number),
468
475
  '',
469
476
  );
@@ -1905,7 +1912,7 @@
1905
1912
  logicalTime = mathMax(
1906
1913
  previousLogicalTime,
1907
1914
  remoteLogicalTime,
1908
- (_a = globalThis.HLC_TIME) != null ? _a : Date.now(),
1915
+ (_a = GLOBAL.HLC_TIME) != null ? _a : Date.now(),
1909
1916
  );
1910
1917
  lastCounter =
1911
1918
  logicalTime == previousLogicalTime
@@ -18,8 +18,9 @@
18
18
  const MIN = 'min';
19
19
  const MAX = 'max';
20
20
 
21
- const mathMax = Math.max;
22
- const mathMin = Math.min;
21
+ const math = Math;
22
+ const mathMax = math.max;
23
+ const mathMin = math.min;
23
24
  const isFiniteNumber = isFinite;
24
25
  const isUndefined = (thing) => thing == void 0;
25
26
  const ifNotUndefined = (value, then, otherwise) =>
@@ -18,8 +18,9 @@
18
18
  const MIN = 'min';
19
19
  const MAX = 'max';
20
20
 
21
- const mathMax = Math.max;
22
- const mathMin = Math.min;
21
+ const math = Math;
22
+ const mathMax = math.max;
23
+ const mathMin = math.min;
23
24
  const isFiniteNumber = isFinite;
24
25
  const isUndefined = (thing) => thing == void 0;
25
26
  const ifNotUndefined = (value, then, otherwise) =>
@@ -1 +1 @@
1
- var e,n;e=this,n=function(e){"use strict";const n="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".split("");var t,o;o=(e,n)=>[e,n],t=n.map(o),new Map(t),e.defaultSorter=(e,n)=>(null!=e?e:0)<(null!=n?n:0)?-1:1,e.getUniqueId=(e=16)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+n[63&t]),"")},"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBaseCommon={});
1
+ var e,o;e=this,o=function(e){"use strict";const o=globalThis,t=Math,n=t.floor,r=(e,o)=>e.map(o),a="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".split("");var i;i=r(a,((e,o)=>[e,o])),new Map(i);const l=o.crypto?e=>o.crypto.getRandomValues(e):e=>r(e,(()=>n(256*t.random())));e.defaultSorter=(e,o)=>(null!=e?e:0)<(null!=o?o:0)?-1:1,e.getUniqueId=(e=16)=>{return o=(e,o)=>e+a[63&o],l(new Uint8Array(e)).reduce(o,"");var o}},"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBaseCommon={});
Binary file
@@ -1 +1 @@
1
- var e,n;e=this,n=function(e){"use strict";const n="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".split("");var t,o;o=(e,n)=>[e,n],t=n.map(o),new Map(t),e.defaultSorter=(e,n)=>(null!=e?e:0)<(null!=n?n:0)?-1:1,e.getUniqueId=(e=16)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+n[63&t]),"")},"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBaseCommon={});
1
+ var e,o;e=this,o=function(e){"use strict";const o=globalThis,t=Math,n=t.floor,r=(e,o)=>e.map(o),a="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".split("");var i;i=r(a,((e,o)=>[e,o])),new Map(i);const l=o.crypto?e=>o.crypto.getRandomValues(e):e=>r(e,(()=>n(256*t.random())));e.defaultSorter=(e,o)=>(null!=e?e:0)<(null!=o?o:0)?-1:1,e.getUniqueId=(e=16)=>{return o=(e,o)=>e+a[63&o],l(new Uint8Array(e)).reduce(o,"");var o}},"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBaseCommon={});