Skip to content

Commit

Permalink
Improving readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
ianacaburian committed Oct 3, 2024
1 parent 314e48e commit 8602353
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

Ports juce_KeyGeneration::generateKeyFile() to node.

# Installation
![master build status](https://github.com/ianacaburian/generate-key-file/actions/workflows/build.yml/badge.svg?branch=master)

## Installation

```
npm i @ianacaburian/generate-key-file
```

# Usage
## Usage

### `generateKeyFile(params: GenerateKeyFileParams, date: Date = new Date()) => string`
- `generateKeyFile(params: GenerateKeyFileParams, date: Date = new Date()) => string`

```
import { generateKeyFile } from '@ianacaburian/generate-key-file'
Expand All @@ -24,6 +26,10 @@ const keyFileContent = generateKeyFile({
})
```

- Returns the <key> string value to be used in the XML response for decryption
by the client.
- Throws ZodError for invalid params -- see
[zod](https://github.com/colinhacks/zod).
- From juce_KeyFileGeneration.h:

```
Expand All @@ -45,12 +51,7 @@ const keyFileContent = generateKeyFile({
*/
```

- Returns the <key> string value to be used in the XML response for decryption
by the client.
- Throws ZodError for invalid params -- see
[zod](https://github.com/colinhacks/zod).

### `generateExpiringKeyFile(params: GenerateExpiringKeyFileParams, date: Date = new Date()) => string`
- `generateExpiringKeyFile(params: GenerateExpiringKeyFileParams, date: Date = new Date()) => string`

```
import { generateExpiringKeyFile } from '@ianacaburian/generate-key-file'
Expand All @@ -66,6 +67,10 @@ const expiringKeyFileContent = generateExpiringKeyFile({
})
```

- Returns the <key> string value to be used in the XML response for decryption
by the client.
- Throws ZodError for invalid params -- see
[zod](https://github.com/colinhacks/zod).
- From juce_KeyFileGeneration.h:

```
Expand All @@ -80,20 +85,15 @@ const expiringKeyFileContent = generateExpiringKeyFile({
*/
```

- Returns the <key> string value to be used in the XML response for decryption
by the client.
- Throws ZodError for invalid params -- see
[zod](https://github.com/colinhacks/zod).

# Development
## Development

```
npm run clean # Clean dist and test builds (inc test bins).
npm run lint # Lint the src dir.
npm run build # Lint, install tests, and build package.
```

## Testing
### Testing

```
npm run test # Start vitest to run all tests.
Expand Down

0 comments on commit 8602353

Please sign in to comment.