Back to Explore

jshttp/vary

GitHub
2 watchersOpen source

Last release:

“vary” is a Node.js module that helps manage the HTTP Vary response header. It provides functions to add one or more fields to res.Vary, appending them if needed, useful for applications that vary responses based on request headers like User-Agent.

Project status

  • Maintenance status: Published code updates appear infrequent, with the most recent tagged update being v1.1.2 on 2017-09-24. Although there was an upstream push on 2026-04-02, there is no evidence of new published updates since 2017, so the project reads as quiet or in maintenance mode.
  • Update cadence: Historical updates are spaced years apart (2014, 2015, 2017), with no recent tagged updates close to today (2026-09-10), suggesting low cadence rather than active evolution.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.1.2

    Release 1.1.2 is primarily a performance-focused change, described in the notes as faster HTTP header token parsing. The code diff shows the optimization is implemented by rewriting the internal `parse()` logic in `index.js` to avoid regex-based splitting, along with adding benchmark tooling and some CI/dev dependency updates.

  • v1.1.1

    Release v1.1.1 makes a small performance-focused change by hoisting the regular expression used to parse comma-separated Vary header values. The functional behavior of Vary header manipulation appears unchanged in the main implementation file (index.js), with the rest of the diff largely consisting of formatting and tooling updates.

  • v1.1.0

    Release 1.1.0 tightens validation of the `field` argument passed to `vary.append(header, field)`. It now enforces RFC 7230 `field-name` token characters and throws a `TypeError` when invalid characters are present.

    Breaking
  • v1.0.1

    Release v1.0.1 refactors vary header manipulation with performance-oriented code changes and adds stricter runtime behavior by enabling strict mode. Functionally, it prevents setting the HTTP Vary header when the computed value is empty, addressing cases like an empty provided field.

  • v1.0.0

    v1.0.0 refactors the `vary` module to add a new low-level helper, `vary.append(header, field)`, and extends `vary(res, field)` to accept a comma-separated Vary header string as input. The release notes mention these features and the move to the `jshttp` GitHub organization, and the diff also updates tests and development tooling accordingly.

    BreakingFeatures
  • v0.1.0

    This release adds support for specifying multiple fields to set in the HTTP `Vary` response header. Instead of only adding a single header value, `vary` can now accept an array of field names and will update `Vary` accordingly.

    Features
  • v0.0.0

    This is the initial release (v0.0.0) of the project. There are no release notes indicating any features, fixes, security updates, or breaking changes beyond the fact that it is being published for the first time.