“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/active upkeep: The repository shows an upstream push on 2026-04-02, which suggests ongoing activity, but the most recent published updates in the provided history are from 2017 (v1.1.2 and v1.1.1), so it may be low-frequency maintenance rather than rapid iteration.
- Update cadence: Updates appear infrequent, with releases in 2015 (v1.1.0) and then two updates in 2017 (v1.1.1, v1.1.2), indicating long gaps between notable changes.
AI summary generated Today
Recent updates
v1.1.2
9/24/2017Release 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
3/20/2017Release 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
9/30/2015Release 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.
Breakingv1.0.1
7/9/2015Release 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
8/10/2014v1.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.
BreakingFeaturesv0.1.0
8/10/2014This 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.
Featuresv0.0.0
6/4/2014This 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.