File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
packages/metascraper-clearbit-logo Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
+ const { stringify } = require ( 'querystring' )
3
4
const { URL } = require ( 'url' )
4
- const qsm = require ( 'qsm' )
5
-
6
5
const got = require ( 'got' )
7
6
8
7
const ENDPOINT = 'https://logo.clearbit.com'
9
8
10
- const apiUrl = ( url , opts = { } ) => {
9
+ const apiUrl = ( url , opts ) => {
11
10
const { hostname } = new URL ( url )
12
11
const apiUrl = `${ ENDPOINT } /${ hostname } `
13
- return qsm . add ( apiUrl , opts )
12
+ return opts ? ` ${ apiUrl } ? ${ stringify ( opts ) } ` : apiUrl
14
13
}
15
14
16
15
module . exports = opts => {
Original file line number Diff line number Diff line change 22
22
" metascraper"
23
23
],
24
24
"dependencies" : {
25
- "got" : " ~9.5.0" ,
26
- "qsm" : " ~2.1.0"
25
+ "got" : " ~9.5.0"
27
26
},
28
27
"devDependencies" : {
29
28
"mocha" : " latest" ,
You can’t perform that action at this time.
0 commit comments