@drwyn/client
v0.2.0-alpha.1
Published
Client for drwyn cloud — sends events and reads/writes per-user memory.
Downloads
246
Readme
@drwyn/client
Client for drwyn cloud — sends events and reads/writes per-user memory.
bun add @drwyn/client@alphaUsage
import { DrwynClient } from '@drwyn/client'
const drwyn = new DrwynClient({
projectKey: 'pk_...', // from your drwyn.dev dashboard
})
await drwyn.sendEvent({
userId: 'anon_xyz',
name: 'cta_clicked',
props: { plan: 'pro' },
})
const value = await drwyn.getMemory('anon_xyz', 'last_page')
await drwyn.setMemory('anon_xyz', 'last_page', '/pricing')License
MIT
