Files
linx-simulator2/node_modules/bytebuffer/src/methods/assert.js
2019-09-18 11:11:16 +03:00

13 lines
427 B
JavaScript

/**
* Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to
* disable them if your code already makes sure that everything is valid.
* @param {boolean} assert `true` to enable assertions, otherwise `false`
* @returns {!ByteBuffer} this
* @expose
*/
ByteBufferPrototype.assert = function(assert) {
this.noAssert = !assert;
return this;
};