pub const STATIC_METHODS: &[&str];Expand description
The statics on Buffer. node v26.7.0’s
Object.getOwnPropertyNames(Buffer).filter(n => typeof Buffer[n] === 'function')
reports eleven; this is ten of them.
Three used to be missing, and the gap was not cosmetic: safe-buffer
feature-detects Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow and, on a miss, exports its own legacy SafeBuffer
wrapper instead of the real buffer module. express’s res.send takes
Buffer from safe-buffer, so every res.json() went through that wrapper
and died on its Buffer(arg, …) call.
The eleventh, copyBytesFrom, is deliberately absent rather than faked. It
copies a typed array’s raw BYTES with offset/length counted in ELEMENTS,
which needs a per-kind little-endian serializer for all nine element kinds
(typed arrays are stored here as a @@elems array of NUMBERS, not bytes).
Listing it without that would advertise a method the dispatcher cannot
implement — the exact drift this list exists to prevent.