Skip to content

Commit 3f27eae

Browse files
greguzgreguz
authored andcommitted
removed lodash
1 parent c980259 commit 3f27eae

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

lib/cli.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55

66
var chalk = require('chalk'),
77
minimist = require('minimist'),
8-
raidar = require('./raidar'),
9-
_ = require('lodash');
8+
raidar = require('./raidar');
109

1110

1211
// print with tabs utility
1312

1413
var print = function() {
15-
console.log(_.values(arguments).join('\t'));
14+
var args = [];
15+
for (var i in arguments) {
16+
args.push(arguments[i]);
17+
}
18+
console.log(args.join('\t'));
1619
};
1720

1821

lib/raidar.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
var util = require('util'),
44
dgram = require('dgram'),
55
events = require('events'),
6-
_ = require('lodash'),
76
ReadyNAS = require('./readynas');
87

98

@@ -40,8 +39,8 @@ Raidar.prototype.open = function(cb) {
4039

4140
this._socket = dgram.createSocket(this._options.socketType);
4241

43-
this._socket.on('message', _.bind(this._socketMessage, this));
44-
this._socket.on('error', _.bind(this._socketError, this));
42+
this._socket.on('message', this._socketMessage.bind(this));
43+
this._socket.on('error', this._socketError.bind(this));
4544

4645
this._socket.bind(this._options.portToListen, function() {
4746
this.setBroadcast(true);
@@ -93,13 +92,17 @@ Raidar.prototype.close = function() {
9392

9493
Raidar.prototype.request = function() {
9594
var self = this,
96-
args = _.values(arguments),
95+
args = [],
9796
opt = this._options,
9897
timeout = 10000,
9998
host = '255.255.255.255',
10099
callback = function() { },
101100
devices = [];
102101

102+
for (var i in arguments){
103+
args.push(arguments[i]);
104+
}
105+
103106
if (!this._socket) return this.open(function() {
104107
self.request.apply(self, args);
105108
});

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
},
1919
"dependencies": {
2020
"chalk": "^1.0.0",
21-
"lodash": "^3.4.0",
2221
"minimist": "^1.1.1"
2322
},
2423
"devDependencies": {

0 commit comments

Comments
 (0)