2.0.7 • Published 1 year ago

modrinthjs v2.0.7

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
1 year ago

A type safe Modrinth implementation.

šŸ  Homepage

šŸ“˜ Documentation

Install

npm install

Basic Usage

Author

šŸ‘¤ refactoring

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Example

import { ProjectsService } from 'modrinthjs'

async function main() {
    const project = await (await ProjectsService.searchProjects("Fabric API")).hits[0]

    console.log("Title: " + project.title)
    console.log("Description: " + project.description)
    console.log("Categories: " + project.categories?.map((cat) => cat.toUpperCase()))
    console.log("Downloads: " + format(project.downloads))
    console.log("Followers: " + format(project.follows))
}

function format(num) {
    return Intl.NumberFormat('en-US', {
        notation: "compact",
        maximumFractionDigits: 1
    }).format(num);
}

main()
[~] $ node example.js
Title: Fabric API
Description: Lightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.
Categories: FABRIC,LIBRARY
Downloads: 5.8M
Followers: 7.8K
[~] $

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2024 refactoring. This project is GNU GPL v3.0 licensed.


This README was generated with ā¤ļø by readme-md-generator

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago