Skip to content

Commit

Permalink
Merge pull request #15 from adzialocha/chore/dependency-updates
Browse files Browse the repository at this point in the history
Chore: Dependency updates and usage of new Buffer API
  • Loading branch information
adzialocha authored Oct 8, 2017
2 parents 2b0c7ae + 2234cc3 commit ff8b17d
Show file tree
Hide file tree
Showing 20 changed files with 2,097 additions and 860 deletions.
8 changes: 8 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"no-unused-expressions": "off",
"class-methods-use-this": "off",
"no-bitwise": "off",
"function-paren-newline": ["error", "consistent"],
"prefer-destructuring": [
"error",
{
"object": true,
"array": false
}
],
"import/no-extraneous-dependencies": [
"error",
{
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
node_js:
- "node"
- "8"
- "6"
- "5"
install:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "osc-js",
"description": "OSC library for Node.js and the browser, with customizable Plugin API for WebSocket, UDP or bridge networking",
"version": "1.0.3",
"version": "1.0.4",
"main": "dist/osc.js",
"authors": [
"Andreas Dzialocha"
Expand Down
4 changes: 2 additions & 2 deletions dist/osc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/osc.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/osc.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/osc.js
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ var DatagramPlugin = function () {
var options = Object.assign({}, this.options.send, customOptions);
var port = options.port,
host = options.host;
this.socket.send(new Buffer(binary), 0, binary.byteLength, port, host);
this.socket.send(Buffer.from(binary), 0, binary.byteLength, port, host);
}
}]);
return DatagramPlugin;
Expand Down Expand Up @@ -1081,7 +1081,7 @@ var BridgePlugin = function () {
var options = mergeOptions$1(this.options, customOptions);
var receiver = options.receiver;
if (receiver === 'udp') {
var data = binary instanceof Buffer ? binary : new Buffer(binary);
var data = binary instanceof Buffer ? binary : Buffer.from(binary);
this.socket.send(data, 0, data.byteLength, options.udpClient.port, options.udpClient.host);
} else if (receiver === 'ws') {
this.websocket.clients.forEach(function (client) {
Expand Down
Loading

0 comments on commit ff8b17d

Please sign in to comment.