Move require outside the function
authorChocobozzz <florian.bigard@gmail.com>
Sun, 7 Feb 2016 12:12:32 +0000 (13:12 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Sun, 7 Feb 2016 12:12:32 +0000 (13:12 +0100)
lib/webtorrentProcess.js

index 7ba2dd3d9f6d1d175c7946ec88428b7b9b2d19ac..7da52523a74703377e7ee597f1f66b5d908e4eec 100644 (file)
@@ -1,9 +1,9 @@
 'use strict'
 
-function webtorrent (args) {
-  var WebTorrent = require('webtorrent')
-  var ipc = require('node-ipc')
+var WebTorrent = require('webtorrent')
+var ipc = require('node-ipc')
 
+function webtorrent (args) {
   if (args.length !== 3) {
     throw new Error('Wrong arguments number: ' + args.length + '/3')
   }