Skip to content

Commit

Permalink
Remove use of assert module (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jun 7, 2021
1 parent 6919a6b commit f3e86ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/levelup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const IteratorStream = require('level-iterator-stream')
const Batch = require('./batch')
const errors = require('level-errors')
const supports = require('level-supports')
const assert = require('assert')
const catering = require('catering')
const getCallback = require('./common').getCallback
const getOptions = require('./common').getOptions
Expand Down Expand Up @@ -54,7 +53,9 @@ function LevelUP (db, options, callback) {
throw error
}

assert.strictEqual(typeof db.status, 'string', '.status required, old abstract-leveldown')
if (typeof db.status !== 'string') {
throw new Error('.status required, old abstract-leveldown')
}

this.options = getOptions(options)
this._db = db
Expand Down

0 comments on commit f3e86ae

Please sign in to comment.