1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2025-06-13 12:53:54 +00:00

allow passing in options as separate argument

This commit is contained in:
Mathias Buus 2015-09-23 18:05:18 +02:00
parent f857d1e138
commit 8ea6359838

View File

@ -30,10 +30,11 @@ exports.context = function () {
return ctx
}
exports.mount = function (mnt, ops, cb) {
exports.mount = function (mnt, ops, opts, cb) {
if (typeof opts === 'function') return exports.mount(mnt, ops, null, opts)
if (!cb) cb = noop
ops = xtend(ops) // clone
ops = xtend(ops, opts) // clone
if (/\*|(^,)fuse-bindings(,$)/.test(process.env.DEBUG)) ops.options = ['debug'].concat(ops.options || [])
mnt = path.resolve(mnt)