DataView
get / set Uint8Clamped
methods
Modules
esnext.data-view.get-uint8-clamped
and esnext.data-view.set-uint8-clamped
Built-ins signatures
class DataView {
getUint8Clamped(offset: any): uint8
setUint8Clamped(offset: any, value: any): void;
}
Entry points
core-js/proposals/data-view-get-set-uint8-clamped
core-js/full/dataview/get-uint8-clamped
core-js/full/dataview/set-uint8-clamped
Examples
const view = new DataView(new ArrayBuffer(1));
view.setUint8Clamped(0, 100500);
console.log(view.getUint8Clamped(0)); // => 255