https://github.com/getoslash/server-timify
Parser and transformer for the Server-Timing header.
https://github.com/getoslash/server-timify
headers parser performance server-timing
Last synced: 10 months ago
JSON representation
Parser and transformer for the Server-Timing header.
- Host: GitHub
- URL: https://github.com/getoslash/server-timify
- Owner: getoslash
- License: other
- Created: 2022-02-07T13:50:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-16T13:47:09.000Z (about 4 years ago)
- Last Synced: 2025-06-14T06:34:21.487Z (about 1 year ago)
- Topics: headers, parser, performance, server-timing
- Language: TypeScript
- Homepage:
- Size: 571 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# server-timify
[](https://npmjs.com/package/server-timify)
[](https://bundlephobia.com/package/server-timify)
[](https://packagephobia.com/result?p=server-timify)
[](https://codecov.io/gh/getoslash/server-timify)
[](https://github.com/getoslash/server-timify/actions/workflows/release.yml)
[](https://open.vscode.dev/getoslash/server-timify)
⏱ Parse and stringifying utility methods for the [`Server-Timing`](https://www.smashingmagazine.com/2018/10/performance-server-timing/) header. Very forgiving and does not throw any errors for any invalid input.
## Install
```bash
npm install server-timify
# OR
yarn add server-timify
```
## Usage
```typescript
import { parse, stringify } from 'server-timify'
parse('cache;desc="Cache Read";dur=23.2')
// [{ name: "cache", description: "Cache Read", duration: 23.2 }]
stringify([{ name: "cache", description: "Cache Read", duration: 23.2 }])
// cache;desc="Cache Read";dur=23.2
```
Read ["Measuring Performance With Server Timing"](https://www.smashingmagazine.com/2018/10/performance-server-timing/) to learn how to use the `Server-Timing` header.
## License
The code in this project is released under the [MIT License](LICENSE).
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fgetoslash%2Fserver-timify?ref=badge_large)