@cripty2001/utils 0.0.221 → 0.0.222

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.
@@ -440,6 +440,12 @@ function useAsyncInput(value, setValue, handler, setPending = () => { }) {
440
440
  ];
441
441
  }
442
442
  function whisprFromExternal(getData, interval) {
443
+ const cleanup = () => {
444
+ if (intervalRef !== null) {
445
+ clearInterval(intervalRef);
446
+ }
447
+ };
448
+ const [value, setValue] = whispr_1.Whispr.create(getData(), cleanup);
443
449
  const intervalRef = (() => {
444
450
  return interval !== null ?
445
451
  setInterval(() => {
@@ -447,12 +453,6 @@ function whisprFromExternal(getData, interval) {
447
453
  }, interval) :
448
454
  null;
449
455
  })();
450
- const cleanup = () => {
451
- if (intervalRef !== null) {
452
- clearInterval(intervalRef);
453
- }
454
- };
455
- const [value, setValue] = whispr_1.Whispr.create(getData(), cleanup);
456
456
  return {
457
457
  data: value,
458
458
  refresh: () => setValue(getData()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cripty2001/utils",
3
- "version": "0.0.221",
3
+ "version": "0.0.222",
4
4
  "description": "Internal Set of utils. If you need them use them, otherwise go to the next package ;)",
5
5
  "homepage": "https://github.com/cripty2001/utils#readme",
6
6
  "bugs": {