Skip to content

Commit

Permalink
Merge pull request #44 from j0k3r/fix/ua-for-packagephobia
Browse files Browse the repository at this point in the history
Fix error from packagephobia.com
  • Loading branch information
usmanyunusov authored Nov 25, 2024
2 parents 99e1aff + a7018f2 commit f5cb389
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bench/size/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import { get } from 'https'
import c from 'picocolors'

async function getJSON(url) {
const options = {
headers: {
'User-Agent': 'nano-staged',
},
}

return new Promise((resolve) => {
get(url, (res) => {
get(url, options, (res) => {
let text = ''
res.on('data', (chunk) => {
text += chunk
Expand Down

0 comments on commit f5cb389

Please sign in to comment.