Skip to content

Commit

Permalink
enable strict mode, rename reserverd word
Browse files Browse the repository at this point in the history
  • Loading branch information
neophob committed Nov 11, 2017
1 parent 2387077 commit 0c5d52b
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';
/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/agent.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/incoming_message.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/middlewares.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/observe_read_stream.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/observe_write_stream.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
5 changes: 3 additions & 2 deletions lib/option_converter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down Expand Up @@ -129,7 +131,7 @@ var contentFormatToBinary = function(value) {
var contentFormatToString = function(value) {
if (value.length === 0)
return formatsBinaries[0]

if (value.length === 1)
value = value.readUInt8(0)
else if (value.length === 2)
Expand Down Expand Up @@ -180,4 +182,3 @@ registerOption('Observe', function(sequence) {

return result
})

2 changes: 2 additions & 0 deletions lib/outgoing_message.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/parameters.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
4 changes: 3 additions & 1 deletion lib/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

exports.compareBuffers = function (buf1, buf2) {
if (Buffer.compare)
return Buffer.compare(buf1, buf2)
Expand All @@ -8,4 +10,4 @@ exports.compareBuffers = function (buf1, buf2) {
}
return 0
}
}
}
2 changes: 2 additions & 0 deletions lib/retry_send.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down
6 changes: 4 additions & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*
* Copyright (c) 2013-2015 node-coap contributors.
*
Expand Down Expand Up @@ -227,8 +229,8 @@ CoAPServer.prototype.listen = function(port, address, done) {
if (that._multicastInterface) {
that._sock.addMembership(that._multicastAddress, that._multicastInterface)
} else {
allAddresses(that._options.type).forEach(function(interface) {
that._sock.addMembership(that._multicastAddress, interface)
allAddresses(that._options.type).forEach(function(_interface) {
that._sock.addMembership(that._multicastAddress, _interface)
})
}
}
Expand Down

0 comments on commit 0c5d52b

Please sign in to comment.