A simple TypeScript library for formatting data points into the line protocol format used by InfluxDB. Current stable version is 1.0.0, released as a single version without active updates. It provides a PointFormatter class to convert key-value measurements with optional tags and timestamps into InfluxDB-compatible strings. Minimalistic and focused on formatting only, unlike full InfluxDB client libraries.
npm install influx-point-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a PointFormatter instance for a CPU measurement with tags and fields, then formats it to InfluxDB line protocol string with nanosecond timestamp.
Convert milliseconds to nanoseconds by multiplying by 1e6 before passing to the formatter.
Only pass number or string values in the fields object.
Use flat key-value pairs for tags and fields.
Escape special characters manually or ensure they are not present.
Use correct import: import { PointFormatter } from 'influx-point-formatter'Ensure timestamp is a number representing nanoseconds since epoch.
No dependency data recorded yet.