open-index/open-npm huggingface dataset:
npm package: @skia-id/sdk
Description: Skia ID OAuth 2.1 / OIDC client SDK — anonymous identity verification for websites
Latest version: 0.1.1

# @skia-id/sdk

OAuth 2.1 / OIDC client SDK for [Skia ID](https://skiaid.org) — anonymous identity verification for websites.

Users verify their age once, then sign into your site with a privacy-preserving proxy identity. No passwords, no personal data exposed.

## Install

```bash
npm install @skia-id/sdk
```

## Quick Start

```ts
import { SkiaOAuthClient } from "@skia-id/sdk";

const skia = new SkiaOAuthClient({
  clientId: "your-client-id",       // from dev.skiaid.org
  redirectUri: "https://yourapp.com/callback",
  scopes: ["openid", "email", "age"],
});

// 1. Redirect user to Skia login
await skia.login();

// 2. On your callback page — exchange the code for tokens
const tokens = await skia.handleCallback();

// 3. Get user info
const user = await skia.getUserInfo(tokens.access_token);
// { sub: "unique-per-site", email: "ab12cd@pyle.skiaid.org",
//   name: "CosmicBadger", age_over_18: true }
```

## Configuration

```ts
new SkiaOAuthClient({
  clientId: string;        // Required — OAuth client ID
  redirectUri: string;     // Required — must match registered URI
  scopes?: string[];       // Default: ["openid", "email"]
  apiUrl?: string;         // Default: "https://oauth.skiaid.org"
  usePKCE?: boolean;       // Default: true (recommended for SPAs)
});
```

## Available Scopes

| Scope | Claims |
|-------|--------|
| `openid` | `sub` (unique pairwise identifier) |
| `email` | `email`, `email_verified` |
| `profile` | `name` (pseudonym) |
| `age` | `age_over_18` |

## API

| Method | Description |
|--------|-------------|
| `login()` | Redirect to Skia authorization |
| `handleCallback(clientSecret?)` | Exchange auth code for tokens |
| `getUserInfo(accessToken)` | Fetch user claims |
| `decodeIdToken(idToken)` | Decode JWT payload (client-side, no verification) |
| `getEndpoints()` | Get all OAuth/OIDC endpoint URLs for the configured issuer |

## Endpoint Discovery

The SDK exports `SKIA_ISSUER` and a `getEndpoints()` helper so you never need to hardcode URLs:

```ts
import { SKIA_ISSUER, SkiaOAuthClient } from "@skia-id/sdk";

// Use the issuer for OIDC auto-discovery
// SKIA_ISSUER === "https://oauth.skiaid.org"

// Or get all endpoints programmatically
const skia = new SkiaOAuthClient({ clientId: "...", redirectUri: "..." });
const endpoints = skia.getEndpoints();
// { issuer, authorization, token, userinfo, revocation, jwks, discovery }
```

## Register Your App

Create OAuth credentials at [dev.skiaid.org](https://dev.skiaid.org).

## License

MIT
npm package: @skiano/ng-tools
Description: Basic tools for building an Angular app
Author: Greg Skiano
Latest version: 1.0.6

# ng-tool

### Installation

```
$ npm install @skiano/ng-tools --save-dev
```

### Setup

The tool by default expects the following layout:

```
  package.json
  tslint.json
  -- src
     -- main.ts (Entry to angular app)
     -- index.html (Markup for angular app)
    
```

In your package.json file make sure you have the following:

### Create a tslint.json with the following

```json
{
  "extends": ["@skiano/ng-tools/tslint.json"]
}
```

```json
{
  "scripts": {
    "postinstall": "npm run webdriver",
    "start": "ng-tool serve",
    "build": "ng-tool build",
    "test": "ng-tool test",
    "e2e": "ng-tool e2e",
    "lint": "ng-tool lint",
    "postinstall": "npm run webdriver",
    "webdriver": "webdriver-manager update --standalone false --gecko false"
  },
  "dependencies": {
    "@angular/common": "~2.4.0",
    "@angular/compiler": "~2.4.0",
    "@angular/core": "~2.4.0",
    "@angular/forms": "~2.4.0",
    "@angular/http": "~2.4.0",
    "@angular/platform-browser": "~2.4.0",
    "@angular/platform-browser-dynamic": "~2.4.0",
    "@angular/router": "~3.4.0",
    "core-js": "^2.4.1",
    "rxjs": "5.0.1",
    "zone.js": "^0.7.4"
  },
  "devDependencies": {
    "@types/jasmine": "^2.5.35",
    "@types/node": "^6.0.45",
    "protractor": "^5.0.0",
    "@skiano/ng-tools": "^1.0.0"
  }
}

```
npm package: @skidder/bits-auto-discovery
Description: A BITS library to facilitate auto discovery of resources.
Author: Kevin Dyer
Latest version: 1.0.2

# BITS auto-discovery
A BITS library to facilitate auto discovery of resources.

## How to use a `ResourceManager`
``` javascript
const {ResourceManager} = require('../..');

class ModuleApp {
  constructor() {
    this._numbersResources = new ResourceManager({topic: 'numbers'});
    this._numbersResources.on('add', (res) => {
      console.log(`New 'numbers' resource: ${res.getUuid()}`);
      res.on('value', (value) => console.log(`Resource ${res.getUuid()} changed value:`, value));
    });
  }

  load(messageCenter) {
    return this._numbersResources.load(messageCenter);
  }

  unload() {
    return this._numbersResources.unload();
  }
}
```

## How to use a `LocalResource`
``` javascript
const {LocalResource} = require('../..');

class ModuleApp {
  constructor() {
    this._resource = new LocalResource({topic: 'numbers', value: -1});
    this._interval = null;
  }

  load(messageCenter) {
    return Promise.resolve()
      .then(() => this._resource.load(messageCenter))
      .then(() => {
        this._interval = setInterval(() => {
          const num = this._getRandomInt();
          this._resource.setValue(num);
        }, 2000);
      });
  }

  unload() {
    return Promise.resolve()
      .then(() => {
        clearInterval(this._interval);
        this._interval = null;
      })
      .then(() => this._resource.unload());
  }

  _getRandomInt({min=0, max=100}={}) {
    return Math.floor(Math.random() * (max - min) + min);
  }
}
```
npm package: @skidder/bits-crypto
Description: This is a node module implementation of BITS encrypt/decrypt.
Author: Kevin Dyer
Latest version: 1.0.0

# node-bits-crypto
This is a node module implementation of BITS encrypt/decrypt.

### Install
``` bash
npm install @skidder/bits-crypto
```

### Encrypt data
``` javascript
const {Encrypter} = require('@skidder/bits-crypto');

const encryptionKey = getPublicEncryptionKey();
const signatureKey = getPrivateSignatureKey();

const encrypter = new Encrypter();
Promise.resolve()
  .then(() => encrypter.encrypt({
    input: fs.createReadStream('data.txt'),
    output: fs.createWriteStream('data.txt.enc'),
    encryptionKey: encryptionKey,
    signatureKey: signatureKey,
    filename: 'data.txt',
  })
  .then((signature) => {
    const output = fs.createWriteStream('data.txt.enc', {start: 0, end: 512, flags: 'r+'})
    output.write(signature);
    output.end();
  });
```

### Decrypt data
``` javascript
const {Decrypter} = require('@skidder/bits-crypto');

const encryptionKey = getPrivateEncryptionKey();
const signatureKey = getPublicSignatureKey();

const decrypter = new Decrypter();
Promise.resolve()
  .then(() => decrypter.decrypt({
    input: fs.createReadStream('data.txt.enc'),
    output: fs.createWriteStream('data.txt'),
    encryptionKey: encryptionKey,
    signatureKey: signatureKey,
  });
```

### CLI
This module also provides two scripts to encrypt and decrypt data from the command line. See the help for command details.
``` bash
npm install -g @skidder/bits-crypto
encrypt-data -t data.txt -e foo-key.pub -s mine-key.pem
decrypt-data -t data.enc -e foo-key.pem -s mine-key.pub
```
npm package: @skidding/async-retry
Description: Wait until cb doesn't throw or time out
Author: Ovidiu Cherecheș
Latest version: 4.0.0

# async-retry

[![ci status](https://github.com/skidding/async-retry/actions/workflows/test.yml/badge.svg)](https://github.com/skidding/async-retry/actions/workflows/test.yml)
[![coverage status](https://codecov.io/gh/skidding/async-retry/graph/badge.svg)](https://codecov.io/gh/skidding/async-retry)

Wait until cb doesn't throw or time out.

Install [`@skidding/async-retry`](https://www.npmjs.com/package/@skidding/async-retry).

### Why not [zeit/async-retry](https://github.com/zeit/async-retry)?

I use this package for testing async behavior where running times are sensitive. What's different here?

- No exponential backoff strategy
- Callback is ran immediately
- Default loop interval is minimal
- Default timeout is less than a usual test timeout

These settings minimize the time spent waiting and don't require custom options in most cases. They work for tests because assertion execution is usually cheap (I think ¯\\\_(ツ)\_/¯).

## Usage

```js
retry(callback: Function, options: Object): Promise
```

See [async-until](https://github.com/skidding/async-until) for available options.

```js
await retry(() => {
  expect(onChange).toHaveBeenCalledWith({ count: 3 });
});
```
npm package: @skidding/babel-plugin-inline-react-svg
Description: A babel plugin that optimizes and inlines SVGs for your react components.
Author: Jordan Gensler
Latest version: 0.2.1

# babel-plugin-inline-react-svg

Transforms imports to SVG files into React Components, and optimizes the SVGs with [SVGO](https://github.com/svg/svgo/).

For example, the following code...

```jsx
import React from 'react';
import CloseSVG from './close.svg';

const MyComponent = () => <CloseSvg />;
```

will be transformed into...

```jsx
import React from 'react';
const CloseSVG = () => <svg>{/* ... */}</svg>;

const MyComponent = () => <CloseSvg />;
```

## Installation

```
npm install --save-dev babel-plugin-inline-react-svg
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": [
    "inline-react-svg"
  ]
}
```

#### Options

- *`ignorePattern`* - A pattern that imports will be tested against to selectively ignore imports.

### Via CLI

```sh
$ babel --plugins inline-react-svg script.js
```

### Via Node API


```javascript
require('babel-core').transform('code', {
  plugins: ['inline-react-svg']
}) // => { code, map, ast };
```

---

Inspired by and code foundation provided by [react-svg-loader](https://github.com/boopathi/react-svg-loader).
npm package: @skidding/linked-list
Description: Turn an array into a stateless linked list
Author: Ovidiu Cherecheș
Latest version: 2.0.0

# linked-list

[<img src="https://img.shields.io/circleci/project/github/skidding/linked-list.svg" alt="CircleCI" />](https://circleci.com/gh/skidding/linked-list) [<img src="https://codecov.io/gh/skidding/linked-list/branch/master/graph/badge.svg" alt="Codecov" />](https://codecov.io/gh/skidding/linked-list)

Turn an array into a stateless linked list.

`npm install @skidding/linked-list` or `yarn add @skidding/linked-list`

[See test file](src/index.test.js) for usage.
npm package: @skidding/react-images
Description: A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS
Author: Joss Mackison
Latest version: 1.0.1

# React Images

A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS.

### Getting Started

Start by installing `react-images`

```bash
npm install react-images
```
or
```bash
yarn add react-images
```

**If you were using `0.x` versions:** library was significantly rewritten for `1.x` version and contains several breaking changes.
The best way to upgrade is to read the docs and follow the examples.

### Using the Carousel

Import the carousel from `react-images` at the top of a
component and then use it in the render function.

```jsx
import React from 'react';
import Carousel from 'react-images';

const images = [{ src: 'path/to/image-1.jpg' }, { src: 'path/to/image-2.jpg' }];

class Component extends React.Component {
  render() {
    return <Carousel views={images} />;
  }
}
```

### Using the Modal

Import the modal and optionally the modal gateway from
`react-images` at the top of a component and then use it in
the render function.

The `ModalGateway` will insert the modal just before the
end of your `<body />` tag.

```jsx
import React from 'react';
import Carousel, { Modal, ModalGateway } from 'react-images';

const images = [{ src: 'path/to/image-1.jpg' }, { src: 'path/to/image-2.jpg' }];

class Component extends React.Component {
  state = { modalIsOpen: false };
  toggleModal = () => {
    this.setState(state => ({ modalIsOpen: !state.modalIsOpen }));
  };
  render() {
    const { modalIsOpen } = this.state;

    return (
      <ModalGateway>
        {modalIsOpen ? (
          <Modal onClose={this.toggleModal}>
            <Carousel views={images} />
          </Modal>
        ) : null}
      </ModalGateway>
    );
  }
}
```