open-index/open-npm huggingface dataset:
npm package: @mad_gooze/swagger-yfd-markdown
Description: Create markdown API documentation from swagger file
Author: Sergii Skorokhodov
Latest version: 2.3.1

# swagger-markdown

[![npm][npm-image]][npm-url] [![circle ci][circleci-image]][circleci-url]

CLI script to turn swagger yaml into markdown files.
Supports swagger 2.0 format only

The version 2.0 is a breaking change. The project was rewritten in typescript.
Along with addressing multiple issues, it is more strict now with the openapi version. 
In case if version 3 is provided, the application will throw an error.
The support of v3 is at the roadmap, although it is possible to overcome this restriction by using --force-version flag: `--force-version 2`. It will process v3 documents as it is v2, although it may fail and it may generate the markdown with errors.
As soon as v3 support will be added, the flag will be removed.

see [examples](https://github.com/syroegkin/swagger-markdown/tree/master/examples) folder

### Installation

```bash
npm install -g swagger-markdown
```

### Usage

```
swagger-markdown [-h] [-v] -i [-o] [--skip-info]

Options:
  -h, --help      Show this help message and exit.
  -v, --version   Show program's version number and exit.
  -i , --input    Path to the swagger yaml file
  -o , --output   Path to the resulting md file
  --skip-info     Skip the title, description, version etc, whatever is in the info block.
  --force-version Set the document version, ignore version provided in the yaml file

```

### Npx (requires no installation)

```bash
npx swagger-markdown -i ./basic-auth.yaml
```

#### Example

```bash
swagger-markdown -i path/to/swagger/file.yaml
```

By default it will create the new file within the same directory with the same name as swagger file but with .md extension.
So, if swagger file is placed in `project/api-doc/swagger.yaml` the new file will be created as `project/api-doc/swagger.md`

You can also use it as a npm script in your package.json:

```bash
npm i --save-dev swagger-markdown
```

```json
{
    "scripts": {
        "md-docs": "swagger-markdown -i path/to/swagger.yaml",
        //...
    }
}
```

```bash
npm run md-docs
```

### Related

* [swagger-markdown-ui](https://swagger-markdown-ui.netlify.app/) ([source](https://github.com/shaun-chiang/swagger-markdown-ui))

[npm-url]: https://www.npmjs.com/package/swagger-markdown
[npm-image]: https://img.shields.io/npm/v/swagger-markdown.svg

[circleci-url]: https://circleci.com/gh/syroegkin/swagger-markdown/tree/master
[circleci-image]: https://img.shields.io/circleci/project/syroegkin/swagger-markdown.svg
npm package: @madappgang/action-creator
Description: A simple utility designed to make redux's action creators less verbose
Author: MadAppGang
Latest version: 1.0.6

# Redux action creator

[![Build Status](https://travis-ci.org/MadAppGang/action-creator-redux.svg?branch=master)](https://travis-ci.org/MadAppGang/action-creator-redux)
[![Coverage Status](https://coveralls.io/repos/github/MadAppGang/action-creator-redux/badge.svg?branch=master)](https://coveralls.io/github/MadAppGang/action-creator-redux?branch=master)

It is an unofficial utility function that is designed to reduce verbosity of redux action creators. It is so simple that can fit into a single line of code, but I think it's nice to have on NPM.

### Installation
```bash
npm i --save @madappgang/action-creator
```
```javascript
import actionCreator from '@madappgang/action-creator';
```

### Example
Here we have a common redux action that fetches users.
```javascript
const types = {
  FETCH_ATTEMPT: 'FETCH_ATTEMPT',
  FETCH_SUCCESS: 'FETCH_SUCCESS',
  FETCH_FAILURE: 'FETCH_FAILURE',
};

const fetchAttempt = () => ({
  type: types.FETCH_ATTEMPT,
});

const fetchSuccess = users => ({
  type: types.FETCH_SUCCESS,
  payload: users,
});

const fetchFailure = err => ({
  type: types.FETCH_FAILURE,
  payload: err,
});

export const fetchUsers = () => async (dispatch) => {
  dispatch(fetchAttempt());

  try {
    ...
    dispatch(fetchSuccess(users));
  } catch (err) {
    dispatch(fetchFailure(err));
  }
};
```

Actions creators look pretty verbose, and you may have a lot of those in each file. Here's what we can do.

```javascript
import actionCreator from 'action-creator-redux';

...

const fetchAttempt = actionCreator(types.FETCH_ATTEMPT);
const fetchSuccess = actionCreator(types.FETCH_SUCCESS);
const fetchFailure = actionCreator(types.FETCH_FAILURE);

...

```

The rest of the code remains the same. This approach implies that you adhere to unified structure of redux action. It means that all the data the action holds is put inside the **payload** property.
```javascript
const fetchSuccess = actionCreator(types.FETCH_SUCCESS);
fetchSuccess('This is payload');
// { type: 'FETCH_SUCCESS', payload: 'This is payload' }
```

There is nothing more to it.

### LICENSE
This project is licensed under the MIT License - see the LICENSE file for details.
npm package: @madappgang/identifo-js
Description: Library for web-auth through Identifo
Author: MadAppGang
Latest version: 2.0.2

# IdentifoJS
Browser library for authentication through [Identifo](https://github.com/madappGang/identifo).

## Install
```bash
$ npm install @madappgang/identifo-js
```

## Usage

The pacakge exports the only function that will initialize identifo client.
```javascript
  import initIdentifo from '@madappgang/identifo-js';

  const options = {
    authServerURI: 'http://localhost:8080', // URI of your Identifo server.
    appId: '59fd884d8f6b180001f5b4e3', // ID of application that you want to get access to.
    scopes: ['chat'], // Scopes that you want to request.
    callbackURL: 'http://localhost:3000/callback', // URL that you will be redirected to after a successful login.
  };

  const identifo = initIdentifo(options);
```

### Methods

- **identifo.login** redirects user to the login page
- **identifo.handleAuthentication** parses token from url, you should call it when you are at *callback_url*.
```javascript
  const { body, token } = identifo.handleAuthentication();
```

- **identifo.renewSession** obtains a new access token for a user who already has established SSO session.

```javascript
  identifo.renewSession()
    .then(({ token, body }) => { });
    .catch(() => identifo.login()) // If there's an error you should try to login, probably user hasn't established SSO session.
```
- **identifo.register** redirects user to the registration page.
- **identifo.logout** removes SSO session.
npm package: @madappgang/react-selections
Description: Interactive area selections for react apps
Author: Denys Provodnikov, Mark Salabutin [https://madappgang.com]
Latest version: 2.1.9

# React Selections
[![Build Status](https://travis-ci.org/MadAppGang/react-selections.svg?branch=master)](https://travis-ci.org/MadAppGang/react-selections)
[![Coverage Status](https://coveralls.io/repos/github/MadAppGang/react-selections/badge.svg?branch=master)](https://coveralls.io/github/MadAppGang/react-selections?branch=master)

This is a library that provides a set of tools for drawing regions with cursor.

![Example](https://image.ibb.co/mfodSJ/ezgif_com_gif_maker.gif "Example")

## Installation

```bash
npm install --save @madappgang/react-selections
```

## Usage

You need to specify an area for the selections to be rendered inside of. Selections can't be drawn outside the container. The package provides a container component, which you should use to render as a parent node to your selections (and other components as well).

```javascript
import { Selection, SelectionContainer } from '@madappgang/react-selections';
```

You then simply wrap your area that you want to render selections above in the container:

```javascript

const selectionArea = {
  id: 1,
  dimensions: {
    height: 150,
    width: 300
  },
  coordinates: {
    x: 100,
    y: 100
  },
};

...
<SelectionContainer>
  <Selection
    area={selectionArea}
    className="my-selection"
  />
  ...
  <AnyOtherComponent />
  ...
</SelectionContainer>
...
```

As you see you can render anything inside the container, it will recognize selections inside and pass them special props.

### Interactive selections

If you need a selection to be draggable/resizable you need to specify it explicitly with an *interactive* boolean property.

```javascript
<Selection interactive area={area} />
```

Then you have to provide a handler that is going to handle area updates.

```javascript
...

constructor() {
  ...

  this.state = {
    selectionArea: { ... },
  };
}

...

handleSelectionAreaUpdate(selectionArea) {
  this.setState({ selectionArea });
}

render() {
  return (
    <SelectionContainer>
      ...
      <Selection
        interactive
        area={this.selectionArea}
        onAreaUpdate={this.handleSelectionAreaUpdate}
      />
    </SelectionContainer>
  );
}

...
```

...
npm package: @madappgang/react-steps
Description: A super straight-forward tool for declarative steps rendering for react apps
Author: Denys Provodnikov
Latest version: 1.1.0

# React steps

This component introduces an approach to rendering a sequence of components (steps) and collecting the data each component submits. The main idea is that each of "step" components is not aware of any others.

This is useful for multi-step forms, sequenced flows, etc.

## Install

```bash
$ npm i @madappgang/react-steps
```

## Usage

```javascript
import Steps from '@madappgang/react-steps';

const OnboardingForm = function () {
  const handleStepsCompletion = function (results) {
    console.log(results); // [1, 2, 3]
  };

  return (
    <Steps onComplete={handleStepsCompletion}>
      <FirstStep data={1} />
      <SecondStep data={2} />
      <ThirdStep data={3} />
    </Steps>
  );
};
```

Each step component will be assigned a set of special props that can be used inside them. Here's the list of those props:

| Property | Type | Description
| --- | --- | --- |
| done | function | Should be called when it's time to transition to the next step. Any data can be passed as an argument. This data will then be collected and passed to `onComplete` callback of the steps container |
| goBack | function | Should be called to go a step back. No arguments expected |

Once the last step submits it's completion the `onComplete` function will be called on the steps container.
As a first argument there is going to be passed an array containing the data that was submitted by each of the steps. Just take a closer look at the code example up above.

## Build

Install dependencies
```bash
$ npm i
```

Run tests
```bash
$ npm run test
```

Build
```
$ npm run build
```

The output will appear in the `dist` folder in the project's root.

## License
MIT
npm package: @madappgang/time-input
Description: time input for react applications
Author: Denys Provodnikov [MadAppGang]
Latest version: 1.0.8

# React time input

Smart time input for react applications

![Example](https://i.ibb.co/kmDcn6n/ezgif-com-video-to-gif.gif)

## Installation

```bash
$ npm install @madappgang/time-input
```

## Usage example

You provide your own input representation using render props

```javascript
import TimeInput from '@madappgang/time-input';

...

this.state = {
  time: { hours: 0, minutes: 0, prefix: 'am' }, // i/o time format
};

return (
  <TimeInput
    time={this.state.time}
    onChange={time => this.setState({ time })} // { hours, minutes, prefix }
  >
    {({ value, onChange, onKeyDown, onBlur }) => (
      <input
        value={value}
        onChange={onChange}
        onKeyDown={onKeyDown}
        onBlur={onBlur}
      />
    )}
  </TimeInput>
);
```

## Available props

| Prop | Type | Description |
|:----:|:----:|:-----------:|
| value | String | The intermediate input value |
| invalid | Bool | The input value validity indicator |
| onChange | Func | Input value change event handler |
| onKeyDown | Func | Input value keyDown event handler |
| onBlur | Func | Input value blur event handler |


### License
MIT
npm package: @madarche/donottrack
Description: Module to check the value of the DNT header
Author: Guylian Cox
Latest version: 2.0.0

# do-not-track

Accessing the user's preferences in terms of tracking can be slightly
complicated. This module simplifies that.

[Read the spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/DNT)

## Install

`npm install --save donottrack`

## Usage

Browser:

```javascript
import doNotTrack from 'donottrack';

// Returns true if the user does not want to be tracked, false otherwise,
// tracking allowed if nothing specified.
const dnt = doNotTrack();
```

```javascript
// Returns true if the user does not want to be tracked, false otherwise,
// NO TRACKING allowed if nothing specified.
const dnt = doNotTrack(true);
```

Node.js:

```javascript
const donottrack = require('donottrack').default;

// Returns true if the user does not want to be tracked, false otherwise,
// tracking allowed if nothing specified.
const dnt = doNotTrack(req.headers);
```

```javascript
// Returns true if the user does not want to be tracked, false otherwise,
// NO TRACKING allowed if nothing specified.
const dnt = doNotTrack(req.headers, true);
```