Skip to content

Commit

Permalink
refactor: remove Object.setPrototypeOf polyfill (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: Ulises Gascón <[email protected]>
  • Loading branch information
Phillip9587 and UlisesGascon authored Oct 22, 2024
1 parent 550d542 commit 36ae18f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
unreleased
=================
==================

* Remove `Object.setPrototypeOf` polyfill
* Use `Array.flat` instead of `array-flatten` package

2.0.0 / 2024-09-09
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const methods = require('methods')
const mixin = require('utils-merge')
const parseUrl = require('parseurl')
const Route = require('./lib/route')
const setPrototypeOf = require('setprototypeof')

/**
* Module variables.
Expand Down Expand Up @@ -60,7 +59,7 @@ function Router (options) {
}

// inherit from the correct prototype
setPrototypeOf(router, this)
Object.setPrototypeOf(router, this)

router.caseSensitive = opts.caseSensitive
router.mergeParams = opts.mergeParams
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"methods": "~1.1.2",
"parseurl": "~1.3.3",
"path-to-regexp": "^8.0.0",
"setprototypeof": "1.2.0",
"utils-merge": "1.0.1"
},
"devDependencies": {
Expand Down

0 comments on commit 36ae18f

Please sign in to comment.