0.0.2 • Published 9 months ago

effect-analytics v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

effect-analytics

An Effect library for working with Analytics. Wraps the @analytics/* pluggable analytics library.

import { Effect } from "effect";
import { AnalyticsInstance, Analytics as Instance } from "analytics";
import * as A from "effect-analytics"

const instance = Instance({
  app: "app",
  plugins: [],
});

const program = pipe(
  Effect.sync(() => ({ data: 1 })),
  Effect.tap(x => A.track("test", x)), // sends { data: 1 } w/ tag "test" to configured providers.
  Effect.provideService(Analytics, instance)
);
0.0.2

9 months ago

0.0.1

9 months ago