Skip to content

Commit

Permalink
fix: fix build by removing lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbllmnn committed Jul 2, 2024
1 parent 32212e6 commit 45d9ae3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"homepage": "https://github.com/geostyler/geostyler-wfs-parser#readme",
"dependencies": {
"fast-xml-parser": "^4.4.0",
"geostyler-data": "^1.0.0",
"lodash": "^4.17.21"
"geostyler-data": "^1.0.0"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
Expand Down
5 changes: 2 additions & 3 deletions src/WfsDataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {

import { JSONSchema4TypeName } from 'json-schema';

const isEmpty = require('lodash/isEmpty');
const isFinite = require('lodash/isFinite');
const isEmpty = (obj: any) => [Object, Array].includes((obj || {}).constructor) && !Object.entries((obj || {})).length;

import {
XMLParser
Expand Down Expand Up @@ -79,7 +78,7 @@ export class WfsDataParser implements DataParser {
*/
generateRequestParamString(params: any): string {
return Object.keys(params)
.filter(key => !isEmpty(params[key]) || isFinite(params[key]))
.filter(key => !isEmpty(params[key]) || Number.isFinite(params[key]))
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(params[key]))
.join('&');
}
Expand Down

0 comments on commit 45d9ae3

Please sign in to comment.