Skip to content

Commit 8dbb1ac

Browse files
committed
feat: remove unnecessary dependency
1 parent ca32573 commit 8dbb1ac

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/metascraper-clearbit-logo/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
'use strict'
22

3+
const { stringify } = require('querystring')
34
const { URL } = require('url')
4-
const qsm = require('qsm')
5-
65
const got = require('got')
76

87
const ENDPOINT = 'https://logo.clearbit.com'
98

10-
const apiUrl = (url, opts = {}) => {
9+
const apiUrl = (url, opts) => {
1110
const { hostname } = new URL(url)
1211
const apiUrl = `${ENDPOINT}/${hostname}`
13-
return qsm.add(apiUrl, opts)
12+
return opts ? `${apiUrl}?${stringify(opts)}` : apiUrl
1413
}
1514

1615
module.exports = opts => {

packages/metascraper-clearbit-logo/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"metascraper"
2323
],
2424
"dependencies": {
25-
"got": "~9.5.0",
26-
"qsm": "~2.1.0"
25+
"got": "~9.5.0"
2726
},
2827
"devDependencies": {
2928
"mocha": "latest",

0 commit comments

Comments
 (0)