Skip to content

Commit 969acf2

Browse files
authored
fix: remove lodash-es (#6622)
1 parent 0c784af commit 969acf2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package-lock.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/js-client/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@
4242
],
4343
"dependencies": {
4444
"@netlify/open-api": "^2.37.0",
45-
"lodash-es": "^4.17.21",
4645
"node-fetch": "^3.0.0",
4746
"picoquery": "^2.5.0",
4847
"p-wait-for": "^5.0.0"
4948
},
5049
"devDependencies": {
51-
"@types/lodash-es": "^4.17.6",
5250
"@types/node": "^18.19.111",
5351
"from2-string": "^1.1.0",
5452
"nock": "^13.0.0",

packages/js-client/src/methods/params.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { camelCase } from 'lodash-es'
1+
function camelCase(str) {
2+
return str
3+
.toLowerCase()
4+
.replace(/[-_\s]+(.)?/g, (_, chr) => (chr ? chr.toUpperCase() : ''))
5+
.replace(/^[A-Z]/, (match) => match.toLowerCase())
6+
}
27

38
export const getRequestParams = function (params, requestParams, name) {
49
const entries = Object.values(params).map((param) => getRequestParam(param, requestParams, name))

0 commit comments

Comments
 (0)