server-timify
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

server-timify

npm version npm size install size code coverage Release Open in Visual Studio Code

Parse and stringifying utility methods for the Server-Timing header. Very forgiving and does not throw any errors for any invalid input.

Install

npm install server-timify
# OR
yarn add server-timify

Usage

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" to learn how to use the Server-Timing header.

License

The code in this project is released under the MIT License.

FOSSA Status

Dependencies (0)

    Dev Dependencies (23)

    Package Sidebar

    Install

    npm i server-timify

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    8.18 kB

    Total Files

    5

    Last publish

    Collaborators

    • oslashbot