Skip to content

Commit 5f7b923

Browse files
committed
Breaking: remove ready alias of open event (#48)
1 parent 1e08b30 commit 5f7b923

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
- [Events](#events)
9191
- [`opening`](#opening)
9292
- [`open`](#open)
93-
- [`ready` (deprecated)](#ready-deprecated)
9493
- [`closing`](#closing)
9594
- [`closed`](#closed)
9695
- [`write`](#write)
@@ -992,10 +991,6 @@ db.once('open', function () {
992991
})
993992
```
994993

995-
#### `ready` (deprecated)
996-
997-
Alias for the `open` event. Deprecated in favor of the `open` event.
998-
999994
#### `closing`
1000995

1001996
Emitted when database is closing. Receives 0 arguments.

abstract-level.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ class AbstractLevel extends EventEmitter {
9292
{ name: 'write' },
9393
{ name: 'put', deprecated: true, alt: 'write' },
9494
{ name: 'del', deprecated: true, alt: 'write' },
95-
{ name: 'batch', deprecated: true, alt: 'write' },
96-
{ name: 'ready', deprecated: true, alt: 'open' }
95+
{ name: 'batch', deprecated: true, alt: 'write' }
9796
])
9897

9998
this[kTranscoder] = new Transcoder(formats(this))
@@ -236,9 +235,6 @@ class AbstractLevel extends EventEmitter {
236235
// Only emit public event if pending state changes are done
237236
if (this[kStatus] === 'open') this.emit('open')
238237

239-
// TODO (next major): remove this alias
240-
if (this[kStatus] === 'open') this.emit('ready')
241-
242238
maybeOpened()
243239
}
244240
} else if (this[kStatus] === 'open') {

0 commit comments

Comments
 (0)