summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/index.js b/index.js
index ba4ac3d..7c42f1d 100644
--- a/index.js
+++ b/index.js
@@ -1,2 +1,15 @@
'use strict'
-module.exports = require('./build/Release/winutils.node')
+
+const bin = require('./build/Release/winutils.node')
+
+module.exports = {
+ escapeShellArg(arg) {
+ arg = arg.replace(/["%!]/g, ' ')
+ return '"' + arg + '"'
+ },
+
+ deelevate: bin.deelevate,
+ elevate: bin.elevate,
+ getSystem32Path: bin.getSystem32Path,
+ isUserAdmin: bin.isUserAdmin
+}