MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / assertSize

Function assertSize

lib/models/dav.js:2028–2034  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

2026}
2027
2028function assertSize (size) {
2029 if (typeof size !== 'number') {
2030 throw new TypeError('"size" argument must be a number')
2031 } else if (size < 0) {
2032 throw new RangeError('"size" argument must not be negative')
2033 }
2034}
2035
2036function alloc (that, size, fill, encoding) {
2037 assertSize(size);

Callers 2

allocFunction · 0.85
allocUnsafeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected