MCPcopy Index your code
hub / github.com/plotly/plotly.js / assertSize

Function assertSize

stackgl_modules/index.js:179–185  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

177Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
178Object.setPrototypeOf(Buffer, Uint8Array);
179function assertSize(size) {
180 if (typeof size !== 'number') {
181 throw new TypeError('"size" argument must be of type number');
182 } else if (size < 0) {
183 throw new RangeError('The value "' + size + '" is invalid for option "size"');
184 }
185}
186function alloc(size, fill, encoding) {
187 assertSize(size);
188 if (size <= 0) {

Callers 2

allocFunction · 0.70
allocUnsafeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…