# @kspcommunity/craft-file-reader

> [![GitHub stars](https://img.shields.io/github/stars/kspcommunity/Craft-File-Reader?style=social)](https://github.com/kspcommunity/Craft-File-Reader/stargazers) [![GitHub forks](https://img.shields.io/github/forks/kspcommunity/Craft-File-Reader?style=soc

Latest version **1.0.7** (published 2024-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kspcommunity/craft-file-reader
pnpm add @kspcommunity/craft-file-reader
yarn add @kspcommunity/craft-file-reader
bun add @kspcommunity/craft-file-reader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2024-03-31 |
| First published | 2024-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | g9militantsYT |
| Maintainers | dave9123, g9aerospace |
| Keywords | ksp, craft-file-reader |

## Links

- npm: https://www.npmjs.com/package/@kspcommunity/craft-file-reader
- Repository: https://github.com/kspcommunity/Craft-File-Reader
- Homepage: https://github.com/kspcommunity/Craft-File-Reader#readme
- Issues: https://github.com/kspcommunity/Craft-File-Reader/issues
- npm.io page: https://npm.io/package/@kspcommunity/craft-file-reader

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.6.8

## Recent versions

- 1.0.7 (latest) — 2024-03-31
- 1.0.6 — 2024-03-25
- 1.0.5 — 2024-03-25
- 1.0.4 — 2024-03-25
- 1.0.3 — 2024-03-25
- 1.0.2 — 2024-03-25
- 1.0.1 — 2024-03-25
- 1.0.0 — 2024-03-25

## README

# Craft File Reader

[![GitHub stars](https://img.shields.io/github/stars/kspcommunity/Craft-File-Reader?style=social)](https://github.com/kspcommunity/Craft-File-Reader/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/kspcommunity/Craft-File-Reader?style=social)](https://github.com/kspcommunity/Craft-File-Reader/network)
[![GitHub watchers](https://img.shields.io/github/watchers/kspcommunity/Craft-File-Reader?style=social)](https://github.com/kspcommunity/Craft-File-Reader)
[![GitHub contributors](https://img.shields.io/github/contributors/kspcommunity/Craft-File-Reader)](https://github.com/kspcommunity/Craft-File-Reader/graphs/contributors)

Welcome to Craft File Reader! This repository is part of the KSP Community organization on GitHub.

## Overview

Craft File Reader is a tool for reading craft files used in the game Kerbal Space Program (KSP). It allows you to interact with craft files and extract useful information from them.

## Installation

You can install Craft File Reader via npm:

```bash
npm install @kspcommunity/craft-file-reader
```

## Usage

The `processCraftFile` function provided by Craft File Reader allows you to analyze Craft files. Here's how you can use it:

1. Import the function into your Node.js script:

    ```javascript
    const processCraftFile = require('@kspcommunity/craft-file-reader');
    ```

2. Call the function with the path to the Craft file as an argument:

    ```javascript
    const craftFilePath = '/path/to/your/craft_file.craft';
    const result = await processCraftFile(craftFilePath);
    ```

    The `processCraftFile` function returns a Promise, so it's recommended to use `await` or `.then()` to handle the result.

3. Handle the result:

    If successful, the function returns an object containing details about the craft and its parts. If any error occurs during the process, it returns `null`.

    ```javascript
    if (result) {
        console.log('Craft Details:', result.craftDetails);
        console.log('Parts Details:', result.partsDetails);
    } else {
        console.error('Error processing the craft file.');
    }
    ```

## Interact with Mod Parts Data

Craft File Reader can be used to interact with the data provided by [Mod Parts Lister](https://github.com/kspcommunity/Mod-Parts-Lister). Use both tools together for enhanced functionality.

## Acknowledgements

We would like to express our gratitude to Curseforge and Spacedock for their invaluable resources and support, without which this project would not have been possible.

## Disclaimer

KSP Community is an independent entity and is not affiliated with Curseforge, Spacedock, or Intercept Games.

## Additional Information

For more information about KSP Community, please visit our [main website](https://kspcommunity.com). Our Privacy Policy and Terms of Service are available on our website.

If you need further assistance or have any questions, feel free to reach out to us at [info@kspcommunity.com](mailto:info@kspcommunity.com).

Join our Discord server: [https://discord.gg/YCZ5YhQQ8A](https://discord.gg/YCZ5YhQQ8A)

---
_Source: https://npm.io/package/@kspcommunity/craft-file-reader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
