# libsodium-type-generator

> This is a TypeScript declaration file generator for [`libsodium.js`](https://github.com/jedisct1/libsodium.js) 0.7.3.

Latest version **3.0.0** (published 2019-01-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install libsodium-type-generator
pnpm add libsodium-type-generator
yarn add libsodium-type-generator
bun add libsodium-type-generator
```

Provides the command `libsodium-type-generator`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-01-27 |
| First published | 2018-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 42.6 KB |
| Known vulnerabilities | 0 (+10 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Florian Keller |
| Maintainers | ffflorian |

## Links

- npm: https://www.npmjs.com/package/libsodium-type-generator
- Repository: https://github.com/ffflorian/libsodium-type-generator
- Homepage: https://github.com/ffflorian/libsodium-type-generator#readme
- Issues: https://github.com/ffflorian/libsodium-type-generator/issues
- npm.io page: https://npm.io/package/libsodium-type-generator

## Dependencies (6)

- [fs-extra](https://npm.io/package/fs-extra.md) 7.0.1
- [commander](https://npm.io/package/commander.md) 2.19.0
- [decompress](https://npm.io/package/decompress.md) 4.2.0
- [single-line-log](https://npm.io/package/single-line-log.md) 1.1.2
- [decompress-unzip](https://npm.io/package/decompress-unzip.md) 4.0.1
- [follow-redirects](https://npm.io/package/follow-redirects.md) 1.6.1

## Recent versions

- 3.0.0 (latest) — 2019-01-27
- 2.2.6 — 2018-11-26
- 2.2.5 — 2018-06-05
- 2.2.4 — 2018-05-24
- 2.2.2 — 2018-04-03
- 2.0.4 — 2018-02-22
- 2.0.3 — 2018-02-22
- 2.0.2 — 2018-02-22
- 2.0.1 — 2018-02-22
- 2.0.0 — 2018-02-22
- 1.0.10 — 2018-02-19
- 1.0.8 — 2018-02-18
- 1.0.7 — 2018-02-18
- 1.0.6 — 2018-02-18
- 1.0.5 — 2018-02-15
- … 3 more at https://npm.io/package/libsodium-type-generator/versions

## README

# libsodium-type-generator [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=ffflorian/libsodium-type-generator)](https://dependabot.com)

This is a TypeScript declaration file generator for [`libsodium.js`](https://github.com/jedisct1/libsodium.js) 0.7.3.

The types for version 0.7.3 were merged to DefinitelyTyped and [published on npm](https://www.npmjs.com/package/@types/libsodium-wrappers). Other versions are not supported (yet).


## Installation
```
yarn global add libsodium-type-generator
```
or
```
npm install -g libsodium-type-generator
```

## Run
```
Usage: libsodium-type-generator [options]

Options:

  -V, --version               output the version number
  -o, --output <file|dir>     Specify the output file or directory (required)
  -b, --base <path>           Specify the libsodium.js base path
  -s, --sumo                  Generate types for the sumo version
  -h, --help                  output usage information
```

### Example:
```
curl -L https://github.com/jedisct1/libsodium.js/archive/master.tar.gz -o /path/to/libsodium.tar.gz
tar -C /path/to/ -zxvf /path/to/libsodium.tar.gz
libsodium-type-generator -o /path/to/libsodium.d.ts -b /path/to/libsodium.js-master/
```
or
```
libsodium-type-generator -o /path/to/libsodium.d.ts
# source will be downloaded from GitHub and saved to a temp folder
```


## Include in your project
```ts
import TypeGenerator from 'libsodium-type-generator';

const generator = new TypeGenerator('/path/to/outputfile');

generator
  .generate()
  .then(outputFile => {
    // success!
    console.log(outputFile); // /path/to/outputfile
  })
  .catch(error => {
    // handle error
  });
```

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