@nexly/core
v0.16.2
Published
Nexly ingest core (platform-agnostic): types, payload builder, abstract NexlyBase client
Readme
@nexly/core
JavaScript SDK for browser-side event ingestion with Nexly. No UI framework required.
For React apps, add @nexly/react-web. For Next.js App Router, use @nexly/next.
Install
npm install @nexly/coreQuick start
import { Nexly } from '@nexly/core'
const nexly = new Nexly(options)
nexly.pageview()
nexly.event({ name: 'click', type: 'engagement', data: { id: 'x' } })Constructor options use the NexlyInit type from the published typings.
Singleton
When using a provider (@nexly/react-web or @nexly/next), the client is also available as a singleton — useful for plain functions outside the React tree:
import { Nexly } from '@nexly/core'
Nexly.getInstance()?.event({ name: 'click', type: 'engagement' })API
The package ships .d.ts files; use your editor or node_modules typings for the full export list.
License
MIT — see LICENSE.
