Skip to content

Commit 1eb8629

Browse files
JayBee007CompuIves
authored andcommitted
Pr/issue 2293 (codesandbox#2297)
* fix error when searching for deps has no downloadsLast30Days response * Add @JayBee007 as a contributor
1 parent 806658f commit 1eb8629

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

β€Ž.all-contributorsrcβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,15 @@
13021302
"bug",
13031303
"code"
13041304
]
1305+
},
1306+
{
1307+
"login": "JayBee007",
1308+
"name": "Javed",
1309+
"avatar_url": "https://avatars0.githubusercontent.com/u/13278577?v=4",
1310+
"profile": "https://github.com/JayBee007",
1311+
"contributions": [
1312+
"code"
1313+
]
13051314
}
13061315
],
13071316
"repoType": "github",

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-138-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
1+
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-139-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
22

33
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
44
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
@@ -62,7 +62,7 @@ Thanks goes to these wonderful people
6262
| [<img src="https://avatars3.githubusercontent.com/u/15030806?v=4" width="100px;"/><br /><sub><b>Bruce Xu</b></sub>](http://www.xulingming.cn)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=jackdon "Code") | [<img src="https://avatars3.githubusercontent.com/u/7316730?v=4" width="100px;"/><br /><sub><b>jess</b></sub>](http://jessachandler.com)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=monkeywithacupcake "Code") | [<img src="https://avatars0.githubusercontent.com/u/8875406?v=4" width="100px;"/><br /><sub><b>Juliette PrΓ©tot</b></sub>](https://juliette.sh)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=juliettepretot "Code") | [<img src="https://avatars0.githubusercontent.com/u/25737281?v=4" width="100px;"/><br /><sub><b>Victoria Bergquist</b></sub>](https://twitter.com/vicbergquist)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=vicbergquist "Code") [πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=vicbergquist "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/9032162?v=4" width="100px;"/><br /><sub><b>Samrith Shankar</b></sub>](https://github.com/samrith-s)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=samrith-s "Code") | [<img src="https://avatars3.githubusercontent.com/u/827497?v=4" width="100px;"/><br /><sub><b>Mahendra Hirapra</b></sub>](https://github.com/tinahir)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=tinahir "Code") | [<img src="https://avatars3.githubusercontent.com/u/17409675?v=4" width="100px;"/><br /><sub><b>Rabin Gaire</b></sub>](http://rabingaire.com.np)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=rabingaire "Code") |
6363
| [<img src="https://avatars2.githubusercontent.com/u/8527474?v=4" width="100px;"/><br /><sub><b>Neville Mehta</b></sub>](https://twitter.com/ask_neville)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=nm123github "Code") | [<img src="https://avatars0.githubusercontent.com/u/1813468?v=4" width="100px;"/><br /><sub><b>Vasiliy</b></sub>](https://github.com/Yeti-or)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Yeti-or "Code") | [<img src="https://avatars3.githubusercontent.com/u/2793951?v=4" width="100px;"/><br /><sub><b>Romain Lanz</b></sub>](https://slynova.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RomainLanz "Code") | [<img src="https://avatars2.githubusercontent.com/u/1233790?v=4" width="100px;"/><br /><sub><b>LiBe</b></sub>](http://libe.toile-libre.org)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=libetl "Code") | [<img src="https://avatars0.githubusercontent.com/u/5333019?v=4" width="100px;"/><br /><sub><b>Jeremy Bolding</b></sub>](http://thecodechef.github.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=thecodechef "Code") | [<img src="https://avatars1.githubusercontent.com/u/9664363?v=4" width="100px;"/><br /><sub><b>Evan Bacon</b></sub>](https://twitter.com/baconbrix)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=EvanBacon "Code") | [<img src="https://avatars3.githubusercontent.com/u/6643991?v=4" width="100px;"/><br /><sub><b>MichaΓ«l De Boey</b></sub>](https://michaeldeboey.be)<br />[πŸ“](#blog-MichaelDeBoey "Blogposts") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AMichaelDeBoey "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=MichaelDeBoey "Code") [πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=MichaelDeBoey "Documentation") [πŸš‡](#infra-MichaelDeBoey "Infrastructure (Hosting, Build-Tools, etc)") [πŸ”§](#tool-MichaelDeBoey "Tools") |
6464
| [<img src="https://avatars1.githubusercontent.com/u/14077091?v=4" width="100px;"/><br /><sub><b>gabeeden</b></sub>](https://github.com/gabeeden)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=gabeeden "Code") | [<img src="https://avatars0.githubusercontent.com/u/7698292?v=4" width="100px;"/><br /><sub><b>Tiffany White</b></sub>](https://tiffanywhite.dev)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=twhite96 "Code") | [<img src="https://avatars3.githubusercontent.com/u/32302360?v=4" width="100px;"/><br /><sub><b>James Bedford</b></sub>](http://www.dopest.tech)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=JABedford "Code") | [<img src="https://avatars0.githubusercontent.com/u/3314957?v=4" width="100px;"/><br /><sub><b>Scott</b></sub>](https://www.patreon.com/user?u=16255660)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=smolinari "Code") | [<img src="https://avatars1.githubusercontent.com/u/12200583?v=4" width="100px;"/><br /><sub><b>Dutiyesh Salunkhe</b></sub>](https://github.com/dutiyesh)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=dutiyesh "Code") | [<img src="https://avatars2.githubusercontent.com/u/13641726?v=4" width="100px;"/><br /><sub><b>Halit Ogunc</b></sub>](http://halit.dev)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=halitogunc "Code") | [<img src="https://avatars0.githubusercontent.com/u/22376783?v=4" width="100px;"/><br /><sub><b>Yash Joshi</b></sub>](https://github.com/jyash97)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=jyash97 "Code") |
65-
| [<img src="https://avatars3.githubusercontent.com/u/1769092?v=4" width="100px;"/><br /><sub><b>Yehor</b></sub>](https://github.com/batiskafff)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=batiskafff "Code") | [<img src="https://avatars2.githubusercontent.com/u/6972822?v=4" width="100px;"/><br /><sub><b>Jens de Rond</b></sub>](https://github.com/Jensderond)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AJensderond "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Jensderond "Code") | [<img src="https://avatars2.githubusercontent.com/u/2502947?v=4" width="100px;"/><br /><sub><b>Benjamin Schachter</b></sub>](http://benjaminschachter.com)<br />[πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=benschac "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/14234815?v=4" width="100px;"/><br /><sub><b>Rafael</b></sub>](https://github.com/RafaelKr)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3ARafaelKr "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RafaelKr "Code") | [<img src="https://avatars0.githubusercontent.com/u/19686979?v=4" width="100px;"/><br /><sub><b>baremetalfreak</b></sub>](https://github.com/baremetalfreak)<br />[πŸ’¬](#question-baremetalfreak "Answering Questions") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3Abaremetalfreak "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=baremetalfreak "Code") |
65+
| [<img src="https://avatars3.githubusercontent.com/u/1769092?v=4" width="100px;"/><br /><sub><b>Yehor</b></sub>](https://github.com/batiskafff)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=batiskafff "Code") | [<img src="https://avatars2.githubusercontent.com/u/6972822?v=4" width="100px;"/><br /><sub><b>Jens de Rond</b></sub>](https://github.com/Jensderond)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AJensderond "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Jensderond "Code") | [<img src="https://avatars2.githubusercontent.com/u/2502947?v=4" width="100px;"/><br /><sub><b>Benjamin Schachter</b></sub>](http://benjaminschachter.com)<br />[πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=benschac "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/14234815?v=4" width="100px;"/><br /><sub><b>Rafael</b></sub>](https://github.com/RafaelKr)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3ARafaelKr "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RafaelKr "Code") | [<img src="https://avatars0.githubusercontent.com/u/19686979?v=4" width="100px;"/><br /><sub><b>baremetalfreak</b></sub>](https://github.com/baremetalfreak)<br />[πŸ’¬](#question-baremetalfreak "Answering Questions") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3Abaremetalfreak "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=baremetalfreak "Code") | [<img src="https://avatars0.githubusercontent.com/u/13278577?v=4" width="100px;"/><br /><sub><b>Javed</b></sub>](https://github.com/JayBee007)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=JayBee007 "Code") |
6666

6767
<!-- ALL-CONTRIBUTORS-LIST:END -->
6868

β€Žpackages/app/src/app/pages/Sandbox/SearchDependencies/formatDownloads.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function formatDownloads(downloads: number) {
1+
export default function formatDownloads(downloads: number = 0) {
22
if (downloads >= 1000000) {
33
const x = Math.floor(downloads / 100000);
44
const millions = x / 10;

β€Žpackages/app/src/app/pages/Sandbox/SearchDependencies/formatDownloads.test.jsβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ describe('formatDownloads', () => {
1818
expect(formatDownloads(1100000)).toBe('1.1M');
1919
expect(formatDownloads(999999999)).toBe('999.9M');
2020
});
21+
22+
it('defaults to zero when an argument is not provided', () => {
23+
expect(formatDownloads()).toBe('0');
24+
});
2125
});

0 commit comments

Comments
Β (0)