https://github.com/streamich/content-ranking
Formulas for content ranking
https://github.com/streamich/content-ranking
Last synced: 11 months ago
JSON representation
Formulas for content ranking
- Host: GitHub
- URL: https://github.com/streamich/content-ranking
- Owner: streamich
- License: unlicense
- Created: 2019-04-15T18:43:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:23:14.000Z (over 2 years ago)
- Last Synced: 2025-08-09T03:37:46.837Z (11 months ago)
- Language: TypeScript
- Size: 2.29 MB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# content-ranking
Content ranking formulas.
- `hotReddit` — Reddit's *"hot"* content ranking formula.
- `hotYCombinator` — YCombinator's *"hot"* content ranking formula.
- `bestReddit` — Reddit's *"best"* content ranking formula.
- `controversialReddit` — Reddit's *"controversial"* content ranking formula.
## Usage
```shell
npm i content-ranking
```
then
```js
import {hotReddit, hotYCombinator, bestReddit, controversialReddit} from 'content-ranking';
hotReddit(ups, dows, createdTimeInMilliseconds);
hotYCombinator(ups, createdTimeInMilliseconds);
bestReddit(ups, dows);
controversialReddit(ups, dows);
```
## License
[Unlicense](LICENSE) — public domain.