Automatically converts ISO 8601 date strings (with millisecond precision) in Axios JSON response data to JavaScript Date objects. v1.2.1 is current. Lightweight, TypeScript-first, no external dependencies beyond Axios. Releases appear infrequent but stable. Key differentiator: simple drop-in transformer for Axios instances vs manual parsing or full-date-lib overhead.
npm install axios-date-transformerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an Axios instance that automatically converts ISO date strings to Date objects.
For nested or non-ISO formats, preprocess response.data manually or use a library like 'superjson'.
Ensure your API returns dates in the expected ISO with milliseconds format, or extend the regex.
N/A
Run `npm install axios-date-transformer` and ensure import matches: `import { ... } from 'axios-date-transformer'`.Use `import { createAxiosDateTransformer } from 'axios-date-transformer'` in an ESM context, or `const { createAxiosDateTransformer } = require('axios-date-transformer')` in CJS.Ensure you have `axios` installed and TypeScript is using `node` moduleResolution. The package ships types, but you might need to check tsconfig.json.