Skip to content

Commit f4ce77d

Browse files
committed
[JS] destructuring exports
1 parent 741dbf6 commit f4ce77d

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

javascript/node/selenium-webdriver/io/exec.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Command {
121121
* @param {Options=} opt_options The command options.
122122
* @return {!Command} The launched command.
123123
*/
124-
module.exports = function exec(command, opt_options) {
124+
function exec(command, opt_options) {
125125
const options = opt_options || {}
126126

127127
let proc = childProcess.spawn(command, options.args || [], {
@@ -158,6 +158,9 @@ module.exports = function exec(command, opt_options) {
158158

159159
// Exported to improve generated API documentation.
160160

161-
module.exports.Command = Command
162-
module.exports.Options = Options
163-
module.exports.Result = Result
161+
module.exports = {
162+
Command,
163+
Options,
164+
Result,
165+
exec
166+
}

javascript/node/selenium-webdriver/remote/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const url = require('url')
2323

2424
const httpUtil = require('../http/util')
2525
const io = require('../io')
26-
const exec = require('../io/exec')
26+
const { exec } = require('../io/exec')
2727
const { Zip } = require('../io/zip')
2828
const cmd = require('../lib/command')
2929
const input = require('../lib/input')

0 commit comments

Comments
 (0)