MCPcopy Create free account
hub / github.com/TruthHun/BookStack / objectWriteUInt16

Function objectWriteUInt16

static/word2md/mammoth.browser.js:11000–11006  ·  view source on GitHub ↗
(buf, value, offset, littleEndian)

Source from the content-addressed store, hash-verified

10998}
10999
11000function objectWriteUInt16 (buf, value, offset, littleEndian) {
11001 if (value < 0) value = 0xffff + value + 1
11002 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
11003 buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
11004 (littleEndian ? i : 1 - i) * 8
11005 }
11006}
11007
11008Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
11009 value = +value

Callers 1

mammoth.browser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected