This JavaScript package implements Web IDL type conversion algorithms, converting JavaScript values to the results defined for specific Web IDL types and vice versa. It is useful when you need Web IDL-compatible argument coercion and error behavior in JavaScript, with per-type options for cases like clamping integer ranges or treating null as an empty string for DOMString.
Project status
- The repo appears actively maintained, with an upstream push on 2026-01-02 and recent tagged updates v8.0.1 and v8.0.0 in 2025-09 to 2026-01.
- Apparent update cadence is fairly recent and ongoing, with v8.0.0 (2025-09-09) followed by v8.0.1 (2026-01-02), about 4 months later.
AI summary generated Today
Recent updates
v8.0.1
5 months agoRelease 8.0.1 focuses on performance-oriented changes to the Web IDL string conversions for ByteString and USVString. The implementation now uses more direct JavaScript primitives for validation and surrogate handling. No other runtime API changes are documented in the release notes.
Breakingv8.0.0
9 months agowebidl-conversions v8.0.0 raises the minimum Node.js version to >=20 and shifts the library to assume SharedArrayBuffer exists at runtime. It also introduces explicit SharedArrayBuffer conversion and adds an allowResizable option to buffer-related conversions to control resizable/growable ArrayBuffers.
BreakingFeaturesv7.0.0
9/12/2021webidl-conversions 7.0.0 updates the library to align with Web IDL spec changes and modernizes the project tooling and CI. The release explicitly removes the Function/VoidFunction exports, renames the void conversion export to undefined, and adds test coverage for runtimes that lack SharedArrayBuffer.
BreakingFeaturesv6.1.0
4/17/2020Release 6.1.0 updates buffer source conversions to be stricter about invalid inputs. It now throws when buffers are detached and adds an `allowShared` option intended to control whether `SharedArrayBuffer` is permitted.
BreakingFeaturesv6.0.0
3/23/2020Version 6.0.0 of webidl-conversions raises the Node.js engine requirement to >=10.4 and adds BigInt-based improvements to WebIDL integer conversions, especially long long and unsigned long long. It also introduces a new `globals` option to throw exception objects from a different JavaScript realm, and hardens TypedArray conversions against forged values.
BreakingFeaturesv5.0.0
12/7/2019Version 5.0.0 removes the WebIDL `Error` conversion export and raises the minimum supported Node version to v8. It also changes buffer source conversions to be realm-independent, so conversions should work with ArrayBuffer and typed array objects originating from other realms.
Breakingv4.0.2
8/14/2017Release 4.0.2 updates the implementation of WebIDL `float` and `unrestricted float` conversions. The change removes the per-call `Float32Array` allocation and replaces it with `Math.fround` while keeping the same exported API names.
v4.0.1
2/20/2017v4.0.1 focuses on correctness fixes for WebIDL numeric conversions, plus improved error messages via an optional context value. The implementation also broadens the public conversion method API to accept an options parameter and changes how multiple errors are worded.
BreakingFeaturesv4.0.0
2/11/2017v4.0.0 expands webidl-conversions to cover the remaining basic Web IDL types, notably adding conversions for any, object, Error, and buffer source related types. The implementation was also refactored substantially (especially integer/range conversion logic) and accompanied by extensive new test coverage for conversions and edge cases like NaN handling.
BreakingFeaturesv3.0.1
2/11/2017Release v3.0.1 of webidl-conversions updates the WebIDL numeric conversion logic for unsigned integer types. The change specifically adjusts how negative inputs, and negative zero (-0), are handled during unsigned conversions.