Skip to content

Commit

Permalink
chore: replace utils-merge dependency with Object.assign() (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkoops authored Dec 20, 2024
1 parent 2a3af7e commit 8a7c46c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ unreleased
* Use `Array.flat` instead of `array-flatten` package
* Replace `methods` dependency with standard library
* deps: parseurl@^1.3.3
* Replace `utils-merge` dependency with `Object.assign`

2.0.0 / 2024-09-09
==================
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
const isPromise = require('is-promise')
const Layer = require('./lib/layer')
const { METHODS } = require('node:http')
const mixin = require('utils-merge')
const parseUrl = require('parseurl')
const Route = require('./lib/route')

Expand Down Expand Up @@ -527,11 +526,11 @@ function mergeParams (params, parent) {
}

// make copy of parent for base
const obj = mixin({}, parent)
const obj = Object.assign({}, parent)

// simple non-numeric merging
if (!(0 in params) || !(0 in parent)) {
return mixin(obj, params)
return Object.assign(obj, params)
}

let i = 0
Expand All @@ -557,7 +556,7 @@ function mergeParams (params, parent) {
}
}

return mixin(obj, params)
return Object.assign(obj, params)
}

/**
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"dependencies": {
"is-promise": "4.0.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^8.0.0",
"utils-merge": "1.0.1"
"path-to-regexp": "^8.0.0"
},
"devDependencies": {
"after": "0.8.2",
Expand Down

0 comments on commit 8a7c46c

Please sign in to comment.