Skip to content

Commit c5df326

Browse files
CarnewaldcodeIO
authored andcommitted
Move writeBytes to methods/append.js (#87)
fixes #74
1 parent fbefed7 commit c5df326

12 files changed

+209
-194
lines changed

dist/bytebuffer-dataview.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -509,18 +509,6 @@
509509
return slice;
510510
};
511511

512-
/**
513-
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
514-
* @function
515-
* @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets
516-
* will be modified according to the performed read operation.
517-
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
518-
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
519-
* written if omitted.
520-
* @returns {!ByteBuffer} this
521-
* @expose
522-
*/
523-
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
524512

525513
// types/ints/int8
526514

@@ -2137,6 +2125,18 @@
21372125
return this;
21382126
};
21392127

2128+
/**
2129+
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
2130+
* @function
2131+
* @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets
2132+
* will be modified according to the performed read operation.
2133+
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
2134+
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
2135+
* written if omitted.
2136+
* @returns {!ByteBuffer} this
2137+
* @expose
2138+
*/
2139+
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
21402140
/**
21412141
* Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to
21422142
* disable them if your code already makes sure that everything is valid.

dist/bytebuffer-dataview.min.js

+49-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bytebuffer-dataview.min.js.gz

-33 Bytes
Binary file not shown.

dist/bytebuffer-dataview.min.map

+2-2
Large diffs are not rendered by default.

dist/bytebuffer-node.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -503,18 +503,6 @@ module.exports = (function() {
503503
return slice;
504504
};
505505

506-
/**
507-
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
508-
* @function
509-
* @param {!ByteBuffer|!Buffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its
510-
* offsets will be modified according to the performed read operation.
511-
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
512-
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
513-
* written if omitted.
514-
* @returns {!ByteBuffer} this
515-
* @expose
516-
*/
517-
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
518506

519507
// types/ints/int8
520508

@@ -2277,6 +2265,18 @@ module.exports = (function() {
22772265
return this;
22782266
};
22792267

2268+
/**
2269+
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
2270+
* @function
2271+
* @param {!ByteBuffer|!Buffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its
2272+
* offsets will be modified according to the performed read operation.
2273+
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
2274+
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
2275+
* written if omitted.
2276+
* @returns {!ByteBuffer} this
2277+
* @expose
2278+
*/
2279+
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
22802280
/**
22812281
* Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to
22822282
* disable them if your code already makes sure that everything is valid.

dist/bytebuffer.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -508,18 +508,6 @@
508508
return slice;
509509
};
510510

511-
/**
512-
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
513-
* @function
514-
* @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets
515-
* will be modified according to the performed read operation.
516-
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
517-
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
518-
* written if omitted.
519-
* @returns {!ByteBuffer} this
520-
* @expose
521-
*/
522-
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
523511

524512
// types/ints/int8
525513

@@ -2422,6 +2410,18 @@
24222410
return this;
24232411
};
24242412

2413+
/**
2414+
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
2415+
* @function
2416+
* @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets
2417+
* will be modified according to the performed read operation.
2418+
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
2419+
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
2420+
* written if omitted.
2421+
* @returns {!ByteBuffer} this
2422+
* @expose
2423+
*/
2424+
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
24252425
/**
24262426
* Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to
24272427
* disable them if your code already makes sure that everything is valid.

0 commit comments

Comments
 (0)