Skip to content

Commit

Permalink
Replace util.inherits with inherits module
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphtheninja committed May 30, 2018
1 parent 9f0e2e5 commit 8db16c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module.exports = Level

var AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN
var util = require('util')
var inherits = require('inherits')
var Iterator = require('./iterator')
var mixedToBuffer = require('./util/mixed-to-buffer')
var isDataCloneError = require('./util/is-data-clone-error')
Expand All @@ -23,7 +23,7 @@ function Level (location, opts) {
this.version = parseInt(opts.version || 1, 10)
}

util.inherits(Level, AbstractLevelDOWN)
inherits(Level, AbstractLevelDOWN)

// Detect binary and array key support (IndexedDB Second Edition)
Level.binaryKeys = support.binaryKeys(indexedDB)
Expand Down
4 changes: 2 additions & 2 deletions iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

'use strict'

var util = require('util')
var inherits = require('inherits')
var AbstractIterator = require('abstract-leveldown').AbstractIterator
var ltgt = require('ltgt')
var mixedToBuffer = require('./util/mixed-to-buffer')
Expand Down Expand Up @@ -43,7 +43,7 @@ function Iterator (db, location, options) {
this.createIterator(location, keyRange, options.reverse)
}

util.inherits(Iterator, AbstractIterator)
inherits(Iterator, AbstractIterator)

Iterator.prototype.createKeyRange = function (options) {
var lower = ltgt.lowerBound(options)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"dependencies": {
"abstract-leveldown": "~5.0.0",
"immediate": "~3.2.3",
"inherits": "^2.0.3",
"ltgt": "^2.1.2",
"typedarray-to-buffer": "~3.1.5"
},
Expand Down

0 comments on commit 8db16c1

Please sign in to comment.