Lightweight duration formatter with multi-locale support. Current stable version is 0.0.7. It provides a simple `format` function to convert seconds into human-readable strings like '1 hour 1 minute', supporting four locales (English, Turkish, Turkmen, Russian) and three styles (long, short, narrow). Releases are infrequent. Key differentiators: no dependencies, TypeScript-first, small bundle size, and plural rule support for Russian. A `createFormatter` factory enables reusable preset configurations.
npm install timeprettifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of format and createFormatter with options.
Replace `unit` with `units` in options object.
Explicitly pass `{ locale: 'tr' }` to all format calls if Turkish output is required.Convert string inputs to numbers before calling `format`.
Use one of the supported locales: 'en', 'tr', 'ru', 'tm'.
Limit input to Number.MAX_SAFE_INTEGER or use BigInt if needed (not supported currently).
Consider using 'short' style for broader readability.
Use `import { format } from 'timeprettify'` instead of `import format from 'timeprettify'`.Run `npm install timeprettify` and ensure `esModuleInterop` is enabled in tsconfig.json.
Convert the argument to a number: `format(Number(seconds))`.
Use one of the supported locales or remove the locale option to default to 'en'.
No dependency data recorded yet.