Download NetflixClone/src/utils/sorting.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 194 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/NetflixClone/src/utils/sorting.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/NetflixClone/src/utils/sorting.js
-
curl -L -o sorting.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/NetflixClone/src/utils/sorting.js
194 Bytes
| export const sortVideosByPopularity = (a, b) => { | |
| if (a.popularity > b.popularity) { | |
| return -1; | |
| } | |
| if (a.popularity < b.popularity) { | |
| return 1; | |
| } | |
| return 0; | |
| } | |