@adriansteffan/reactive 0.1.33 → 0.1.34

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.
@@ -1,4 +1,4 @@
1
- import { W as e } from "./mod-BI0gtRcG.js";
1
+ import { W as e } from "./mod-BpIlYaYt.js";
2
2
  class s extends e {
3
3
  async enable() {
4
4
  console.log("Immersive mode is only available on Android");
@@ -1,4 +1,4 @@
1
- import { W as P, b as x, E } from "./mod-BI0gtRcG.js";
1
+ import { W as P, b as x, E } from "./mod-BpIlYaYt.js";
2
2
  function m(w) {
3
3
  const e = w.split("/").filter((t) => t !== "."), r = [];
4
4
  return e.forEach((t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adriansteffan/reactive",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -54,6 +54,14 @@ export interface BaseComponentProps {
54
54
  updateStore: (mergeIn: Store) => void;
55
55
  }
56
56
 
57
+ export function selectPrevTrialData(data: any[], type?: string): any | undefined {
58
+ if (!type) return data.at(-1);
59
+ for (let i = data.length - 1; i >= 0; i--) {
60
+ if (data[i].type === type) return data[i];
61
+ }
62
+ return undefined;
63
+ }
64
+
57
65
  type ParamType = 'string' | 'number' | 'boolean' | 'array' | 'json';
58
66
 
59
67
  type ParamValue<T extends ParamType> = T extends 'number'