> For the complete documentation index, see [llms.txt](https://fozan.gitbook.io/level/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fozan.gitbook.io/level/installation-and-setup.md).

# Installation and Setup

Installation

You can install `level-algorithm` via npm (Node Package Manager). Make sure you have Node.js installed on your machine before proceeding.

```bash
npm install level-algorithm
```

#### Usage

Once installed, you can use `@mr_fozan/level` in your Node.js applications as follows:

```javascript
const LevelAlgorithm = require('level-algorithm');

// Example configuration
const levelAlgorithm = new LevelAlgorithm({
  baseExperience: 100,
  experienceMultiplier: 1.5
});

// Use levelAlgorithm methods
const currentExperience = 350;
const currentLevel = levelAlgorithm.calculateLevel({
  experience: currentExperience,
  baseExperience: levelAlgorithm.baseExperience,
  experienceMultiplier: levelAlgorithm.experienceMultiplier
});
console.log(`Current level: ${currentLevel}`);
```

#### Configuration

* **baseExperience**: The base amount of experience points required for level 1.
* **experienceMultiplier**: The multiplier applied to base experience points for each subsequent level.

#### Additional Notes

* Ensure that you handle asynchronous operations appropriately if any of your calculations involve promises or async functions.
* Refer to the documentation for detailed information on each method and their parameters.
