open-index/open-npm huggingface dataset:
npm package: @inventhq/aerostat-connectors
Description: Data connectors for Aerostat Charts — SSE, WebSocket, and HTTP polling helpers.
Latest version: 0.1.0

# @inventhq/aerostat-connectors

Data transport helpers for [Aerostat Charts](https://github.com/inventhq/aerostat-charts). Ships separately to avoid polluting chart bundle tree-shaking.

## Install

```bash
npm install @inventhq/aerostat-connectors
```

## Connectors

### SSE (Server-Sent Events)

```typescript
import { connectSSE } from '@inventhq/aerostat-connectors';

const handle = connectSSE(chart, '/api/stream', {
  parse: (data) => JSON.parse(data),
  reconnect: true,
  reconnectDelay: 2000,
});

handle.stop(); // cleanup
```

### WebSocket

```typescript
import { connectWS } from '@inventhq/aerostat-connectors';

const handle = connectWS(chart, 'wss://api.example.com/realtime', {
  parse: (data) => JSON.parse(data as string),
});

handle.stop();
```

### HTTP Polling

```typescript
import { connectPoll } from '@inventhq/aerostat-connectors';

const handle = connectPoll(chart, '/api/metrics/latest', {
  interval: 5000,
  parse: async (res) => res.json(),
});

handle.stop();
```

## License

MIT
npm package: @inventi/eslint-plugin-data-hooks
Description: This ESLint plugin enforces the [Frontend Principles](https://git.inventi.cz/adam.bisek/grab-a-plate/-/tree/master/frontend#frontend-readme).
Author: Adam Bisek
Latest version: 1.0.2

# `@inventi/data-hooks`

This ESLint plugin enforces the [Frontend Principles](https://git.inventi.cz/adam.bisek/grab-a-plate/-/tree/master/frontend#frontend-readme).

## Installation

Assuming you already have ESLint installed, run:

```sh
# npm
npm install @inventi/eslint-plugin-data-hooks --save-dev

# yarn
yarn add @inventi/eslint-plugin-data-hooks --dev
```

Then extend the recommended eslint config:

```js
{
  "extends": [
    // ...
    "plugin:@inventi/data-hooks/recommended"
  ]
}
```

### Custom Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:

```js
{
  "plugins": [
    // ...
    "@inventi/data-hooks"
  ],
  "rules": {
    // ...
    '@inventi/data-hooks/no-data-hooks-inside-components': ['error'],
    '@inventi/data-hooks/no-data-hooks-in-basic-components-dirs': ['error'],
  }
}
```

## License

MIT


## Development
```yarn remove @inventi/eslint-plugin-data-hooks```
```yarn add --dev file:./src/@packages/eslintPluginDataHooks``` 

Add plugin to eslint config - see section Custom Configuration above
npm package: @inventi/eslint-plugin-doc
Description: Require readme for your project.
Author: Adam Bisek
Latest version: 1.0.2

# `@inventi/eslint-plugin-doc`

Require readme for your project.

## Installation

Assuming you already have ESLint installed, run:

```sh
# npm
npm install @inventi/eslint-plugin-doc --save-dev

# yarn
yarn add @inventi/eslint-plugin-doc --dev
```

### Configuration

```js
{
  "plugins": [
    // ...
    "@inventi/doc"
  ],
  "rules": {
    // ...
    '@inventi/doc/require-doc': [
      'error',
      { directories: ['src/App'], ignore: '**/acl' },
    ],
  }
}
```

## License

MIT

## Development
```yarn remove @inventi/eslint-plugin-doc```
```yarn add --dev file:./src/@packages/eslintPluginDoc``` 

Add plugin to eslint config - see section Custom Configuration above
npm package: @inventi/eslint-plugin-graphql-codegen
Description: This ESLint plugin cleans up Typescript types generated from GraphQL schema.
Author: Tomas Rechtig
Latest version: 3.0.1

# `@inventi/graphql-codegen`

This ESLint plugin cleans up Typescript types generated from GraphQL schema.

## Installation

Assuming you already have ESLint installed, run:

```sh
# npm
npm install @inventi/eslint-plugin-graphql-codegen --save-dev

# yarn
yarn add @inventi/eslint-plugin-graphql-codegen --dev
```

### Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:

```js
{
  "plugins": [
    // ...
    "@inventi/graphql-codegen"
  ],
  "rules": {
    // ...
    '@inventi/graphql-codegen/fixer': ['error', ['ICategory', 'IPageInfo', 'Connection']],
  }
}
```

## License

MIT

## Development

```yarn remove @inventi/eslint-plugin-graphql-codegen```
```yarn add --dev file:./.packages/eslintPluginGraphqlCodegen```

Add plugin to eslint config - see section Custom Configuration above
npm package: @inventi/eslint-plugin-reinhard
Description: Grammar nazi for your INVENTI `grab a plate` project.
Author: Adam Bisek
Latest version: 1.2.2

# `@inventi/eslint-plugin-reinhard`

Grammar nazi for your INVENTI `grab a plate` project.

This ESLint plugin enforces the [Frontend Principles](https://git.inventi.cz/adam.bisek/grab-a-plate/-/tree/master/frontend#frontend-readme).

## Installation

Assuming you already have ESLint installed, run:

```sh
# npm
npm install @inventi/eslint-plugin-reinhard --save-dev

# yarn
yarn add @inventi/eslint-plugin-reinhard --dev
```

Then extend the recommended eslint config:

```js
{
  "extends": [
    // ...
    "plugin:@inventi/reinhard/recommended"
  ]
}
```

### Custom Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:

```js
{
  "plugins": [
    // ...
    "@inventi/reinhard"
  ],
  "rules": {
    // ...
    '@inventi/reinhard/no-data-hooks-inside-components': ['error'], // disallow hooks for fetching and mutating data inside regular presentational components
    '@inventi/reinhard/no-data-hooks-in-basic-components-dirs': ['error'], // disallow hooks within components directories
    '@inventi/reinhard/components-staff-culture': ['error'], // staff culture of components; every component should consist of  index.ts, storybook and component
  }
}
```

## License

MIT


## Development
```yarn remove @inventi/eslint-plugin-reinhard```
```yarn add --dev file:./src/@packages/eslintPluginReinhard``` 

Add plugin to eslint config - see section Custom Configuration above
npm package: @inventi/graphql-api-to-typescript
Description: [![@inventi/graphql-api-to-typescript](https://img.shields.io/npm/v/@inventi/graphql-api-to-typescript.svg)]()
Author: Adam Bisek
Latest version: 1.0.9

# @inventi/graphql-api-to-typescript 🇩🇪
[![@inventi/graphql-api-to-typescript](https://img.shields.io/npm/v/@inventi/graphql-api-to-typescript.svg)]()

Generate from your graphql endpoint Typescript types! :)

```sh
npx @inventi/graphql-api-to-typescript http://yourGraphqllEndpointUrl yourOutputFile.ts
```

## Example
```sh
npx @inventi/graphql-api-to-typescript https://swapi-graphql.netlify.app/.netlify/functions/index ./graphqlTypes.ts
```
npm package: @inventistudio/vue-starter-kit
Description: <p align="center">   <br><br><strong>vue-starter-kit</strong> - modern Vue.js template generator <br>that uses Vue 2.5.x, Vue-router, Vuex, Vuelidate. </p>
Author: InventiStudio
Latest version: 1.0.0

<p align="center">
  <br><br><strong>vue-starter-kit</strong> - modern Vue.js template generator <br>that uses Vue 2.5.x, Vue-router, Vuex, Vuelidate.
</p>
npm package: @inventive/sdk
Description: SDK library for types, function calls and React components to embed Inventive content in any web app
Author: Inventive X
Latest version: 0.8.0

# inventive-sdk
SDK library for types, function calls and React components to embed Inventive content in any web app

# Getting Started

## Commit message

We use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/#summary) to enforce commit message style.
Here is a [list of rules](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#rules) to follow.

```
<type>: <short summary>
  │             │
  │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
  │
  └─⫸ Commit Type: build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test
```

## Manual publish
1. Make sure you are logged into your npm for `--scope=@inventive`:
    ```bash
    npm login --scope=@inventive
    ```
2. Make sure the version number is properly bumped
3. In the command line, run the following command:
    ```bash
    yarn publish:npm
    ```
    it will build the package and publish it to the npm registry under the said version number.
npm package: @inventivegroup/prettier-config
Description: Inventive Group's Prettier config
Author: Christina Harder
Latest version: 1.0.4

# prettier-config

## Description

This is Inventive Group's Prettier config based on the [default config](https://www.npmjs.com/package/prettier).


## Usage

This should be installed in your project as a dependency, on every Inventive project.

```bash
npm install --save-dev --save-exact prettier
```

```bash
npm install --save-dev @inventivegroup/prettier-config
```

In the root of your project, create a `.prettierrc.js` file and add the following:

```js
module.exports = require("@inventivegroup/prettier-config");
```

Add the following to your `package.json`:

```json
 {
       "scripts": {
           "format": "prettier --write ."
       }
   }
```

## To Make a Release of new Changes

This will publish the new version to the [npm registry](https://www.npmjs.com/package/@inventivegroup/prettier-config).

```bash
npm publish
```
npm package: @inventivegroup/vue-ics
Description: Vue.js plugin for generating ICalendar (.ics) files.
Author: Stanislav Mihaylov
Latest version: 0.1.5

[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
[![npm version](https://badge.fury.io/js/vue-ics.svg)](https://badge.fury.io/js/vue-ics)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/evildvl/vue-ics.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/evildvl/vue-ics/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/evildvl/vue-ics.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/evildvl/vue-ics/context:javascript)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

# vue-ics

Vue.js plugin for generating ICalendar (.ics) files.

## Installation

##### NPM

```
npm install vue-ics --save
```

##### Vue

```javascript
import Vue from 'vue'
import ICS from 'vue-ics'

Vue.use(ICS, options)
```

## Initialising options (optional)
{string} uidDomain - Your domain

{string} prodId - Product ID

## Create event

{string} language    - Language in format en-us (default)

{string} subject     - Subject/Title of event

{string} description - Description of event

{string} location    - Location of event

{string} begin       - Beginning date of event

{string} stop        - Ending date of event

{string} url		 - URL (optional)

{object} organizer   - Organizer

  {string} name - Organizer name
  
  {string} email - Organizer email

{RRule}  rrule       - Reccurence rule (optional)

```javascript
this.$ics.addEvent(language, subject, description, location, begin, stop, url, organizer, rrule)
```
You can add one or more events.

## Reccurence rule
You can add recurrence rule for your event. Event will be repeat as you want.
```javascript
const rrule = {
   freq: 'WEEKLY',
   until: until,
   interval: 1
}
```

Parameters:

{string} freq - Required. The frequency of event recurrence. Can be DAILY, WEEKLY, MONTHLY, or YEARLY.

{string | number | Date} until - date stringA date string representing the date on which to end repitition. Must be friendly to Date()

{number} interval - The interval of freq to recur at. For example, if freq is WEEKLY and interval is 2, the event will repeat every 2 weeks

{array} byday - Which days of the week the event is to occur. An array containing any of SU, MO, TU, WE, TH, FR, SA

## Remove all events from the calendar

```javascript
this.$ics.removeAllEvents()
```

## Get calendar with events as string

```javascript
this.$ics.calendar()
```

##Download calendar file

```javascript
this.$ics.download(fileName)
```

{string} fileName - name of file without extension (will be *.ics)
npm package: @inventives/coforio-sdk
Description: Cofor.io Product SDK for NodeJS backend APIs
Author: Inventives, Inc.
Latest version: 0.10.6

# README

**Cofor.io Product SDK for NodeJS backend projects** - Developed by [Inventives, Inc.](https://inventives.ai)

## Install using NPM or YARN

```sh
npm install @inventives/coforio-sdk
yarn add @inventives/coforio-sdk
```

Import into your project with either of the following depending on your node/javascript engine version:
```javascript
import Coforio from '@inventives/coforio-sdk';
const Coforio = require('@inventives/coforio.sdk');
```

## Usage

See https://coforio.readme.io/reference/installation for a full user guide and reference on using the product SDK.
npm package: @inventivetalent/axios-rate-limit
Description: Rate limit for axios.
Author: Alexandr Borisov
Latest version: 1.3.5

# axios-rate-limit

[![npm version](https://img.shields.io/npm/v/axios-rate-limit.svg?style=flat-square)](https://www.npmjs.com/package/axios-rate-limit)
[![npm downloads](https://img.shields.io/npm/dt/axios-rate-limit.svg?style=flat-square)](https://www.npmjs.com/package/axios-rate-limit)
[![Build Status](https://img.shields.io/travis/aishek/axios-rate-limit.svg?style=flat-square)](https://travis-ci.org/aishek/axios-rate-limit)

A rate limit for axios: set how many requests per interval should perform immediately, other will be delayed automatically.

## Installing

```bash
yarn add axios-rate-limit
```

## Usage

```javascript
import axios from 'axios';
import rateLimit from 'axios-rate-limit';

// sets max 2 requests per 1 second, other will be delayed
// note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence
// if specified both with maxRequests and perMilliseconds
const http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 })
http.getMaxRPS() // 2
http.get('https://example.com/api/v1/users.json?page=1') // will perform immediately
http.get('https://example.com/api/v1/users.json?page=2') // will perform immediately
http.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one

// options hot-reloading also available
http.setMaxRPS(3)
http.getMaxRPS() // 3
http.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor
```
npm package: @inventivetalent/express-github-webhook
Description: Express middleware to validate GitHub webhooks
Author: Haylee Schäfer
Latest version: 1.0.3

# express-github-webhook

Express middleware to validate webhooks from GitHub


##### Install
```
npm install --save @inventivetalent/express-github-webhook
```

##### Basic Server Example
```javascript
// Hello World Example from https://expressjs.com/en/starter/hello-world.html
const express = require('express')
const bodyParser = require('body-parser')
const {GithubWebhook} = require('@inventivetalent/express-github-webhook');
const app = express()
const port = 3000

app.use(bodyParser.json()) // Required for validating the request

// Register the puller middleware at the specified endpoint
const webhookHandler = new GithubWebhook({
    events: ["push"], // Events to listen for (optional, since you can select them on Github as well - set to * to handle all events)
    secret: "SuperSecretSecret" // Set this to verify the request against the secret provided to github
});
app.use("/_my_git_endpoint", webhookHandler.middleware, (req, res) => {
    // Middleware validated the request and it's good to go at this point!
    console.log("got valid github webhook!");
    console.log(req.body);
});

app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port, () => console.log(`Example app listening at http://localhost:${ port }`))
```

##### Github Webhook Example
![](https://yeleha.co/2WjQdIb)
* Obviously use your project's public domain
* Set Content type to `application/json`
* (optional) Set a secret and add it to the puller config
* (optional) Choose which events should be sent to the webhook - also make sure to change the puller config respectively
npm package: @inventivetalent/gitconfig
Description: Load JSON configs from remote files
Author: Haylee Schäfer
Latest version: 1.0.10

# gitconfig

##### Install
```
npm install --save @inventivetalent/gitconfig
```

##### Public Repo Example
```js
import GitConfig from "@inventivetalent/gitconfig"

// Set source for all config files
GitConfig.source = "https://raw.githubusercontent.com/me/myrepo/master/";

// Load config.json from the source
const myConfig = await GitConfig.get("config.json");

// Invalidate changes
await myConfig.invalidate();
```

##### Private Repo Example
```js
import GitConfig from "@inventivetalent/gitconfig"

// GitHub authorization + raw
GitConfig.axiosInstance.defaults.headers["Authorization"] = "token MyGithubToken";
GitConfig.axiosInstance.defaults.headers["Accept"] = "Application/vnd.github.v3.raw";

// Set source for all config files
GitConfig.source = "https://api.github.com/repos/me/myrepo/";

// Load config.json from the source
const myConfig = await GitConfig.get("config.json");

// Invalidate changes
await myConfig.invalidate();
```
npm package: @inventivetalent/gitsha
Description: Get SHA1 of a git repository
Author: Haylee Schäfer
Latest version: 1.0.0

# gitsha
Get the sha1 of a git repo

Promisified fork of https://github.com/aadityabhatia/gitsha

```
npm install @inventivetalent/gitsha
```

```js
import gitsha from "@inventivetalent/gitsha";

const sha = await gitsha(); // => 8b30d72
```
npm package: @inventivetalent/hi18n
Description: Simple HTML localisation, loading translations from json files
Author: Haylee Schäfer
Latest version: 1.0.1

# hi18n

HTML internationalization  

Uses the HTML tag's original text content as keys for loading translations from json files.  
  
```
npm i @inventivetalent/hi18n
```

Demo: https://inventivetalent.org/hi18n-test/
```html
<html>
    <body>
        <div>
            <span class="hi18n">Fowl stars lights dry green whales stars from signs.</span>
            <span class="hi18n">Be every his give grass dry fifth.</span>
            <span class="hi18n">Fly moving.</span>
            <span class="hi18n">May their made so lights darkness years.</span>
            <span class="hi18n">So gathering may from.</span>
            <span class="hi18n">Void signs man fowl fish moving.</span>
        </div>
        
        <script src="https://unpkg.com/@inventivetalent/hi18n@1.0.1/dist/bundle.js"></script>
        <script>
            new hi18n({
                auto: true // automatically translate on page load
            });
        </script>
    </body>
</html>
```
npm package: @inventivetalent/imghash
Description: Image content hash
Author: Haylee Schäfer
Latest version: 1.1.1

# imghash

`npm install --save @inventivetalent/imghash`

```js
import { imageHash } from "@inventivetalent/imghash";
import { readFileSync } from "fs";

const data = readFileSync("test.png");
const hash = await imageHash(data, { algorithm: "sha256" });
console.log(hash);
```
npm package: @inventivetalent/loading-cache
Description: loading cache based on ben-manes/caffeine and node-cache
Author: Haylee Schäfer
Latest version: 0.7.1

## loading-cache
Caching utility for NodeJS with loading functionality, based on [ben-manes/caffeine](https://github.com/ben-manes/caffeine)

```
npm install --save @inventivetalent/loading-cache
```

# Usage

## [Sync](https://inventivetalent.org/loading-cache/classes/_src_caches_loadingcache_.loadingcache.html)
```typescript
import { Caches, Time, LoadingCache } from "@inventivetalent/loading-cache";

const cache = Caches.builder()
    .expireAfterWrite(Time.minutes(10))
    .expireAfterAccess(Time.minutes(5))
    .build(key => Math.random() * 100);
```

## [Async](https://inventivetalent.org/loading-cache/classes/_src_caches_asyncloadingcache_.asyncloadingcache.html)
```typescript
import { Caches, Time, AsyncLoadingCache } from "@inventivetalent/loading-cache";

const cache = Caches.builder()
    .expireAfterWrite(Time.minutes(10))
    .expireAfterAccess(Time.minutes(5))
    .buildAsync(
        key => new Promise(resolve => {
            setTimeout(() => {
                resolve(Math.random() * 100);
            }, Math.random() * 10);
        })
    );
```
npm package: @inventivetalent/optimus-ts
Description: Knuths multiplicative hashing based id obfuscation for javascript (port of https://github.com/jenssegers/optimus).
Author: Chamindu R. Munasinghe
Latest version: 0.2.1

Knuth's integer hashing based id obfuscation
============================================
[![Build Status](http://img.shields.io/travis/chamindu/optimus-js.svg)](https://travis-ci.org/chamindu/optimus-js) [![Latest build](https://img.shields.io/npm/v/optimus-js.svg)](https://www.npmjs.com/package/optimus-js)

This is a port of [jenssegers/optimus](https://github.com/jenssegers/optimus) PHP library for Javascript. It works on the browser as well as node.

Installation
-------------

```
npm install optimus-js
```

```
bower install optimus-js
```

Usage
-----
To initialize the library you need 3 things.

- Large prime number lower than 2147483647 (prime)
- The inverse prime so that (prime * inverse) & 2147483647 = 1
- A large random number lower than 2147483647

for more info and a command line too to generate these values please refer the [original project](https://github.com/jenssegers/optimus)

using the above parameters you can create instances of Optimus(prime, inverse, random)


```
var Optimus = require('optimus');

var optimus = new Optimus(1580030173, 59260789, 1163945558);
```

After that you can use encode and decode methods to encode/decode positive integers ranging from (0 to 2147483647). 

```
var hash = optimus.encode(25);
var original = optimus.decode(hash);
```

***Warning***: Please note that this library only provides obfuscation and not encryption.
npm package: @inventivetest83/vue-ics
Description: Vue.js plugin for generating ICalendar (.ics) files.
Author: Inventive Group
Latest version: 0.1.10

[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
[![npm version](https://badge.fury.io/js/vue-ics.svg)](https://badge.fury.io/js/vue-ics)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/evildvl/vue-ics.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/evildvl/vue-ics/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/evildvl/vue-ics.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/evildvl/vue-ics/context:javascript)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

# vue-ics

Vue.js plugin for generating ICalendar (.ics) files.

## Installation

##### NPM

```
npm install vue-ics --save
```

##### Vue

```javascript
import Vue from 'vue'
import ICS from 'vue-ics'

Vue.use(ICS, options)
```

## Initialising options (optional)
{string} uidDomain - Your domain

{string} prodId - Product ID

## Create event

{string} language    - Language in format en-us (default)

{string} subject     - Subject/Title of event

{string} description - Description of event

{string} location    - Location of event

{string} begin       - Beginning date of event

{string} stop        - Ending date of event

{string} url		 - URL (optional)

{object} organizer   - Organizer

  {string} name - Organizer name
  
  {string} email - Organizer email

{RRule}  rrule       - Reccurence rule (optional)

```javascript
this.$ics.addEvent(language, subject, description, location, begin, stop, url, organizer, rrule)
```
You can add one or more events.

## Reccurence rule
You can add recurrence rule for your event. Event will be repeat as you want.
```javascript
const rrule = {
   freq: 'WEEKLY',
   until: until,
   interval: 1
}
```

Parameters:

{string} freq - Required. The frequency of event recurrence. Can be DAILY, WEEKLY, MONTHLY, or YEARLY.

{string | number | Date} until - date stringA date string representing the date on which to end repitition. Must be friendly to Date()

{number} interval - The interval of freq to recur at. For example, if freq is WEEKLY and interval is 2, the event will repeat every 2 weeks

{array} byday - Which days of the week the event is to occur. An array containing any of SU, MO, TU, WE, TH, FR, SA

## Remove all events from the calendar

```javascript
this.$ics.removeAllEvents()
```

## Get calendar with events as string

```javascript
this.$ics.calendar()
```

##Download calendar file

```javascript
this.$ics.download(fileName)
```

{string} fileName - name of file without extension (will be *.ics)
npm package: @inventorjs/api-service
Description: Api service manager base on axios
Author: sunkeysun
Latest version: 1.0.3

# api-service

## 特性

- 内部请求使用 [Axios](https://github.com/axios/axios) 实现跨平台请求能力
- 支持 Axios 的所有能力，并进行一定程度的扩展如(retry, race condition, reqId, logger, urlParams 等)
- 将 Axios 超时转化为 AbortSignal 处理（axios 内置 timeout 无法处理 node 端连接超时）
- 支持预定义拦截器，可以将拦截器作为配置信息初始化
- 采用规范化装饰器 (@Service, @Api) 定义服务与 API，便于对 API 进行统一管理
- 自动将 API 定义转化为服务调用，调用方式与本地函数调用方式相同

## 安装

```
pnpm add @inventorjs/api-service@latest
```

## 接口说明

### Entities

- ApiService: 核心服务类，用于初始化服务，和提供核心接口调用功能，对服务进行初始化
  - init: 初始化所有服务，创建内部请求实例，全局调用一次
- @Service: Service 装饰器，用于提供服务定义信息
- @Api: Api 装饰器，用于提供 api 定义信息

### Types

```
// 提供服务定义配置，可通过 init/@Service/@Api 三个接口传入，并自动进行合并
// 配置合并顺序 defaults <- init <- @Service <- @Api <- apiCall
interface ApiConfig<D = unknown> extends AxiosRequestConfig<D> {
  // ...
  // 支持所有其他 Axios 配置参数

  // 扩展配置
  $ext?: {
    observe?: 'body' | 'response' // 选择获取响应对象/响应体(response.data)，默认 response
    rcChannel?: string // race condition channel, 用于解决请求竞态问题，返回最新的数据
    retry?: number // 失败重试次数，默认不重试，默认重试延时：Math.min(2 ** retryCount, 30) * 1000
    reqIdHeaderName?: string // reqId http header，用于再请求头中注入 reqId，默认不住入
    genReqId?: { (config: ApiConfig): string } // reqId 生成算法，默认使用 uuid 算法
    logger?: boolean | LoggerConfig // 日志配置，默认开启(浏览器端默认关闭)
    urlParams?: Record<string, number | string> // url 参数对象，支持如 "/:id" 的url，并进行自动替换
    requestInterceptors?: (typeof RequestInterceptor)[] // 请求拦截器, 注：拦截器只能在 @Service 层级以上配置
    responseInterceptors?: (typeof ResponseInterceptor)[] // 响应拦截器 注：拦截器只能在 @Service 层级以上配置
  }
}

// ApiService 定义
declare class ApiService {
  private static rcChannelMap
  private static inited
  static init({
    services,
    config: rootConfig,
  }: {
    services: ClassType<ApiService>[]
    config?: ApiConfig
  }): Promise<void>
  static apiCall<R, D = unknown>(
    this: ClassType<ApiService>,
    data?: D,
    config?: ApiConfig,
  ): Promise<unknown>
}

// @Service 定义
declare function Service(
  serviceConfig: ApiConfig,
): (Cls: ClassType<ApiService>) => void

// @Api 定义
declare function Api(
  apiConfig: ApiConfig,
): (
  Cls: ClassType<ApiService>,
  propertyKey: string,
  propertyDescriptor: PropertyDescriptor,
) => void
```

## 示例

```
// user.service.ts
import { Service, Api, ApiService, type ApiConfig } from '@inventorjs/api-service'
import { UserService } from './user.service'

@Service({
  baseURL: 'https://run.mocky.io/v3',
})
export class UserService extends ApiService {
  @Api({ url: '/d7389eca-12e9-4e0e-b55e-4704fe7cbfc4' })
  static getData(data?: void, config?: ApiConfig) {
    return this.apiCall<Record<string, unknown>>(data, config)
  }
}

// index.ts 初始化 ApiService
ApiService.init({
  services: [UserService],
  config: {
    $ext: {
      reqIdHeaderName: 'x-req-id',
      observe: 'body',
      retry: 3,
    },
  },
})

// call api somewhere
UserService.getData().then((d) => {
  console.log(d)
})
```
npm package: @inventorjs/axios-weapp-adapter
Description: axios 微信小程序适配器
Author: sunkeysun
Latest version: 1.0.5

# @inventorjs/axios-weapp-adapter

[![npm version](https://img.shields.io/npm/v/@inventorjs/axios-weapp-adapter.svg)](https://www.npmjs.com/package/@inventorjs/axios-weapp-adapter)
[![license](https://img.shields.io/npm/l/@inventorjs/axios-weapp-adapter.svg)](https://github.com/inventorjs/axios-weapp-adapter/blob/main/LICENSE)

微信小程序环境下的 Axios 适配器，让你在小程序中也能使用 axios 发送请求。

## 特性

- 完全兼容 axios API
- 支持请求和响应拦截器
- 支持请求取消
- 支持 HTTP 状态码校验
- TypeScript 类型支持

## 安装

```bash
# 使用 npm
npm install @inventorjs/axios-weapp-adapter axios

# 使用 yarn
yarn add @inventorjs/axios-weapp-adapter axios

# 使用 pnpm
pnpm add @inventorjs/axios-weapp-adapter axios
```

## 使用示例

```js
import axios from 'axios';
import weappAdapter from '@inventorjs/axios-weapp-adapter';

// 创建 axios 实例并使用微信小程序适配器
const instance = axios.create({
  adapter: weappAdapter,
  // 其他 axios 配置项
  baseURL: 'https://api.example.com',
  timeout: 10000,
});

// 使用 axios 发送请求
instance.get('/users')
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });

// 也可以在单个请求中使用适配器
axios({
  url: 'https://api.example.com/users',
  method: 'GET',
  adapter: weappAdapter
}).then(/* ... */);
```

## API

该适配器与标准 axios 适配器保持一致，完全支持 axios 的所有配置项：

- `url`: 请求的 URL
- `method`: 请求方法
- `data`: 请求体数据
- `headers`: 请求头
- `timeout`: 请求超时时间
- `cancelToken`: 取消请求的令牌
- `validateStatus`: 验证响应状态码的函数

更多配置项请参考 [axios 文档](https://axios-http.com/docs/intro)。

## 注意事项

1. 微信小程序环境中不支持 axios 的某些特性，例如浏览器相关的功能（如 XSRF）
2. 请确保小程序已经授权网络请求域名

## 贡献指南

欢迎提交 Issues 或 Pull Requests 来改进这个项目！

1. Fork 本仓库
2. 创建你的特性分支: `git checkout -b feature/awesome-feature`
3. 提交你的更改: `git commit -m 'Add some awesome feature'`
4. 推送到分支: `git push origin feature/awesome-feature`
5. 提交 Pull Request

## 许可证

[MIT](./LICENSE)
npm package: @inventorjs/sdk-loader
Description: SDK Loader
Author: sunkeysun
Latest version: 0.0.15

# @inventorjs/sdk-loader

## 概述
基于 systemjs 实现的通用 sdk 加载器，可实现根据 sdk 资源配置，加载 sdk ，返回 sdk 模块，支持 js, chunks 和 css.

## 功能列表
* 基于 systemjs 实现模块模块管理，支持 js(支持 system 格式) json css 类型的模块
* systemjs 加载 json 和 css 需要用到 fetch，支持自动加载 fetch polyfill
* css 模块加载后返回 CSSStyleSheet 对象列表，用户可自定义如何使用
* 支持多 sdk 并发加载，需要考虑最大并发数可能会影响性能
* 支持直接传入 sdkConfigs 配置对象 或 传入 sdkConfigs 配置对象的远程 json 地址，可自动加载
* 支持自定义加载超时时间，默认 10s，超时后会抛出错误
* 支持 webpack / rollup 打包的 systemjs 模块，可配置优先加载 chunk（webpack 的 SplitChunks 对 systemjs 兼容不好）

**兼容性：不兼容 IE，Edge 以上没问题**

**副作用：systemjs 会在全局注入 System 全局变量，用于模块管理**

**注意：js 模块需要打包成 system 格式，[webpack配置](https://webpack.js.org/configuration/output/#type-system) [rollup配置](https://rollupjs.org/configuration-options/#output-format)，推荐使用 rollup**

## 代码示例
```
  import { loadSdk } from './sdk-loader'
  import ReactDOM from 'react-dom'

  loadSdk({
    sdkConfigs: {
      testSdk: {
        manifest: {
          entry: 'http://localhost:3000/dist/index.js',
          chunks: ['http://localhost:3000/dist/react-7138bc01.js'],
          css: ['http://localhost:3000/dist/style.css'],
        },
        version: 'v1',
      },
    },
    options: {
      timeout: 15000,
      chunksPreload: true, // 默认为 false，是否预加载 chunks，webpack 构建的 chunks 请传 true
      cssEffect: true, // 默认为 false，加载完 css 是否在页面生效，优先使用 adoptedStyleSheets，若不支持，降级为 link
      documentRoot: document, // 默认为 document, css 生效的文档对象，可传 shadowDom Root
    }
  }).then(({ testSdk: { entry, chunks, css } }) => {
    console.log(entry, chunks, css)
  })
```
npm package: @inventorjs/sls-core
Description: serverless core
Author: sunkeysun
Latest version: 0.1.0

# 临时密钥授权语法
推荐采用临时密钥限制资源的方式，对 stage 进行授权，实现多用户安全开发[接口文档地址](https://cloud.tencent.com/document/product/1312/48195)
```
{
  "version": "2.0",
  "statement": [
    {
      "effect": "allow",
      "action": [
        "sls:RunComponent",
        "sls:GetInstance",
        "sls:ListInstances"
      ],
      "resource": [
        "qcs::sls:${region}:uin/${uin}:appname/${app}/stagename/${stage}"
      ]
    }
  ]
}
```
npm package: @inventorjs/stats-web
Description: web stats
Author: sunkeysun
Latest version: 0.0.19

# stats-web
web 页面统计脚本，采集页面行为数据，如 fps 等

## FpsStats 类
采集页面 fps 数据，并自动检测浏览器额定帧率，支持定义低帧率阈值，以及采样配置, 支持自定义事件触发采集，精确获取帧率信息，及分析结果.
### 使用示例
```
  import { FpsStats } from '@inventorjs/stats-web'
  const fpsStats = new FpsStats({
    // 可定制其他采集配置参数
    // ...
    report({ stats, event }) {
      // stats 为采集的帧率信息 Stats
      // event 为触发采集的事件对象 Event
      // 这里可以执行相应的上报逻辑，上报至自己的数据接口，进行数据分析和告警
    }
  })
  // 开始监控采集 fps
  fpsStats.startMonitor()

  // 可随时暂停采集
  fpsStats.stopMonitor()
```

### 数据结构定义
```
// 采集对象构造参数
interface Params {
  /** 低 fps 下限阈值，传这个值，则 lowThresholdPercent 失效 */
  lowThreshold?: number
  /** 低 fps 下限阈值百分比, 如 低于屏幕额定 fps(60) 的60%(即 36)认为是低fps，则传 0.6 */
  lowThresholdPercent?: number
  /** 低 fps 样本数百分比，如低样本数占总样本数 30% 认为是低fps，则传 0.3 */
  lowSamplePercent?: number
  /** 采集时长 ms，采集一段时间内的样本, 时长越长，低 fps 判断越准确 */
  collectDuration?: number
  /** 采集间隔 ms，会将间隔内的帧数相加，然后计算平均值，间隔越短，灵敏度越高 */
  collectInterval?: number
  /** 采集最大次数，达到采集最大次数则自动停止采集, 默认不限制 */
  collectMaxCount?: number
  /** 触发采集的事件 */
  monitorEvents?: Array<'DOMContentLoaded' | 'scroll' | 'click' | 'focus'>
  /** 采集结果上报函数 */
  report?: (d: ReportData) => void
}

// 采集数据结构如下
interface ReportData {
  /** fps 统计信息 */
  stats: Stats
  /** 触发采集的事件对象 */
  event: Event
}

interface Stats {
  /** 是否触发低 fps 条件 */
  isLow: boolean
  /** fps 样本列表 */
  samples: number[]
  /** 低 fps 样本列表 */
  lowSamples: number[]
  /** 根据帧时间推算出的屏幕额定帧率 */
  ratedFps: number
}
```
npm package: @inventory/async
Description: Promise based async utils.
Author: Jarid Margolin
Latest version: 0.0.7

<h1 align="center">async</h1>
<div align="center">
  <p>Promise based async utils.</p>
  <div>
    <a href="https://travis-ci.org/jaridmargolin/async">
      <img src="https://travis-ci.org/jaridmargolin/async.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/jaridmargolin/async">
      <img src="https://codecov.io/gh/jaridmargolin/async/branch/master/graph/badge.svg" alt="Coverage Status"/>
    </a>
    <a href="http://standardjs.com/">
      <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide">
    </a>
  </div>
  <div>
    <a href="https://npmjs.org/package/async">
      <img src="https://img.shields.io/npm/v/@inventory/async.svg" alt="NPM async package">
    </a>
    <a href="https://david-dm.org/jaridmargolin/async">
      <img src="https://david-dm.org/jaridmargolin/async.svg" alt="Dependency Status">
    </a>
    <a href="https://david-dm.org/jaridmargolin/async#info=devDependencies">
      <img src="https://david-dm.org/jaridmargolin/async/dev-status.svg" alt="devDependency Status">
    </a>
  </div>
</div>
<br>
<div align="center">
<a href="http://jaridmargolin.github.io/async">View Documentation</a>
</div>

## License

The MIT License (MIT) Copyright (c) Jarid Margolin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @inventory/debug
Description: Cross platform debugging utility.
Author: Jarid Margolin
Latest version: 0.0.3

<h1 align="center">debug</h1>
<div align="center">
  <p>Cross platform debugging utility.</p>
  <div>
    <a href="https://travis-ci.org/jaridmargolin/debug">
      <img src="https://travis-ci.org/jaridmargolin/debug.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/jaridmargolin/debug">
      <img src="https://codecov.io/gh/jaridmargolin/debug/branch/master/graph/badge.svg" alt="Coverage Status"/>
    </a>
    <a href="http://standardjs.com/">
      <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide">
    </a>
  </div>
  <div>
    <a href="https://npmjs.org/package/debug">
      <img src="https://img.shields.io/npm/v/@inventory/debug.svg" alt="NPM debug package">
    </a>
    <a href="https://david-dm.org/jaridmargolin/debug">
      <img src="https://david-dm.org/jaridmargolin/debug.svg" alt="Dependency Status">
    </a>
    <a href="https://david-dm.org/jaridmargolin/debug#info=devDependencies">
      <img src="https://david-dm.org/jaridmargolin/debug/dev-status.svg" alt="devDependency Status">
    </a>
  </div>
</div>
<br>
<div align="center">
<a href="http://jaridmargolin.github.io/debug">View Documentation</a>
</div>

## License

The MIT License (MIT) Copyright (c) Jarid Margolin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @inventory/debug-prop
Description: Easily debug property changes on an object.
Author: Jarid Margolin
Latest version: 0.0.4

<h1 align="center">debug-prop</h1>
<div align="center">
  <p>Easily debug property changes on an object.</p>
  <div>
    <a href="https://travis-ci.org/jaridmargolin/debug-prop">
      <img src="https://travis-ci.org/jaridmargolin/debug-prop.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/jaridmargolin/debug-prop">
      <img src="https://codecov.io/gh/jaridmargolin/debug-prop/branch/master/graph/badge.svg" alt="Coverage Status"/>
    </a>
    <a href="http://standardjs.com/">
      <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide">
    </a>
  </div>
  <div>
    <a href="https://npmjs.org/package/debug-prop">
      <img src="https://img.shields.io/npm/v/@inventory/debug-prop.svg" alt="NPM debug-prop package">
    </a>
    <a href="https://david-dm.org/jaridmargolin/debug-prop">
      <img src="https://david-dm.org/jaridmargolin/debug-prop.svg" alt="Dependency Status">
    </a>
    <a href="https://david-dm.org/jaridmargolin/debug-prop#info=devDependencies">
      <img src="https://david-dm.org/jaridmargolin/debug-prop/dev-status.svg" alt="devDependency Status">
    </a>
  </div>
</div>
<br>
<div align="center">
<a href="http://jaridmargolin.github.io/debug-prop">View Documentation</a>
</div>

## License

The MIT License (MIT) Copyright (c) Jarid Margolin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @inventory/rc-socket
Description: Reconnecting WebSocket.
Author: Jarid Margolin
Latest version: 5.0.0-beta.9

<h1 align="center">rc-socket</h1>
<div align="center">
  <p>Reconnecting WebSocket.</p>
  <div>
    <a href="https://travis-ci.org/jaridmargolin/rc-socket">
      <img src="https://travis-ci.org/jaridmargolin/rc-socket.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/jaridmargolin/rc-socket">
      <img src="https://codecov.io/gh/jaridmargolin/rc-socket/branch/master/graph/badge.svg" alt="Coverage Status" />
    </a>
    <a href="http://standardjs.com/">
      <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide">
    </a>
  </div>
  <div>
    <a href="https://npmjs.org/package/rc-socket">
      <img src="https://img.shields.io/npm/v/@inventory/rc-socket.svg" alt="NPM rc-socket package">
    </a>
    <a href="https://david-dm.org/jaridmargolin/rc-socket">
      <img src="https://david-dm.org/jaridmargolin/rc-socket.svg" alt="Dependency Status">
    </a>
    <a href="https://david-dm.org/jaridmargolin/rc-socket#info=devDependencies">
      <img src="https://david-dm.org/jaridmargolin/rc-socket/dev-status.svg" alt="devDependency Status">
    </a>
  </div>
</div>
<br>
<div align="center">
<a href="http://jaridmargolin.github.io/rc-socket">View Documentation</a>
</div>

## License

The MIT License (MIT) Copyright (c) Jarid Margolin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @inventory/task-queue
Description: Extensible async task queue.
Author: Jarid Margolin
Latest version: 2.0.0-beta.7

<h1 align="center">task-queue</h1>
<div align="center">
  <p>Extensible async task queue.</p>
  <div>
    <a href="https://travis-ci.org/jaridmargolin/task-queue">
      <img src="https://travis-ci.org/jaridmargolin/task-queue.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/jaridmargolin/task-queue">
      <img src="https://codecov.io/gh/jaridmargolin/task-queue/branch/master/graph/badge.svg" alt="Coverage Status"/>
    </a>
    <a href="http://standardjs.com/">
      <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide">
    </a>
  </div>
  <div>
    <a href="https://npmjs.org/package/task-queue">
      <img src="https://img.shields.io/npm/v/@inventory/task-queue.svg" alt="NPM task-queue package">
    </a>
    <a href="https://david-dm.org/jaridmargolin/task-queue">
      <img src="https://david-dm.org/jaridmargolin/task-queue.svg" alt="Dependency Status">
    </a>
    <a href="https://david-dm.org/jaridmargolin/task-queue#info=devDependencies">
      <img src="https://david-dm.org/jaridmargolin/task-queue/dev-status.svg" alt="devDependency Status">
    </a>
  </div>
</div>
<br>
<div align="center">
<a href="http://jaridmargolin.github.io/task-queue">View Documentation</a>
</div>

## License

The MIT License (MIT) Copyright (c) Jarid Margolin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @inventory/wss-manager
Description: A controllable Websocket Server interface used for testing
Author: Jarid Margolin
Latest version: 0.0.13

<h1 align="center">wss-manager</h1>
<div align="center">
  <p>A controllable Websocket Server interface used for testing</p>
  <div>
    <a href="https://travis-ci.org/jaridmargolin/wss-manager">
      <img src="https://travis-ci.org/jaridmargolin/wss-manager.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/jaridmargolin/wss-manager">
      <img src="https://codecov.io/gh/jaridmargolin/wss-manager/branch/master/graph/badge.svg" alt="Coverage Status" />
    </a>
    <a href="http://standardjs.com/">
      <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide">
    </a>
  </div>
  <div>
    <a href="https://npmjs.org/package/wss-manager">
      <img src="https://img.shields.io/npm/v/@inventory/wss-manager.svg" alt="NPM wss-manager package">
    </a>
    <a href="https://david-dm.org/jaridmargolin/wss-manager">
      <img src="https://david-dm.org/jaridmargolin/wss-manager.svg" alt="Dependency Status">
    </a>
    <a href="https://david-dm.org/jaridmargolin/wss-manager#info=devDependencies">
      <img src="https://david-dm.org/jaridmargolin/wss-manager/dev-status.svg" alt="devDependency Status">
    </a>
  </div>
</div>
<br>
<div align="center">
<a href="http://jaridmargolin.github.io/wss-manager">View Documentation</a>
</div>

## License

The MIT License (MIT) Copyright (c) Jarid Margolin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.