open-index/open-npm huggingface dataset:
npm package: @ssut/nestjs-throttler-storage-redis
Description: Redis storage provider for the @nestjs/throttler package
Author: Suhun Han
Latest version: 1.0.0

# NestJS Throttler Redis Storage

![Tests status](https://img.shields.io/github/workflow/status/kkoomen/nestjs-throttler-storage-redis/Tests/master)

Redis storage provider for the [@nestjs/throttler](https://github.com/nestjs/throttler) package.

# Installation

### Yarn

- `yarn add @ssut/nestjs-throttler-storage-redis ioredis`

### NPM

- `npm install --save @ssut/nestjs-throttler-storage-redis ioredis`

# Usage

```ts
import { ThrottlerModule } from '';
import { ThrottlerStorageRedisService } from '-storage-redis';

@Module({
  imports: [
    ThrottlerModule.forRoot({
      ttl: 60,
      limit: 5,
      storage: new ThrottlerStorageRedisService(),
    }),
  ],
})
export class AppModule {}
```

```ts
import { ThrottlerModule } from '';
import { ThrottlerStorageRedisService } from '-storage-redis';

@Module({
  imports: [
    ThrottlerModule.forRootAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: (config: ConfigService) => ({
        ttl: config.get('THROTTLE_TTL'),
        limit: config.get('THROTTLE_LIMIT'),
        storage: new ThrottlerStorageRedisService(),
      }),
    }),
  ],
})
export class AppModule {}
```

# Issues

Bugs and features related to the redis implementation are welcome in this
repository.

# License

NestJS Throttler Redis Storage is licensed under the MIT license.
npm package: @ssv-embedded/ssb-blake2s
Description: SSV/SSB Blake2s
Author: SSV Software Systems GmbH
Latest version: 1.0.0

# @ssv-embedded/ssb-blake2s

This module checks HMAC of assembled SSV/SSB packages with Blake2s hash function.

## API

Create instance
```js
const createBlake2sCheck = require('@ssv-embedded/ssb-blake2s');
const blake2s = createBlake2sCheck(opts);
```

`opts` is an object for providing optional dependencies:
- `hmacLen`: HMAC length in bytes from type `Number`. Default: `6`.
- `key`: HMAC key from type `Buffer`.

Check packages
```js
const payload = blake2s.handle(packet);
```

`packet`: SSV/SSB packet from type `Buffer`

Return: Data payload of handled packet of type `Buffer` if the HMAC is valid. It will throw en `Error` if the HMAC is invalid.


Example:
```js
const createBlake2sCheck = require('@ssv-embedded/ssb-blake2s');

const hmacLen = 6;
const key = Buffer.from('SuperSecretKey');
const blake2s = createBlake2sCheck({hmacLen, key});

//                          <---HEADER----><---------------PAYLOAD-----------><---HMAC--->
//                          <-------------protected by HMAC------------------>
const packet = Buffer.from('5900401048020004847b14924104885464c742048c00163c42dfb2df1187d4', 'hex');

try {
  const payload = blake2s.handle(packet);
  console.log(payload.toString('hex'));
} catch (err) {
  console.log(err)
}
```
npm package: @ssv-embedded/ssb-decoder
Description: SSV/SSB Decoder
Author: SSV Software Systems GmbH
Latest version: 1.3.0

# @ssv-embedded/ssb-decoder

This module decodes the sensor payload.

## API

### Create instance
- Use default decoder
  ```js
  const {createDecoder} = require('@ssv-embedded/ssb-decoder');
  const decoder = createDecoder();
  ```
  or
  ```js
  const {createDecoder, defaultDecodeItem} = require('@ssv-embedded/ssb-decoder');
  const decoder = createDecoder({decodeItem: defaultDecodeItem});
  ```
- Use own decoder, example:
  ```js
  const {createDecoder, defaultDecodeItem} = require('@ssv-embedded/ssb-decoder');
  function myDecoder (type, data) {
    // decode my stuff
    if (type === 0x80 && data.length === 4)
      return {'mag-x': data.readFloatLE()};
    if (type === 0x81 && data.length === 4)
      return {'mag-y': data.readFloatLE()};
    if (type === 0x82 && data.length === 4)
      return {'mag-z': data.readFloatLE()};

    // decode default staff
    return defaultDecodeItem(type, data);
  }
  const decoder = createDecoder({decodeItem: myDecoder});
  ```

Parameter of **createDecoder()** is optional and can provide a object with initial settings:
- `decodeItem`: Item decoder callback function with two parameters, required.
    * Input parameter:
        * `type`: item type to be decoded as `Number`
        * `data`: item data to be decoded as `Buffer`
    * Output should be an `Object` with one key and value, e.g. `{'temp':22.3}`

### Check payload
```js
const decoded = decoder.decode(payload);
```

`payload`: SSV/SSB payload from type `Buffer`

Return: `Object` with decoded items as raw data and user decoded data from `decodeItem` callback.
Example output:
```json
{
  raw: {
    '80': <Buffer 66 66 66 be>,
    '81': <Buffer 47 c1 bd>,
    '82': <Buffer 66 66 66 be>
  },
  data: {
    'mag-x': -0.22499999403953552,
    'mag-z': -0.22499999403953552,
  }
}
```
npm package: @ssv/aspnet-prerendering
Description: aspnet SPA Services Node prerendering ESM compatible.
Author: Stephen Lautier
Latest version: 1.0.1-dev.12

[projectUri]: https://github.com/sketch7/aspnet-prerendering
[changeLog]: ./CHANGELOG.md
[developmentWorkflowWiki]: ./docs/DEVELOPMENT-WORKFLOW.md
[apiWiki]: ./docs/API.md

[npm]: https://www.npmjs.com/package/@ssv/aspnet-prerendering

# @ssv/aspnet-prerendering
[![CI](https://github.com/sketch7/aspnet-prerendering/actions/workflows/ci.yml/badge.svg)](https://github.com/sketch7/aspnet-prerendering/actions/workflows/ci.yml)
[![npm version](https://badge.fury.io/js/%40ssv%2Faspnet-prerendering.svg)](https://badge.fury.io/js/%40ssv%2Faspnet-prerendering)

Port of [aspnet-prerendering](https://github.com/aspnet/JavaScriptServices/blob/master/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json) which supports ESM.

This allows using vite/esbuild angular (was tested only with angular - `@angular-devkit/build-angular:application`)


**Quick links**

[Change logs][changeLog] | [Project Repository][projectUri]

## Installation

Get library via [npm]

```bash
npm install @ssv/aspnet-prerendering
```


## Usage

```ts
import { renderModule } from "@angular/platform-server";
import { APP_BASE_HREF } from "@angular/common";
// import { createServerRenderer } from "aspnet-prerendering";
import { createServerRenderer } from "@ssv/aspnet-prerendering";

import { AppServerModule } from "./app/app.server.module";

interface TransferData {
  originalHtml: string;
  startupContext: StartupContext; // custom
  request: any;
}

export default createServerRenderer(params => {
  const { startupContext, originalHtml } = params.data as TransferData;
  const extraProviders = [
    { provide: APP_BASE_HREF, useValue: startupContext.virtualPath },
    { provide: "BASE_URL", useValue: params.origin + params.baseUrl },
  ];

  const options = {
    document: originalHtml,
    url: params.url,
    extraProviders
  };

  const renderPromise = renderModule(AppServerModule, options);

  return renderPromise.then(html => ({ html }));
});
```


### Contributions

Check out the [development guide][developmentWorkflowWiki].
npm package: @ssv/core
Description: Core utilities, components and services for browser and node
Author: Stephen Lautier
Latest version: 0.6.1

[projectUri]: https://github.com/sketch7/ssv-core
[projectGit]: https://github.com/sketch7/ssv-core.git
[changeLog]: ./CHANGELOG.md
[releaseWorkflowWiki]: ./docs/RELEASE-WORKFLOW.md

[npm]: https://www.npmjs.com

# @ssv/core
[![CircleCI](https://circleci.com/gh/sketch7/ssv-core.svg?style=shield)](https://circleci.com/gh/sketch7/ssv-core)
[![npm version](https://badge.fury.io/js/%40ssv%2Fcore.svg)](https://badge.fury.io/js/%40ssv%2Fcore)

Core utilities, components and services for browser and node.

**Quick links**

[Change logs][changeLog] | [Project Repository][projectUri]

## Installation

Get library via [npm]

```bash
npm install @ssv/core --save
```

## Usage

```ts
import { string } from "@ssv/core";

let name = string.interpolate("name=:name", { name: "Chiko" });
```


## Getting Started

### Setup Machine for Development
Install/setup the following:

- NodeJS v10+
- Visual Studio Code or similar code editor
- TypeScript 3.1+
- Git + SourceTree, SmartGit or similar (optional)
- Ensure to install **global NPM modules** using the following:


```bash
npm install -g git gulp devtool
```


### Project Setup
The following process need to be executed in order to get started.

```bash
npm install
```


### Building the code

```bash
npm run build
```

### Running the tests

```bash
npm test
```

#### Watch
Handles compiling of changes.

```bash
npm start
```


#### Running Continuous Tests
Spawns test runner and keep watching for changes.

```bash
npm run tdd
```


### Preparation for Release

- Update changelogs
- bump version


Check out the [release workflow guide][releaseWorkflowWiki] in order to guide you creating a release and publishing it.
npm package: @ssv/ng2-core
Description: ssv core angular2 components, utilities and services
Author: Stephen Lautier
Latest version: 0.2.0

[projectUri]: https://github.com/sketch7/ssv-ng2-core
[projectGit]: https://github.com/sketch7/ssv-ng2-core.git
[changeLog]: ./doc/CHANGELOG.md

[contribWiki]: ./doc/CONTRIBUTION.md
[releaseWorkflowWiki]: ./doc/RELEASE-WORKFLOW.md

[npm]: https://www.npmjs.com
[jspm]: http://jspm.io
[typings]: https://github.com/typings/typings

# @ssv/ng2-core
[![Build status](https://ci.appveyor.com/api/projects/status/2e0an5hvxtfs08mf?svg=true)](https://ci.appveyor.com/project/chiko/ssv-ng2-core)
[![Build status](https://ci.appveyor.com/api/projects/status/2e0an5hvxtfs08mf/branch/master?svg=true)](https://ci.appveyor.com/project/chiko/ssv-ng2-core/branch/master)
[![bitHound Overall Score](https://www.bithound.io/github/sketch7/ssv-ng2-core/badges/score.svg)](https://www.bithound.io/github/sketch7/ssv-ng2-core)
[![npm version](https://badge.fury.io/js/%40ssv%2Fng2-core.svg)](https://badge.fury.io/js/%40ssv%2Fng2-core)

Core utilities and services for angular2, such as logger.

In order to contribute please read the [Contribution guidelines][contribWiki].

**Quick links**

[Change logs][changeLog] | [Project Repository][projectUri] | [Contribution guidelines][contribWiki]

# Installation

Get library via [npm]
```bash
npm install @ssv/ng2-core --save
```

TypeScript Typings via [typings]
```bash
typings install github:sketch7/ssv-ng2-core --save
```

# Usage

## Register module

```ts
import {CoreModule} from "@ssv/ng2-core";

@NgModule({
    imports: [
        CoreModule
    ],
    declarations: [
        AppComponent
    ]
}
export class AppModule {
}
```

# Features
 - [Logger](./src/logging/README.md)


# Getting Started

## Setup Machine for Development
Install/setup the following:

- NodeJS v6+
- Visual Studio Code or similar code editor
- TypeScript 2.0+
- Git + SourceTree, SmartGit or similar (optional)
- Ensure to install **global NPM modules** using the following:


```bash
npm install -g git gulp typings karma-cli
```


### Cloning Repo

- Run `git clone https://github.com/sketch7/ssv-ng2-core.git`
- Switch to `develop` branch


## Project Setup
The following process need to be executed in order to get started.

```bash
npm install
```


## Building the code

```
gulp build
```
In order to view all other tasks invoke `gulp` or check the gulp tasks directly.

## Running the tests

```
gulp test
```


## Development utils

### Trigger gulp watch
Handles compiling of changes.
```
gulp watch
```


### Running Continuous Tests
Spawns test runner and keep watching for changes.
```
gulp tdd
```


## Preparation for Release

```
gulp prepare-release --bump major|minor|patch|prerelease (default: patch)
```
Check out the [release workflow guide][releaseWorkflowWiki] in order to guide you creating a release and publishing it.
npm package: @ssv/ngx.tilt
Description: Angular Wrapper for Vanilla Tilt a smooth 3D tilt.
Author: Kurt Aquilina
Latest version: 0.1.2

[projecturi]: https://github.com/ssv/ngx.tilt
[projectgit]: https://github.com/ssv/ngx.tilt.git
[changelog]: ./CHANGELOG.md
[releaseworkflowwiki]: ./docs/RELEASE-WORKFLOW.md

[npm]: https://www.npmjs.com

# @ssv/ngx.tilt
[![CircleCI](https://circleci.com/gh/ssv/ngx-tilt)](https://circleci.com/gh/ssv/ngx.tilt)

Angular Wrapper for [Vanilla Tilt](https://github.com/micku7zu/vanilla-tilt.js/) a smooth 3D tilt.

**Quick links**

[Change logs][changeLog] | [Project Repository][projectUri]

# Installation

Get library via [npm]

```bash
npm install vanilla-tilt @types/vanilla-tilt @ssv/ngx.tilt
```

# Usage

## Register module

```ts
import { TiltModule } from "@ssv/ngx.tilt";

@NgModule({
  imports: [
    TiltModule
  ]
}
export class AppModule {
}
```

```html
<!-- simple -->
<div ssvTilt>
  im tilt
</div>
```

```ts
const tiltOptions: TiltOptions = {
  glare: true,
  ["max-glare"]: 0.5
}
```

```html
<!-- with options -->
<div ssvTilt [tiltOptions]="tiltOptions">
  show only when large
</div>
```

#### Cloning Repo

* Run `git clone https://github.com/ssv/ngx.tilt`

### Project Setup

The following process need to be executed in order to get started.

```bash
npm install
```

### Building the code

```bash
npm run build
```

### Running the tests

```bash
npm test
```

### Development utils

#### Watch

Builds on changes.

```bash
npm start
```

#### Running Continuous Tests

Spawns test runner and keep watching for changes.

```bash
npm run tdd
```

### Preparation for Release

```bash
npm run prepare-release -- --bump major|minor|patch|prerelease (default: patch)
```

Check out the [release workflow guide][releaseworkflowwiki] in order to guide you creating a release and publishing it.
npm package: @ssvg/core
Description: Core SSVG compiler: compileSSVG(xml, options) -> structured SVG result.
Latest version: 0.0.15

# @ssvg/core

Core sSVG compiler for parsing sSVG files into SVG and HTML files with SVG blocks.

For more information about sSVG, how it works, and why, visit [SimpleSVG.dev](https://simplesvg.dev).


This package exports two main functions (asynchronous in Node, synchronous in browser):
- `compileSSVG`: Compiles <code>.ssvg</code> files to <code>.svg</code>
- `compileHTML`: Compiles <code>&lt;ssvg&gt;</code> blocks within HTML to valid HTML with <code>&lt;svg&gt;</code> blocks


## Installation

```bash
npm install @ssvg/core
```

## Usage

### Node (ESM/CommonJS)

```javascript
import { compileSSVG, compileHTML } from '@ssvg/core';

const svgResult = await compileSSVG(ssvgContent, options);
const htmlResult = await compileHTML(htmlContent, options);
```


### Browser Build

A dedicated browser build is available via:

```javascript
import { compileSSVG, compileHTML } from '@ssvg/core/browser';

const svgResult = compileSSVG(ssvgContent, options);   // Synchronous API
const htmlResult = compileHTML(htmlContent, options);  // Synchronous API
```

- The browser build exposes the synchronous `compileSSVG` **and** `compileHTML` functions.
- Both return the same `CompileResult` structure as in Node, but synchronously.
- Imports are supported only from local files (using XMLHttpRequest). Remote URLs and Node.js modules (fs, node-fetch) are NOT supported.
- Use the `baseDir` option to set the base path for local imports (relative to site root).

### Exports

The package uses conditional exports in `package.json`:

```json
"exports": {
  ".": {
    "types": "./dist/index.d.ts",
    "import": "./dist/index.js",
    "require": "./dist/index.cjs"
  },
  "./browser": {
    "import": "./dist/browser.js",
    "default": "./dist/browser.js"
  }
}
```

## API

### Parameters

- `ssvgContent` (string): The sSVG markup as a string.
- `htmlContent` (string): The HTML markup containing `<ssvg>` blocks as a string.
- `options` (optional object):
  - `baseDir` (string): Base directory for resolving relative imports. Defaults to `process.cwd()` (Node) or `''` (browser).
  - `prettyDecimals` (number | null): Number of decimal places for numeric values in output. If `null`, no rounding is applied.

### Return Value

Both functions return a `Promise<CompileResult>` (Node) or `CompileResult` (browser) where `CompileResult` is:

```typescript
{
  ok: boolean;           // true if compilation succeeded
  body?: string;         // The compiled SVG or HTML string on success
  error?: {              // Error details if ok is false
    message: string;
    code?: string;
    details?: any;
  };
  warnings?: string[];   // Array of warning messages
  stats?: {              // Compilation statistics
    durationMs?: number;
  };
  configUsed?: {         // The options that were actually used
    prettyDecimals?: number | null;
    baseDir?: string;
  };
}
```

## License

MIT
npm package: @ssvg/react
Description: React component for compiling SSVG markup to SVG synchronously on the fly.
Author: Your Name
Latest version: 0.0.5

# @ssvg/react

React component for compiling SSVG markup to SVG **synchronously** on the fly.

## Usage

```jsx
import { SSVG } from '@ssvg/react';

export default function Demo({ count }) {
  return (
    <SSVG>
      <loop from="1" to={count}>
        <circle cx="calc(loop() * 30)" cy="50" r="10" fill="blue" />
      </loop>
    </SSVG>
  );
}
```

## Features
- Write SSVG markup as JSX in React
- Synchronous compilation to SVG
- Supports dynamic props, state, and reactivity
- No async logic or useEffect required
- Forwards additional props to wrapper div
- Optionally accepts `options` prop for compileSSVG

## API

### `<SSVG options={...} {...otherProps}>...</SSVG>`
- `options`: Optional options for compileSSVG
- Other props are forwarded to the wrapper `<div>`


## More Info & Full Documentation
For guides, advanced usage, and full API docs:
[SimpleSVG.dev](https://SimpleSVG.dev)

## License
MIT
npm package: @ssvg/vite-plugin
Description: Vite plugin SSVG integration.
Author: Amit Sheen
Latest version: 0.0.2

# @ssvg/vite-plugin

[![npm version](https://badge.fury.io/js/%40ssvg%2Fvite-plugin.svg)](https://badge.fury.io/js/%40ssvg%2Fvite-plugin)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Vite plugin for seamless integration of [sSVG](https://simplesvg.dev) files into your development workflow. Automatically compiles `.ssvg` files to `.svg` during development and processes inline `<ssvg>` blocks in HTML.

> **Note:** If you're working in a React project, you may want to use our React component instead: [@ssvg/react](https://www.npmjs.com/package/@ssvg/react)

## Installation

```bash
npm install --save-dev @ssvg/vite-plugin
```

Requires Vite 4 or 5. The plugin includes `@ssvg/core` as a dependency.

> **Compatibility Note:**
> This plugin now supports Vite versions 4, 5, 6, and 7. If you use an even newer version, please report any issues.

## Usage

### Basic Setup

Add the plugin to your `vite.config.ts`:

```typescript
import { defineConfig } from 'vite';
import ssvgPlugin from '@ssvg/vite-plugin';

export default defineConfig({
  plugins: [
    ssvgPlugin(),
  ],
});
```

### Options

```typescript
ssvgPlugin({
  skipUnderscoreFiles: true, // Default: true - skips files starting with '_'
});
```

### How It Works

- **Development Mode**: Watches for `.ssvg` files and compiles them to `.svg` on save. Also transforms `<ssvg>` tags in HTML to `<svg>`.
- **Build Mode**: No transformation of `.ssvg` files (they remain as-is), but `<ssvg>` blocks in HTML are transformed to `<svg>`. Focused on dev workflow for file watching.

### File Structure

Place `.ssvg` files anywhere in your project. The plugin will create corresponding `.svg` files:

```
project/
├── src/
│   ├── logo.ssvg    # → compiles to logo.svg
│   └── index.html   # can contain <ssvg> blocks
└── vite.config.ts
```

### Inline Usage

Use `<ssvg>` tags in your HTML for inline graphics:

```html
<ssvg>
  <!-- your ssvg content here -->
</ssvg>
```

## Troubleshooting

### Plugin Not Loading
- Ensure Vite config is correct and plugin is added to plugins array
- Check for import errors in console

### Files Not Compiling
- Verify you're running `npm run dev` (not build)
- Check file paths and extensions
- Ensure `@ssvg/core` is installed

### TypeScript Issues
Add to your types file:

```typescript
declare module '@ssvg/vite-plugin' {
  import type { Plugin } from 'vite';
  export default function ssvgPlugin(options?: { skipUnderscoreFiles?: boolean }): Plugin;
}
```

### Errors from @ssvg/core
- The plugin handles core compilation errors
- Check Vite console for warnings
- Ensure your `.ssvg` files are valid (see [sSVG docs](https://simplesvg.dev/docs))

## API

### ssvgPlugin(options?)

- `options.skipUnderscoreFiles` (boolean): Skip files starting with `_`. Default: `true`

Returns a Vite plugin.

## License

MIT © SSVG
npm package: @ssvt/eslint-config-react
Description: ESLint config for react projects
Author: ssvt
Latest version: 1.1.9

# @ssvt/eslint-config-react

[![npm version](https://badge.fury.io/js/@ssvt%2Feslint-config-react.svg)](https://badge.fury.io/js/@ssvt%2Feslint-config-react)

## Overview

[eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb) 기반으로 커스터마이징 한 react 프로젝트용 eslint config 레포지토리입니다.

## Installation

### Webpack, Vite, Next.JS 등의 환경

해당 패키지와 함께
Peer dependencies에 포함된 패키지를 모두 설치해야 합니다.

```shell
$ npm install --save-dev @ssvt/eslint-config-react

$ npm install --save-dev @typescript-eslint/eslint-plugin@^5.11.0 @typescript-eslint/parser@^5.11.0 eslint@^8.2.0 eslint-config-airbnb@^19.0.4 eslint-config-prettier@^8.3.0 eslint-plugin-import@^2.25.4 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-prettier@^4.0.0 eslint-plugin-react@^7.28.0 eslint-plugin-react-hooks@^4.3.0 prettier@^2.3.1
```

### Create React App 환경

Create React App로 프로젝트를 시작하면 eslint 패키지가 자동으로 설치되므로 해당 패키지만 설치하면 됩니다
```shell
$ npm install --save-dev @ssvt/eslint-config-react
```

### npm 5+
npm 5+ 이상에서는 `install-peerdeps`를 이용해서 peer dependencies를 자동으로 설치할 수 있습니다.

```shell
$ npx install-peerdeps --dev @ssvt/eslint-config-react
```

### npm 7+
npm 7+ 이상에서는 peer dependency들이 자동으로 설치 되기 때문에 해당 패키지만 설치하면 됩니다.

## Getting Started

패키지를 모두 설치 후 사용하고자 하는 프로젝트의 eslint 설정을 변경하면 됩니다.
적용하고자 하는 플러그인만 extends 속성에 추가하면 됩니다.

### Webpack 기반 / Next.js 프로젝트

```json
{
  "extends": [
    "@ssvt/eslint-config-react/default",
  ],
}
```

### Create React App 프로젝트

```json
{
  "extends": [
    "@ssvt/eslint-config-react/cra",
  ],
}
```

### TypeScript 프로젝트

```json
{
  "extends": [
    "@ssvt/eslint-config-react/default",
    "@ssvt/eslint-config-react/typescript",
  ],
}
```

### Prettier 적용

```json
{
  "extends": [
    "@ssvt/eslint-config-react/default",
    "@ssvt/eslint-config-react/prettier"
  ],
}
```
npm package: @ssw10j/fast-csv
Description: React Native - CSV parser and writer
Author: Doug Martin
Latest version: 4.3.10

<p align="center">
  <a href="https://c2fo.io/fast-csv" target="blank"><img src="https://c2fo.io/fast-csv/img/logo.svg" width="200" alt="fast-csv Logo" /></a>
</p>

[![npm version](https://img.shields.io/npm/v/fast-csv.svg)](https://www.npmjs.org/package/fast-csv)
[![Build Status](https://travis-ci.org/C2FO/fast-csv.svg?branch=master)](https://travis-ci.org/C2FO/fast-csv)
[![Coverage Status](https://coveralls.io/repos/github/C2FO/fast-csv/badge.svg?branch=master)](https://coveralls.io/github/C2FO/fast-csv?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/C2FO/fast-csv/badge.svg?targetFile=package.json)](https://snyk.io/test/github/C2FO/fast-csv?targetFile=package.json)

# `fast-csv`

Package that combines both [`@fast-csv/format`](https://c2fo.io/fast-csv/docs/formatting/getting-started) and [`@fast-csv/parse`](https://c2fo.io/fast-csv/docs/parsing/getting-started) into a single package.

## Installation

[Install Guide](https://c2fo.io/fast-csv/docs/introduction/install)

## Usage

To get started with `fast-csv` [check out the docs](https://c2fo.io/fast-csv/docs/introduction/getting-started)
npm package: @ssw10j/fast-csv-format
Description: fast-csv formatting module
Author: doug-martin
Latest version: 4.3.10

<p align="center">
  <a href="https://c2fo.io/fast-csv" target="blank"><img src="https://c2fo.io/fast-csv/img/logo.svg" width="200" alt="fast-csv Logo" /></a>
</p>

[![npm version](https://img.shields.io/npm/v/@fast-csv/format.svg)](https://www.npmjs.org/package/@fast-csv/format)
[![Build Status](https://travis-ci.org/C2FO/fast-csv.svg?branch=master)](https://travis-ci.org/C2FO/fast-csv)
[![Coverage Status](https://coveralls.io/repos/github/C2FO/fast-csv/badge.svg?branch=master)](https://coveralls.io/github/C2FO/fast-csv?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/C2FO/fast-csv/badge.svg?targetFile=packages/format/package.json)](https://snyk.io/test/github/C2FO/fast-csv?targetFile=packages/format/package.json)

# `@fast-csv/format`

`fast-csv` package to format CSVs.

## Installation

[Install Guide](https://c2fo.io/fast-csv/docs/introduction/install)

## Usage

To get started with `@fast-csv/format` [check out the docs](https://c2fo.io/fast-csv/docs/formatting/getting-started)
npm package: @ssw10j/fast-csv-parse
Description: fast-csv parsing package
Author: doug-martin
Latest version: 4.3.10

<p align="center">
  <a href="https://c2fo.io/fast-csv" target="blank"><img src="https://c2fo.io/fast-csv/img/logo.svg" width="200" alt="fast-csv Logo" /></a>
</p>

[![npm version](https://img.shields.io/npm/v/@fast-csv/parse.svg)](https://www.npmjs.org/package/@fast-csv/parse)
[![Build Status](https://travis-ci.org/C2FO/fast-csv.svg?branch=master)](https://travis-ci.org/C2FO/fast-csv)
[![Coverage Status](https://coveralls.io/repos/github/C2FO/fast-csv/badge.svg?branch=master)](https://coveralls.io/github/C2FO/fast-csv?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/C2FO/fast-csv/badge.svg?targetFile=packages/parse/package.json)](https://snyk.io/test/github/C2FO/fast-csv?targetFile=packages/parse/package.json)

# `@fast-csv/parse`

`fast-csv` package to parse CSVs.

## Installation

[Install Guide](https://c2fo.io/fast-csv/docs/introduction/install)

## Usage

To get started with `@fast-csv/parse` [check out the docs](https://c2fo.io/fast-csv/docs/parsing/getting-started)
npm package: @sswahn/authorizer
Description: An AWS Cognito authorizer for APIGateway that uses HTTP Cookies.
Latest version: 1.0.0-beta.1

# Authorizer · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/authorizer/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/authorizer)
An AWS Cognito authorizer for APIGateway that uses **HTTP Cookies**.

## Overview

Designed for use with AWS Lambda as a custom authorizer for AWS API Gateway to authenticate and authorize users against an AWS Cognito User Pool.

## Usage  

HTTP Cookie value should be a valid Cognito AccessToken.

```javascript
import authorizer from '@sswahn/authorizer'

export const handler = async (event, context, callback) => {
  authorizer('cookieName', event, callback)
}
```

## Requirements

Before deploying, make sure to configure the following:

1. **AWS Cognito User Pool**: Set up an AWS Cognito User Pool and configure it with appropriate security settings.

2. **AWS API Gateway**: Create an AWS API Gateway and configure the Lambda authorizer to use the Lambda function implementing this authorizer.

3. **IAM Permissions**: Ensure that the IAM role associated with this Lambda function has the necessary permissions to interact with AWS Cognito. Specifically, the Lambda function should have permissions to execute the `GetUserCommand` and any other relevant AWS SDK operations. Sample IAM policy:

```json
   {
     "Version": "2012-10-17",
     "Statement": [
       {
         "Effect": "Allow",
         "Action": [
           "cognito-idp:GetUser",
         ],
         "Resource": [
           "arn:aws:cognito-idp:YOUR_REGION:YOUR_ACCOUNT_ID:userpool/YOUR_USER_POOL_ID"
         ]
       }
     ]
   }
```  

## License
Authorizer is [MIT Licensed](https://github.com/sswahn/authorizer/blob/main/LICENSE)
npm package: @sswahn/cache
Description: A robust caching utility that provides easy-to-use methods for interacting with the browser's Cache API.
Latest version: 1.0.1

# Cache · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/cache/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/cache)
A robust caching utility that provides easy-to-use methods for interacting with the browser's Cache API.  

## Features
- **Robust Caching:** A powerful caching utility that leverages the browser's Cache API to provide reliable and efficient caching capabilities.
- **Easy-to-Use Methods:** Simple and intuitive methods for interacting with the cache, making it easy to integrate caching into your web applications.
- **Flexible Cache Expiration:** Set custom expiration times for cached entries using the `max-age` parameter, with the ability to specify the time in seconds for fine-grained control.
- **Retrieve Cached Data:** Retrieve cached responses by providing a cache name and a matching request, ensuring consistent and reliable data retrieval.
- **Efficient Cache Management:** Easily delete specific cache entries or clear the entire cache for efficient cache management.
- **Retrieve Cache Keys:** Get a list of all keys stored in a specific cache, making it simple to track and manage cached resources.  

## Installation
```bash
npm install @sswahn/cache
```

## Usage  
Import library.  

```javascript
import cache from '@sswahn/cache'
```

### Set    
Set a response in cache by name, request, and response.  

```javascript
const request = new Request(url)
const response = await fetch(request)

await cache.set('cachName', request, response)
```

Set a cache with a custom `max-age`. The default is 180 seconds.
```javascript
await cache.set('cachName', request, response, 300)
```

### Get  
Retrieve a response from cache by name and request.  

```javascript
const response = await cache.get('cachName', new Request(url))
```

### Delete  
Delete a specific cache entry by name and request.  

```javascript
await cache.delete('cachName', new Request(url))
```

### Clear    
Clear all entries from a specific cache by name.  

```javascript
await cache.clear('cachName')
```

### Keys    
Retrieve all keys from a specific cache by name.  

```javascript
const keys = await cache.keys('cachName')
```

## Related
- [@sswahn/storage](https://www.npmjs.com/package/@sswahn/storage): A robust and easy-to-use utility for interacting with Web Storage API.
- [@sswahn/database](https://www.npmjs.com/package/@sswahn/database): Easily interact with the IndexedDB API with a simplified, promise-based approach.
- [@sswahn/cookie](https://www.npmjs.com/package/@sswahn/cookie): A lightweight, easy-to-use utility for efficiently managing cookies in a web browser.   

## License
Cache is [MIT Licensed](https://github.com/sswahn/cache/blob/main/LICENSE)
npm package: @sswahn/camera
Description: Camera provides a set of methods for managing video and audio streams from a device's camera and microphone. This library offers functionalities like starting/stopping the camera, toggling the light, muting audio, capturing photos, and recording videos.
Latest version: 1.0.2

# Camera · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/camera/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/camera) ![Weekly Downloads](https://img.shields.io/npm/dw/@sswahn/camera) ![GitHub stars](https://img.shields.io/github/stars/sswahn/camera?style=social)
Camera provides a set of methods for managing video and audio streams from a device's camera and microphone. This library offers functionalities like starting/stopping the camera, toggling the light, muting audio, capturing photos, and recording videos.  

## Features
- Start and stop the device's camera with custom constraints.
- Capture still photos from the video stream.
- Record video clips.
- Toggle camera light (if supported by the device).
- Mute and unmute audio.

## Installation
Using npm.
```bash
npm install @sswahn/camera
```

## Usage  
Here's a brief overview of the functionalities provided:  

### Import Camera  
```javascript
import camera from '@sswahn/camera'
```  

### Turn The Camera On  
```javascript
const stream = await camera.on(optionalConstraints)
```

### Display The Stream   
```javascript
videoRef.current.srcObject = stream
...
<video ref={videoRef} autoPlay muted></video>
```

### Take Photos  
```javascript
const videoElement = videoRef.current
const blob = await camera.takePhoto(videoElement)
```

### Start Recording  
```javascript
const frames = []
const recorder = camera.startRecording(stream, frames)
```  

### Stop Recording    
```javascript
const blob = await camera.stopRecording(recorder, frames)
```  

### Turn The Camera Off  
```javascript
camera.off(stream)
```

### Turn On Light  
```javascript
camera.light(stream)
```

### Turn Off Light  
```javascript
camera.dark(stream)
```

### Mute Audio  
```javascript
camera.mute(stream)
```

### Unmute Audio  
```javascript
camera.unmute(stream)
```

## License
Camera is [MIT Licensed](https://github.com/sswahn/camera/blob/main/LICENSE)
npm package: @sswahn/cookie
Description: A lightweight, easy-to-use utility for efficiently managing cookies in a web browser.
Latest version: 1.0.2

# Cookie · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/cookie/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/cookie) ![Weekly Downloads](https://img.shields.io/npm/dw/@sswahn/cookie)
A lightweight, easy-to-use utility for efficiently managing cookies in a web browser.  

## Features
- **Get Cookie**: Retrieve the value of a cookie.
- **Set Cookie**: Set a cookie with optional attributes.
- **Remove Cookie**: Easily delete a cookie.  

## Installation
Using npm.
```bash
npm install @sswahn/cookie
```

## Usage  
Import library.  
```javascript
import cookie from '@sswahn/cookie'
```

### Get Cookie  
Retrieve a cookie by name.  
```javascript
const token = cookie.get('name')
```

### Set Cookie  
Set a cookie, with optional expiration argument (a numeric value representing the lifetime of the cookie in seconds).  
```javascript
cookie.set('name', value, expiration)
```

### Remove Cookie  
Remove a cookie.  
```javascript
cookie.remove('name')
```

## Related
- [@sswahn/storage](https://www.npmjs.com/package/@sswahn/storage): A robust and easy-to-use utility for interacting with Web Storage API.
- [@sswahn/database](https://www.npmjs.com/package/@sswahn/database): Easily interact with the IndexedDB API with a simplified, promise-based approach.
- [@sswahn/cache](https://www.npmjs.com/package/@sswahn/cache): A robust caching utility that provides easy-to-use methods for interacting with the browser's Cache API.

## License
Cookie is [MIT Licensed](https://github.com/sswahn/cookie/blob/main/LICENSE)
npm package: @sswahn/database
Description: Easily interact with the IndexedDB API with a simplified, promise-based approach.
Latest version: 1.0.2

# Database · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/database/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/database)
Easily interact with the IndexedDB API with a simplified, promise-based approach.

## Features
- Simplified API to perform common operations like get, set, delete, and more.
- Default configurations for quick setup.  

## Installation  
```bash
npm install @sswahn/database
```

## Usage  
Import library.  
```javascript
import database from '@sswahn/indexedDB'
```

Initialize with optional custom configuration.  
```javascript
const db = database([
  {
    storeName: 'customStore',
    keyPath: 'customID',
    indexes: [
      {
        name: 'indexName',
        keyPath: 'indexKeyPath',
        unique: false
      }
    ]
  }
])
```

### Get
Retrieves an item by key from the specified store.  
```javascript
db.get(1, 'customStore')
```  

### Get All
Retrieves all items from the specified store.  
```javascript
db.getAll('customStore')
```  

### Count
Retrieves count of all items in the specified store.  
```javascript
db.count('customStore')
```  

### Add
Adds an item to the specified store.  
```javascript
db.add({ customID: 1, name: 'John Doe' }, 'customStore')
```

### Add All
Adds multiple items to the specified store.  
```javascript
db.addAll([{ customID: 2, name: 'Alice' }, { customID: 3, name: 'Bob' }], 'customStore')
```

### Put
Updates an item in the specified store.  
```javascript
db.put({ customID: 1, name: 'Jane Doe' }, 'customStore')
```  

### Delete
Deletes an item by key from the specified store.  
```javascript
db.delete(1, 'customStore')
```  

### Destroy
Deletes the specified database.  
```javascript
db.destroy('databaseName')
```  

### Close
Closes the connection to the database.  
```javascript
db.close()
```  

## Example  
To use this library, you first initialize a database instance and then perform various operations on it. Below is a basic example to store a record and retrieve it:  

```javascript
import database from '@sswahn/bind'
const db = database()

const storeLocally = async () => {
  try {
    await db.add({ id: 1, name: 'John Doe' })
    return db.get(1)
  } catch (error) {
    console.error(`Error: ${error}`)
  }
}

const data = await storeLocally()
```

## Related
- [@sswahn/storage](https://www.npmjs.com/package/@sswahn/storage): A robust and easy-to-use utility for interacting with Web Storage API.
- [@sswahn/cookie](https://www.npmjs.com/package/@sswahn/cookie): A lightweight, easy-to-use utility for efficiently managing cookies in a web browser.
- [@sswahn/cache](https://www.npmjs.com/package/@sswahn/cache): A robust caching utility that provides easy-to-use methods for interacting with the browser's Cache API.

## License
Database is [MIT Licensed](https://github.com/sswahn/database/blob/main/LICENSE)
npm package: @sswahn/dynamo
Description: This library simplifies common DynamoDB CRUD operations, providing a seamless and intuitive experience.
Latest version: 1.0.0-beta.2

# Dynamo · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/dynamo/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/dynamo)

This library simplifies common DynamoDB CRUD operations, providing a seamless and intuitive experience.  

## Features

- **Seamless CRUD Operations**: Perform Create, Read, Update, and Delete operations with minimal effort. The library streamlines DynamoDB interactions.
- **Automatic Type Handling**: The library intelligently interprets JavaScript types and seamlessly translates them to DynamoDB-compatible formats.
- **Robust Error Handling**: The library incorporates robust error handling. Receive clear and actionable error messages for quick troubleshooting.

## Installation
Using npm.
```bash
npm install @sswahn/dynamo
```

## Usage  

### Import
```javascript
import dynamo from '@sswahn/dynamo'
```

### Create
Add items to your DynamoDB table. DynamoDB data types are automatically handled so no need to use properties such as S, or N, etc.
```javascript
const response = await dynamo.create(data)
```  

### Read
Retrieve items from your DynamoDB table. Optionally, set a limit for the scan to control the number of returned items.
```javascript
const response = await dynamo.read(limit)
```

### Read One
Retrieve an individual item from your DynamoDB table using its key.
```javascript
const response = await dynamo.readOne(key)
```  

### Update
Update attributes of existing items in your DynamoDB table. Specify the attributes to update and the key of the item to modify. 
```javascript
const response = await dynamo.update(data, key)
```

### Remove
Delete an item from your DynamoDB table. Provide the key of the item to remove.
```javascript
const response = await dynamo.remove(key)
```

## Environmental Variables
Ensure the following environmental variables are set:

- TABLE_NAME: The name of your DynamoDB table.

## License
Dynamo is [MIT Licensed](https://github.com/sswahn/dynamo/blob/main/LICENSE)
npm package: @sswahn/server
Description: A simple, robust, and extendable server utility for performing HTTP requests and streamlining CRUD operations.
Latest version: 1.0.1

# Server · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/server/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/server) ![Weekly Downloads](https://img.shields.io/npm/dw/@sswahn/server)
A simple, robust, and extendable server utility for performing HTTP requests and streamlining CRUD operations.  

## Features
- Concise methods for GET, POST, PUT, and DELETE requests.
- Built-in type checking for better error handling.
- Customizable headers for each request.
- Simplified JSON responses.  

## Installation
Using npm:
```bash
npm install @sswahn/server
```

## Usage  
### Import Server  
```javascript
import server from '@sswahn/server'
```

### Get Request
```javascript
const response = await server.get(api)
```

### Post Request
```javascript
const response = await server.post(api, request)
```

### Put Request
```javascript
const response = await server.put(api, request)
```

### Delete Request
```javascript
const response = await server.delete(api)
```

### Custom Headers
For any request, you can provide custom headers:  
```javascript
const customHeaders = {
  'Authorization': 'Bearer YOUR_TOKEN'
}
server.get(api, customHeaders)
```  

## License
Server is [MIT Licensed](https://github.com/sswahn/server/blob/main/LICENSE)
npm package: @sswahn/simple
Description: This library simplifies common CRUD operations using Amazon S3 (Simple Storage Service), providing a convenient and intuitive interface.
Latest version: 1.0.0-beta.1

# Simple · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/simple/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/simple)

This library simplifies common CRUD operations using Amazon S3 (Simple Storage Service), providing a convenient and intuitive interface.  

## Features

- **Seamless CRUD Operations**: Perform Create, Read, Update, and Delete operations with minimal effort. The library streamlines S3 interactions.
- **Robust Error Handling**: The library incorporates robust error handling. Receive clear and actionable error messages for quick troubleshooting.

## Installation
Using npm.
```bash
npm install @sswahn/simple
```

## Usage  

### Import
```javascript
import simple from '@sswahn/simple'
```

### Create
Add an object to your S3 bucket.
```javascript
const response = await simple.create(data)
```  

### Read
Retrieve all objects from your S3 bucket. Optionally, set a limit to control the listed number of returned objects.
```javascript
const response = await simple.read(limit)
```

### Read One
Retrieve an individual object from an S3 bucket using a key.
```javascript
const response = await simple.readOne(key)
```  

### Update
Update an existing object in your S3 bucket.
```javascript
const response = await simple.update(data, key)
```

### Remove
Delete an object from your S3 bucket. Provide the key of the object to remove.
```javascript
const response = await simple.remove(key)
```

## Environmental Variables
Ensure the following environmental variables are set:

- BUCKET_NAME: The name of your S3 bucket.

## License
Simple is [MIT Licensed](https://github.com/sswahn/simple/blob/main/LICENSE)
npm package: @sswahn/storage
Description: A robust and easy-to-use utility for interacting with Web Storage API (localStorage and sessionStorage). This utility abstracts away the raw Web Storage API, providing enhanced error handling and JSON serialization/deserialization out of the box.
Latest version: 1.0.3

# Storage · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/storage/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/storage) ![Weekly Downloads](https://img.shields.io/npm/dw/@sswahn/storage)
A robust and easy-to-use utility for interacting with Web Storage API (localStorage and sessionStorage). This utility abstracts away the raw Web Storage API, providing enhanced error handling and JSON serialization/deserialization out of the box.  

## Features
- Consistent methods for both localStorage and sessionStorage.
- Built-in JSON serialization and deserialization.
- Robust error handling with descriptive error messages.
- Simplified interface for common storage operations.  

## Installation
Using NPM.
```bash
npm install @sswahn/storage
```

## Usage  
Import library.  
```javascript
import storage from '@sswahn/storage'
```

### Local Storage  

Set an item.  
```javascript
storage.local.set('user', data)
```

Get an item.  
```javascript
const user = storage.local.get('user')
```

Remove an item.  
```javascript
storage.local.remove('user')
```

Clear all items.  
```javascript
storage.local.clear()
```

Retrieve a key by index.
```javascript
const keyName = storage.local.key(0)
```

### Session Storage  

The methods for sessionStorage are identical to those for localStorage.  
```javascript
storage.session.set('key', { data: 'some data' })
const data = storage.session.get('key')
storage.session.remove('key')
storage.session.clear()
const keyName = storage.session.key(0)
```

## Error Handling
Each method can be wrapped in a try-catch block, providing detailed error messages. Handle errors as per your application's requirements.
```javascript
try {
  const data = storage.local.get('key')
} catch (error) {
  console.error(error.message)
}
```

## Related
- [@sswahn/database](https://www.npmjs.com/package/@sswahn/database): Easily interact with the IndexedDB API with a simplified, promise-based approach.
- [@sswahn/cookie](https://www.npmjs.com/package/@sswahn/cookie): A lightweight, easy-to-use utility for efficiently managing cookies in a web browser.
- [@sswahn/cache](https://www.npmjs.com/package/@sswahn/cache): A robust caching utility that provides easy-to-use methods for interacting with the browser's Cache API.


## License
Storage is [MIT Licensed](https://github.com/sswahn/storage/blob/main/LICENSE)
npm package: @sswatson/mdsvex
Description: Markdown preprocessor for Svelte
Author: pngwn
Latest version: 0.9.10

# MDsveX

_do ya think I'm svexy?_

A markdown preprocessor for Svelte components. Basically [MDX](https://github.com/mdx-js/mdx) for Svelte.

This preprocessor allows you use Svelte components in your markdown, or markdown in your svelte components.

[Try it](https://mdsvex.com/)

You can do this:

```jsx
<script>
  import { Chart } from '../components/Chart.svelte';
</script>

# Here’s a chart

The chart is rendered inside our MDsveX document.

<Chart />
```

https://mdsvex.com/