# nksave

> btd6 Profile.save thingy

Latest version **1.0.0** (published 2021-12-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install nksave
pnpm add nksave
yarn add nksave
bun add nksave
```

## 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.0 |
| Published | 2021-12-22 |
| First published | 2021-12-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | hemidemisemipresent |
| Maintainers | hemidemisemipresent |
| Keywords | btd6 |

## Links

- npm: https://www.npmjs.com/package/nksave
- Repository: https://github.com/hemisemidemipresent/monke
- Homepage: https://github.com/hemisemidemipresent/monke#readme
- Issues: https://github.com/hemisemidemipresent/monke/issues
- npm.io page: https://npm.io/package/nksave

## Dependencies (1)

- [aes-js](https://npm.io/package/aes-js.md) ^3.1.2

## Recent versions

- 1.0.0 (latest) — 2021-12-22

## README

# NKSave

A Profile.save decryptor for Bloons td 6 (btd6)

Heavily inspired by [averysumener's c++ Profile.save thingy](https://github.com/averysumner/monke/) and [BowDown097](https://github.com/BowDown097)'s provided c# code. This would not have been possible without them.

# usage

## unpacking

just some standard stuff, did something a bit different using promisify in this example

```js
const nksave = require('nksave');
const fs = require('fs');

const { promisify } = require('util');
const readFile = promisify(fs.readFile);

async function main() {
    let bytes = await readFile('./path/to/Profile.save', null);
    let json = nksave.unpack(bytes);
    // log it, write to file, etc
}
main();
```

## packing

similar to above example

```js
const nksave = require('nksave');
const fs = require('fs');

const { promisify } = require('util');
const readFile = promisify(fs.readFile);
const writeFile = promisify(fs.readFile);

async function main() {
    let bytes = await readFile('./path/to/editedfile.json', null);
    let encoded = nksave.pack(bytes);
    await writeFile('./path/to/Profile.save', encoded);
}
main();
```

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