Skip to content

Commit

Permalink
Breaking: modernize syntax and bump standard (Level/community#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Apr 9, 2021
1 parent bb5ec3a commit 5a6de73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions errors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var createError = require('errno').create
var LevelUPError = createError('LevelUPError')
var NotFoundError = createError('NotFoundError', LevelUPError)
const createError = require('errno').create
const LevelUPError = createError('LevelUPError')
const NotFoundError = createError('NotFoundError', LevelUPError)

NotFoundError.prototype.notFound = true
NotFoundError.prototype.status = 404
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"hallmark": "^3.1.0",
"level-community": "^3.0.0",
"nyc": "^14.0.0",
"standard": "^14.0.0",
"standard": "^16.0.3",
"tape": "^5.0.1"
},
"hallmark": {
Expand Down
10 changes: 5 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var test = require('tape')
var errors = require('./')
const test = require('tape')
const errors = require('./')

test('all errors are instances of LevelUPError', function (t) {
var LevelUPError = errors.LevelUPError
var keys = Object.keys(errors)
const LevelUPError = errors.LevelUPError
const keys = Object.keys(errors)

keys.forEach(function (key) {
t.ok(new errors[key]() instanceof LevelUPError)
Expand All @@ -13,7 +13,7 @@ test('all errors are instances of LevelUPError', function (t) {
})

test('NotFoundError has special properties', function (t) {
var error = new errors.NotFoundError()
const error = new errors.NotFoundError()
t.equal(error.notFound, true)
t.equal(error.status, 404)
t.end()
Expand Down

0 comments on commit 5a6de73

Please sign in to comment.