diff --git a/lib/util.js b/lib/util.js index e679b150..821f3cf8 100644 --- a/lib/util.js +++ b/lib/util.js @@ -79,10 +79,15 @@ function dispatchError (levelup, error, callback) { : levelup.emit('error', error) } +function isDefined (v) { + return typeof v !== 'undefined' +} + module.exports = { defaultOptions : defaultOptions , copy : copy , getOptions : getOptions , getLevelDOWN : getLevelDOWN , dispatchError : dispatchError + , isDefined : isDefined }