Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
🚚 move lib/util.js to lib/promisify.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphtheninja committed Aug 29, 2017
1 parent bb3df7b commit 37b36ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
* <https://github.com/level/levelup/blob/master/LICENSE.md>
*/

var util = require('./util')
var WriteError = require('level-errors').WriteError
var promisify = util.promisify
var promisify = require('./promisify')

function Batch (levelup) {
this._levelup = levelup
Expand Down
4 changes: 1 addition & 3 deletions lib/levelup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ var IteratorStream = require('level-iterator-stream')
var Batch = require('./batch')
var errors = require('level-errors')
var assert = require('assert')
var util = require('./util')
var promisify = require('./promisify')

var WriteError = errors.WriteError
var ReadError = errors.ReadError
var NotFoundError = errors.NotFoundError
var OpenError = errors.OpenError
var InitializationError = errors.InitializationError

var promisify = util.promisify

// Possible AbstractLevelDOWN#status values:
// - 'new' - newly created, not opened or closed
// - 'opening' - waiting for the database to be opened, post open()
Expand Down
4 changes: 1 addition & 3 deletions lib/util.js → lib/promisify.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@ function promisify () {
return [ callback, promise ]
}

module.exports = {
promisify: promisify
}
module.exports = promisify

0 comments on commit 37b36ee

Please sign in to comment.