Skip to content

Commit

Permalink
Modernize js (#368)
Browse files Browse the repository at this point in the history
* minimum npmjs bump for non angularjs

Signed-off-by: William Dizon <[email protected]>

* angularjs to 1.5.11

Signed-off-by: William Dizon <[email protected]>

* deprecated new Buffer and sendfile

Signed-off-by: William Dizon <[email protected]>
  • Loading branch information
hexparrot authored Sep 1, 2020
1 parent ef3c413 commit 2b0bd29
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 249 deletions.
4 changes: 2 additions & 2 deletions mineos.js
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ mineos.mc = function(server_name, base_dir) {
var rdiff = child_process.spawn(binary, args, params);

rdiff.stdout.on('data', function(data) {
var buffer = new Buffer(data, 'ascii');
var buffer = Buffer.from(data, 'ascii');
var lines = buffer.toString('ascii').split('\n');
var incrs = 0;

Expand Down Expand Up @@ -1603,7 +1603,7 @@ mineos.mc = function(server_name, base_dir) {
socket.setTimeout(2500);

socket.on('connect', function() {
var buf = new Buffer(2);
var buf = Buffer.alloc(2);

buf.write(QUERIES[query], 0, query.length, 'binary');
socket.write(buf);
Expand Down
Loading

0 comments on commit 2b0bd29

Please sign in to comment.