Skip to content

Commit

Permalink
Move writeBytes to methods/append.js (protobufjs#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carnewal authored and dcodeIO committed Feb 22, 2018
1 parent fbefed7 commit c5df326
Show file tree
Hide file tree
Showing 12 changed files with 209 additions and 194 deletions.
24 changes: 12 additions & 12 deletions dist/bytebuffer-dataview.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,18 +509,6 @@
return slice;
};

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

// types/ints/int8

Expand Down Expand Up @@ -2137,6 +2125,18 @@
return this;
};

/**
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
* @function
* @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets
* will be modified according to the performed read operation.
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
* written if omitted.
* @returns {!ByteBuffer} this
* @expose
*/
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
/**
* 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.
Expand Down
98 changes: 49 additions & 49 deletions dist/bytebuffer-dataview.min.js

Large diffs are not rendered by default.

Binary file modified dist/bytebuffer-dataview.min.js.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions dist/bytebuffer-dataview.min.map

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions dist/bytebuffer-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,18 +503,6 @@ module.exports = (function() {
return slice;
};

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

// types/ints/int8

Expand Down Expand Up @@ -2277,6 +2265,18 @@ module.exports = (function() {
return this;
};

/**
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
* @function
* @param {!ByteBuffer|!Buffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its
* offsets will be modified according to the performed read operation.
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
* written if omitted.
* @returns {!ByteBuffer} this
* @expose
*/
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
/**
* 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.
Expand Down
24 changes: 12 additions & 12 deletions dist/bytebuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,18 +508,6 @@
return slice;
};

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

// types/ints/int8

Expand Down Expand Up @@ -2422,6 +2410,18 @@
return this;
};

/**
* Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.
* @function
* @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets
* will be modified according to the performed read operation.
* @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8")
* @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes
* written if omitted.
* @returns {!ByteBuffer} this
* @expose
*/
ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;
/**
* 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.
Expand Down
Loading

0 comments on commit c5df326

Please sign in to comment.