From 36ae18fdf81e3d4ee1c366d833d3a037b335a49d Mon Sep 17 00:00:00 2001 From: Phillip Barta Date: Tue, 22 Oct 2024 20:28:34 +0200 Subject: [PATCH] refactor: remove Object.setPrototypeOf polyfill (#125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ulises Gascón --- HISTORY.md | 3 ++- index.js | 3 +-- package.json | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 3043cd1..f04ec61 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ unreleased -================= +================== +* Remove `Object.setPrototypeOf` polyfill * Use `Array.flat` instead of `array-flatten` package 2.0.0 / 2024-09-09 diff --git a/index.js b/index.js index fac31f1..b806282 100644 --- a/index.js +++ b/index.js @@ -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. @@ -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 diff --git a/package.json b/package.json index 153e133..de23500 100644 --- a/package.json +++ b/package.json @@ -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": {