Skip to content

Commit 8d03f1b

Browse files
committed
Required 'util' in files where used
When testing, requiring 'util' was not necessary. When including in an actual web application, 'util' is not available unless required. There's probably a better way of promisifying than doing it piecemeal as is currently.
1 parent f564df5 commit 8d03f1b

File tree

11 files changed

+17
-0
lines changed

11 files changed

+17
-0
lines changed

src/id.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22

3+
const util = require('util')
34
const moduleConfig = require('./utils/module-config')
45

56
module.exports = (arg) => {

src/peers/add.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const util = require('util')
4+
35
module.exports = (send) => {
46
return util.promisify((arg, opts, callback) => {
57
if (typeof opts == 'function') {

src/peers/ls.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const util = require('util')
4+
35
module.exports = (send) => {
46
return util.promisify((opts, callback) => {
57
if (typeof opts == 'function') {

src/peers/rm.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const util = require('util')
4+
35
module.exports = (send) => {
46
return util.promisify((arg, opts, callback) => {
57
if (typeof opts == 'function') {

src/pin/add.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const util = require('util')
4+
35
module.exports = (send) => {
46
return util.promisify((arg, opts, callback) => {
57
if (typeof opts == 'function') {

src/pin/ls.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const util = require('util')
4+
35
module.exports = (send) => {
46
return util.promisify((opts, callback) => {
57
if (typeof opts == 'function') {

src/pin/rm.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const util = require('util')
4+
35
module.exports = (send) => {
46
return util.promisify((arg, opts, callback) => {
57
if (typeof opts == 'function') {

src/recover.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22

3+
const util = require('util')
34
const moduleConfig = require('./utils/module-config')
45

56
module.exports = (arg) => {

src/status.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22

3+
const util = require('util')
34
const moduleConfig = require('./utils/module-config')
45

56
module.exports = (arg) => {

src/sync.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22

3+
const util = require('util')
34
const moduleConfig = require('./utils/module-config')
45

56
module.exports = (arg) => {

0 commit comments

Comments
 (0)