open-index/open-npm huggingface dataset:
npm package: @nekitk/storybook-addon-smart-knobs
Description: Automatically created knobs for storybook.
Author: Storybook Team
Latest version: 5.0.0-nekitk.6
Deprecated: this fork is no longer needed, use original package

# Fork of [storybook-addon-smart-knobs](https://www.npmjs.com/package/storybook-addon-smart-knobs) including following pull requests:
* [fix: no knobs after select](https://github.com/storybookjs/addon-smart-knobs/pull/60)
* [feat: support for react-docgen-typescript-loader](https://github.com/storybookjs/addon-smart-knobs/pull/61)
* [fix: support for nested structure](https://github.com/storybookjs/addon-smart-knobs/pull/62)
* [fix: fixed nested structure with text](https://github.com/storybookjs/addon-smart-knobs/pull/64)
* [feat/ignore-props](https://github.com/storybookjs/addon-smart-knobs/pull/65)

# Smart knobs addon for Storybook

This Storybook plugin uses `@storybook/addon-knobs` but creates the knobs automatically based on PropTypes, Flow and Typescript.

## Installation:

```
npm i storybook-addon-smart-knobs --save-dev
```

## Usage:

```js
import React from 'react'
import PropTypes from 'prop-types'
import { storiesOf } from '@storybook/react'
import { withKnobs } from '@storybook/addon-knobs'
import { withSmartKnobs } from 'storybook-addon-smart-knobs'

const Button = ({ children, onClick }) => (
  <button onClick={ onClick }>{ children }</button>
)

Button.propTypes = {
  children: PropTypes.node,
  onClick: PropTypes.func
}

storiesOf('Button')
  .addDecorator(withSmartKnobs(options))
  .addDecorator(withKnobs)
  .add('simple', () => <Button>Smart knobed button</Button>)

```

## Options

- **ignoreProps**
  
  Type: `Array`

  If you want to ignore automatically props, you can list them. Example:
  ```js
    .withSmartKnobs({ ignoreProps: ['number'] })
    .add('example' () => <div number={date('number', date)} />) 
  ```

## Configuration:

This plugin has a peer dependency on [babel-plugin-react-docgen
](https://github.com/storybooks/babel-plugin-react-docgen). As a result, `babel-plugin-react-docgen` needs to be added to your Storybook Babel configuration.

For a standard Storybook configuration, add `react-docgen` to your plugins in an appropriate `.babelrc` file.

  - [README | babel-plugin-react-docgen](https://github.com/storybooks/babel-plugin-react-docgen/blob/master/README.md)
  - [Custom Babel Config | Storybook](https://storybook.js.org/configurations/custom-babel-config/).

If you have created a `webpack.config.js` file for Storybook, you may need to configure the plugin in there.

```
module.exports = (baseConfig, env, defaultConfig) => {
  defaultConfig.module.rules[0].use[0].options.plugins = [
    require.resolve('babel-plugin-react-docgen'),
  ]

  return defaultConfig
}
```

## Typescript:

Use [react-docgen-typescript-loader](https://github.com/strothj/react-docgen-typescript-loader) to generate docgen info from Typescript types. This docgen info will be used to automatically create knobs.
npm package: @nekm/asynkit
Description: Asynkit extends the capabilities of AsyncIterable in JavaScript, providing utility methods such as map, filter, and includes that are natively available for arrays but absent for async iterables.
Author: Niklas Ekman
Latest version: 1.0.3

# Asynkit

[![Build Status](https://circleci.com/gh/Ekman/Asynkit.svg?style=svg)](https://app.circleci.com/pipelines/github/Ekman/Asynkit)

Asynkit extends the capabilities of `AsyncIterable` in JavaScript or TypeScript,
providing utility methods such as map and filter that are natively available for
arrays but not for `AsyncaIterable`. Mastering the usage of `AsyncIterable` (in
any language) is a "shortcut" to reducing your memory footprint in a neat and
tidy way.

## Installation

Install with your favorite package manager:

```bash
npm install --save @nekm/asynkit
```

## Usage

Use it with arrays:

```js
import { Asynkit } from "@nekm/asynkit";

const array = [1, 2, 3, 4, 5];

const result = await Asynkit.fromArray(array)
  .map((x) => x * 2)
  .map((x) => x + 1)
  .filter((x) => x % 2 === 0)
  .toArray();
```

Or let's assume you have a function that fetches a large dataset:

```js
import { Asynkit } from "@nekm/asynkit";

const chunks = Asynkit.create(getLotsAndLotsOfData())
  .filter((item) => item.name === "foo")
  .chunk(10);

for await (const items of chunks) {
  console.log(items); // will output 10 items at a time
}
```

If you do not want to use the class, there are functions as well:

```js
import { asynkitFromArray, asynkitMap, asynkitToArray } from "@nekm/asynkit";

const it = asynkitFromArray([1, 2, 3, 4, 5]);
const mapped = asynkitMap(it, (x) => x * 2);
const array = await asynkitToArray(mapped);
```

## Versioning

This project complies with [Semantic Versioning](https://semver.org/).

## Changelog

For a complete list of changes, and how to migrate between major versions, see
[releases page](https://github.com/Ekman/Asynkit/releases).
npm package: @nekm/core
Description: Code I find myself re-writing over-and-over.
Author: Niklas Ekman
Latest version: 1.9.1

# TypeScript Core

[![Build Status](https://circleci.com/gh/Ekman/TypeScript-Core.svg?style=svg)](https://app.circleci.com/pipelines/github/Ekman/TypeScript-Core)

Code that I find myself rewriting over and over. May as well import it from a
lib instead.

## Installation

Install with your favorite package manager:

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

## Versioning

This project complies with [Semantic Versioning](https://semver.org/).

## Changelog

For a complete list of changes, and how to migrate between major versions, see
[releases page](https://github.com/Ekman/TypeScript-Core/releases).
npm package: @nekm/svelte-core
Description: Code I find myself re-writing over-and-over, Svelte edition.
Latest version: 1.9.4

# Svelte Core

[![Build Status](https://circleci.com/gh/Ekman/Svelte-Core.svg?style=svg)](https://app.circleci.com/pipelines/github/Ekman/Svelte-Core)

Code that I find myself rewriting over and over. May as well import it from a
lib instead.

## Installation

Install with your favorite package manager:

```bash
npm install --save @nekm/svelte-core
```

## Versioning

This project complies with [Semantic Versioning](https://semver.org/).

## Changelog

For a complete list of changes, and how to migrate between major versions, see
[releases page](https://github.com/Ekman/Svelte-Core/releases).
npm package: @nekm/sveltekit-armor
Description: Zero-config OAuth protection for SvelteKit
Author: Niklas Ekman
Latest version: 0.5.1

# SvelteKit Armor

> [!IMPORTANT]
> The library is being tested in production and will be tagged `1.0.0` once I'm confident it works.

Highly opinionated, minimal config OAuth protection for [SvelteKit](https://svelte.dev/) apps. Get login working in few lines of code - no complex setup, no custom UI, just secure authentication using your own OAuth 2.0/OIDC IdP hosted UI, such as [AWS Cognito](https://aws.amazon.com/pm/cognito/) or [auth0](https://auth0.com/).

## Installation
Install with your favorite package manager:

```bash
npm install --save @nekm/sveltekit-armor @sveltejs/kit
```

## Usage

Create a `src/hooks.server.ts` and write:

```js
import { armor, armorCookieSession } from '@nekm/sveltekit-armor';

const { handle: armorHandle } = armor({
	oauth: {
		clientId: 'foo',
		clientSecret: 'bar',
		baseUrl: 'https://myapp.auth.eu-west-1.amazoncognito.com',
		issuer: 'https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_ABC123xyz',
	},
	session: armorCookieSession,
});

export const handle = armorHandle;
```

Done. Entire app now requires login.

Access the tokens:

```js
import {armorCookieSessionGet} from '@nekm/sveltekit-armor';

const tokens = armorCookieSessionGet(event.cookies);
```

For simplicity, we provide you with a default cookie session, but it is recommended to write your own session storage to store tokens in your database.

## Routes

Your app will now expose these routes:

* `/_armor/login` - Redirect the user here to initiate a login.
* `/_armor/redirect/login` - Configure your IdP to redirect here.
* `/_armor/logout` - Only if logout endpoint is configured.
* `/_armor/redirect/logout` - Only if logout endpoint is configured.

## Examples

### Protect only certain routes

Assume you only want to protect routes prefixed by `admin`. Create a `src/hooks.server.ts` and write:

```js
import { armor } from '@nekm/sveltekit-armor';

const { handle: armorHandle } = armor({ /* config */ });

export const handle = ({ event, resolve }) => {
	if (event.url.pathname.startsWith('/admin')) {
		return armorHandle({ event, resolve });
	}

	return resolve(event);
}
```

## Versioning

This project complies with [Semantic Versioning](https://semver.org/).

## Changelog

For a complete list of changes, and how to migrate between major versions, see [releases page](https://github.com/Ekman/SvelteKit-Armor/releases).

## Buy me a coffee

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/nekman)

If you appreciate my work, then consider [buying me a coffee](https://buymeacoffee.com/nekman). Donations are completely voluntary.