Skip to content

Commit 36ae18f

Browse files
refactor: remove Object.setPrototypeOf polyfill (#125)
Co-authored-by: Ulises Gascón <[email protected]>
1 parent 550d542 commit 36ae18f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

HISTORY.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
unreleased
2-
=================
2+
==================
33

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

67
2.0.0 / 2024-09-09

index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const methods = require('methods')
1818
const mixin = require('utils-merge')
1919
const parseUrl = require('parseurl')
2020
const Route = require('./lib/route')
21-
const setPrototypeOf = require('setprototypeof')
2221

2322
/**
2423
* Module variables.
@@ -60,7 +59,7 @@ function Router (options) {
6059
}
6160

6261
// inherit from the correct prototype
63-
setPrototypeOf(router, this)
62+
Object.setPrototypeOf(router, this)
6463

6564
router.caseSensitive = opts.caseSensitive
6665
router.mergeParams = opts.mergeParams

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"methods": "~1.1.2",
1414
"parseurl": "~1.3.3",
1515
"path-to-regexp": "^8.0.0",
16-
"setprototypeof": "1.2.0",
1716
"utils-merge": "1.0.1"
1817
},
1918
"devDependencies": {

0 commit comments

Comments
 (0)