Skip to content

Commit

Permalink
add isDefined to util
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Jun 20, 2014
1 parent 8c5b41f commit 24f5421
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/util.js
Expand Up @@ -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
}

0 comments on commit 24f5421

Please sign in to comment.