How to use the @effectful/es-persist-serialization.current function in @effectful/es-persist-serialization

To help you get started, we’ve selected a few @effectful/es-persist-serialization examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github awto / effectfuljs / samples / persist-counters / trace.js View on Github external
return async function* trace(input) {
    const cur = await R.current;
    for await (const i of input) {
      console.group(`${prefix}-${i.type}`);
      console.log(
        i.value && i.value.$$typeof === Symbol.for("react.element")
          ? prettyFormat(i, { plugins: [ReactElement] })
          : i,
        R.write(cur)
      );
      console.groupEnd();
      yield i;
    }
  };
}