New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-curseforge

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-curseforge

A NodeJS package for the curseforge api

latest
Source
npmnpm
Version
1.3.3
Version published
Maintainers
1
Created
Source

node-curseforge npm bundle size npm

A zero-dependencies NodeJS package to interact with the curseforge core api. Requires a CFCore authentication token (get one from console.curseforge.com/#/api-keys and yes you need to use a google account to login (sadly)).

view on npm: node-curseforge

Installation

To install this package you can use either yarn or npm.

yarn add node-curseforge

or

npm install node-curseforge

How-To Use

You can use this package mostly in two ways. Either you fetch a game first and interact over the game mostly with the api or you use the root class and give the required ids or objects directly.

Using the Curseforge class


const {Curseforge} = require("node-curseforge");

let cf = new Curseforge(cf_token);

let mc = cf.get_game("minecraft");

cf.search_mods(mc).then((mods) => {
    for(let mod of mods){
        cf.get_description(mod).then((desc) => {
            console.log(desc);
        });
    }
});

Using the Curseforge objects

Using the methods on the objects themselves actually calls them using the curseforge instance and directly fills in the ids.


const {Curseforge} = require("node-curseforge")

let cf = new Curseforge(cf_token);

let mc = cf.get_game("minecraft");

mc.search_mods().then((mods) => {
    for(let mod of mods){
        mod.get_description().then((desc) => {
            console.log(desc);
        })
    }
})

Typescript Support

The entire package is written in typescript and compiled to Javascript with an additional declaration file! You can therefore use this file with regular Javascript or with regular Typescript.

Documentation

You can find the (wip) documentation at mondanzo.github.io/node-curseforge. Most of the code is very self-explanatory though and overall also 1:1 identical with the CFCore Docs.

Keywords

curseforge

FAQs

Package last updated on 12 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts