3.0.0 • Published 5 years ago

libsodium-type-generator v3.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

libsodium-type-generator Dependabot Status

This is a TypeScript declaration file generator for libsodium.js 0.7.3.

The types for version 0.7.3 were merged to DefinitelyTyped and published on npm. 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

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
  });
3.0.0

5 years ago

2.2.6

5 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.2

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.10

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago