open-index/open-npm huggingface dataset:
npm package: @jschlesser/d1
Description: Workers D1 module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers
Author: Glen Maddern
Latest version: 2.12.2

# `@jschlesser/d1`

A temporary package for testing a fix in the @miniflare/d1 library when running
in jest tests in the authjs framework. This is not the droid you are looking
for. Check out @miniflare/d1 for your d1 needs.
npm package: @jschmold/kor
Description: `npm i mocha ts-node typedoc typescript --global`
Author: Jonathan Schmold
Latest version: 0.0.8

# Initial Setup

`npm i mocha ts-node typedoc typescript --global`


# Configuration
File: config.yaml

| key   | description | values | required? |
| ----: | ----------- | ------ | --------- |
| mode | Select the mode that the application is to run in. Also affects the database suffix names. (`dbsource.development.yaml`), default is development | "production", "development" | no |
| port | The port that the server will run on. Default 8080 | Any valid port number | no |
| dataConfigs | The directory of the database configuration yamls | a directory string | no |
| dataSources | The data sources to be loaded into the data connections module. These should align with filenames in the data sources directory | string[] | yes |
| verbosity | The level of logging to permit. Default is warn. | debug, log, info, warn, error, none | no |
| secret | The API secret key to use for the cookie-parser and csrf protection. | any string | yes | 

# Modules

Modules are a whole helluva lot like Angular. I built the config this way to enable some sense of familiarity for Angular Developers, and to make it a little easier to manage the whole process of modularizing server applications.

```
import { ApplicationModule } from '@jschmold/kor';
// import your models here
// import your controllers here

@ApplicationModule(
  models: [
    // models here
  ],
  controllers: [
    // controllers here
  ]
)
export class MyApplicationModule {
  
}
npm package: @jschmold/sessions
Description: A mini library intended to simplify how user sessions are managed
Author: Jonathan Schmold
Latest version: 0.0.1

# node-sessions -- @jschmold/sessions

## Aim
To create a user-session minilib that handles user sessions

## How does it work?
Guessing one long string can be pretty hard, but what if an attacker gets it right? They'd only have to generate a single string and they'd be in.
Even worse, what happens if a single-key session string is compromised?

This library handles sessions by requiring an end-user to know two things. They must know their persistent session id, and they must know their 
transient id. The persistent session id is how you'd go about recognizing a specific device, or a session in general. The transient is how you 
know that the user is actually the one doing the requests. Every time the user makes a request, you should call the `next` function on the 
session, save the new token, and inform the user what their new session token is. The session token string contains multiple pieces of data,
adding to the overall authentication. If one piece of data is lost, it's not a valid session and the user must log in again.

## How to use this library

If you are using strings across everything, this mini-lib is plug and play.

```
let myUserSession = new Session('the_users_id');
```

If you are looking to save a session, do something like this

```
sessionId = myUserSession.sessionToken;
```

If you are looking to validate a session

```
myUserSession.validate(inputUserId, inputSessionTokenString); // returns true or false
// if validated, do this
myUserSession.next();
// save new token in database
// return token to user
```

## What about userIds of different kinds?

This one's pretty easy. This is assuming you're using ObjectID

```
function idCompare(item1: ObjectID, item2: ObjectID) {
  return item1.toHexString() === item2.toHexString();
}
Session.setIdComparator(idCompare);
```

## What if I am paranoid and want to have longer transient/persistent ids for my token?

This one is also pretty easy.

To set the transient id generator `DToken.setTransientGenerator(yourStringGenerator)`, and to set the persistent: `DToken.setPersistentGenerator(yourStringGenerator)`.

## How do I generate documentation?

Run `npm i -g typedoc`, then `npm run gendocs`
npm package: @jschmold/users
Description: A package to handle user accounts in a server-sided application
Author: Jonathan Schmold
Latest version: 0.0.7


Password hash rounds are stored in the application
If you increase the hash rounds, use the 'Created' date to determine hash rounds, and to suggest resets to users

Testing methodology
```
  $method -- A static/class method
  #method -- An instance method
```

The easiest way to remember how this library works is this. Instance methods are written to modify `this` instance, and
class methods are written to return something.

For example. Lets say you're more of an object oriented programmer. You can work it like this

```
let myInstance = className.fromObject()
myInstance.doModification();
saveInDatabase(myInstance);
```

Or, if you're more functional

```
let obj = loadFromDatabase(/*query*/)
    obj = className.PerformModification(obj);
saveInDatabase(obj);

// or

saveInDatabase(
  className.PeformModification(
    loadFromDatabase({
      // query
    })
  )
);
```
npm package: @jschofield/code-highlight
Description: Syntax highlighting web component built with Lit and highlight.js
Author: Jim Schofield
Latest version: 0.3.0

# @jschofield/code-highlight

Syntax highlighting web component built with [Lit](https://lit.dev/) and [highlight.js](https://highlightjs.org/). Supports line activation/dimming for pedagogical code walkthroughs.

## Install

```bash
npm install @jschofield/code-highlight
```

### Peer dependencies

This component requires the following peer dependencies:

```bash
npm install lit prettier
```

| Peer | Version |
|---|---|
| `lit` | `^3.0.0` |
| `prettier` | `^3.0.0` |

## Usage

```html
<script type="module">
  import '@jschofield/code-highlight';
</script>

<code-highlight lang="javascript" line-numbers active-lines="2-4">
  <template>
    <script>
      const greeting = "hello";
      console.log(greeting); // highlighted
      const unused = "dim";  // highlighted
    </script>
  </template>
</code-highlight>
```

### HTML content

```html
<code-highlight lang="html">
  <template>
    <div>
      <h1>My heading</h1>
    </div>
  </template>
</code-highlight>
```

### CSS content

```html
<code-highlight lang="css">
  <template>
    <style>
      body { color: red; }
    </style>
  </template>
</code-highlight>
```

### Without a bundler

If you're not using a bundler, provide peer dependencies via an import map:

```html
<script type="importmap">
{
  "imports": {
    "lit": "https://esm.run/lit",
    "lit/": "https://esm.run/lit/",
    "prettier/standalone": "https://esm.run/prettier/standalone",
    "prettier/plugins/": "https://esm.run/prettier/plugins/"
  }
}
</script>
<script type="module" src="https://esm.run/@jschofield/code-highlight"></script>
```

## Attributes

| Attribute | Type | Default | Description |
|---|---|---|---|
| `lang` | `string` | `"html"` | Language for syntax highlighting (`html`, `javascript`, `typescript`, `tsx`, `jsx`, `css`) |
| `dont-pretty` | `boolean` | `false` | Disable Prettier auto-formatting |
| `line-numbers` | `boolean` | `false` | Show line numbers in the gutter |
| `active-lines` | `string` | `""` | Comma/range-separated line numbers to highlight (e.g., `"1,3-5,8"`) |

## JavaScript API

```js
const el = document.querySelector('code-highlight');

el.setActiveLines('2-4,7');  // highlight specific lines
el.clearActiveLines();       // remove all highlighting
el.getFirstActiveLine();     // get DOM ref to first active line
el.getScrollContainer();     // get the scrollable container
```

## License

MIT
npm package: @jschofield/quick-search
Description: Site-wide search web component built with Lit and Fuse.js
Author: Jim Schofield
Latest version: 0.3.0

# @jschofield/quick-search

A Cmd+K search modal web component built with [Lit](https://lit.dev/) and [Fuse.js](https://www.fusejs.io/). Provides fuzzy search over page content with keyboard navigation.

## Install

```bash
npm install @jschofield/quick-search
```

### Peer dependencies

This component requires the following peer dependency:

```bash
npm install lit
```

| Peer | Version |
|---|---|
| `lit` | `^3.0.0` |

## Usage

```html
<script type="module">
  import '@jschofield/quick-search';
</script>

<quick-search></quick-search>
```

### Without a bundler

If you're not using a bundler, provide peer dependencies via an import map:

```html
<script type="importmap">
{
  "imports": {
    "lit": "https://esm.run/lit",
    "lit/": "https://esm.run/lit/"
  }
}
</script>
<script type="module" src="https://esm.run/@jschofield/quick-search"></script>
```

No attributes needed — drop it in and it works.

## How it works

1. Fetches `/search-data.json` on first open
2. Fuzzy-searches by title, excerpt, and categories
3. Results link directly to matching pages

### Data format

The component expects a JSON file at `/search-data.json` with this shape:

```json
[
  {
    "title": "My Post Title",
    "excerpt": "A brief description...",
    "url": "/posts/my-post/",
    "categories": ["javascript", "web-components"]
  }
]
```

## Keyboard shortcuts

| Key | Action |
|---|---|
| `Cmd+K` / `Ctrl+K` | Open search |
| `Escape` | Close search |
| `Enter` | Navigate to selected result |
| Type to search | Fuzzy match across title, excerpt, categories |

## License

MIT
npm package: @jschofield/reading-list
Description: Reading list web component built with Lit
Author: Jim Schofield
Latest version: 0.3.0

# @jschofield/reading-list

A reading list / book tracker web component built with [Lit](https://lit.dev/). Fetches book data from an API and renders an interactive, filterable, sortable table.

## Install

```bash
npm install @jschofield/reading-list
```

### Peer dependencies

This component requires the following peer dependency:

```bash
npm install lit
```

| Peer | Version |
|---|---|
| `lit` | `^3.0.0` |

## Usage

```html
<script type="module">
  import '@jschofield/reading-list';
</script>

<reading-list></reading-list>

<!-- Custom API endpoint: -->
<reading-list api-endpoint="/api/my-books"></reading-list>
```

### Without a bundler

If you're not using a bundler, provide peer dependencies via an import map:

```html
<script type="importmap">
{
  "imports": {
    "lit": "https://esm.run/lit",
    "lit/": "https://esm.run/lit/"
  }
}
</script>
<script type="module" src="https://esm.run/@jschofield/reading-list"></script>
```

## Attributes

| Attribute | Type | Default | Description |
|---|---|---|---|
| `api-endpoint` | `string` | `"/.netlify/functions/reading-list"` | URL returning the books JSON |

## API response format

```json
{
  "books": [
    {
      "name": "Dune",
      "author": "Frank Herbert",
      "series": "Dune",
      "status": "Finished",
      "finished": "2024-03-15",
      "notes": "Incredible worldbuilding",
      "grade": "A+",
      "year": 2024
    }
  ]
}
```

## Features

- Search by book name, author, or series
- Filter by status, year, grade, and series
- Sortable columns (click headers to toggle)
- Color-coded grade and status badges
- "Clear All Filters" button
- Responsive table layout

## License

MIT
npm package: @jschofield/scroll-explain
Description: Scroll-driven explanation web component built with Lit, uses code-highlight
Author: Jim Schofield
Latest version: 0.3.0

# @jschofield/scroll-explain

A scroll-driven code walkthrough web component built with [Lit](https://lit.dev/). Creates a two-column layout where prose explanations on the left drive line highlighting in a sticky code block on the right. Pairs with [`@jschofield/code-highlight`](https://www.npmjs.com/package/@jschofield/code-highlight).

## Install

```bash
npm install @jschofield/scroll-explain @jschofield/code-highlight
```

### Peer dependencies

This component requires the following peer dependency:

```bash
npm install lit
```

| Peer | Version |
|---|---|
| `lit` | `^3.0.0` |

## Usage

```html
<script type="module">
  import '@jschofield/scroll-explain';
  import '@jschofield/code-highlight';
</script>

<scroll-explain>
  <div slot="prose">
    <p>Here's how this function works:</p>

    <explain-section lines="1-3">
      <p>First, we set up the variables...</p>
    </explain-section>

    <explain-section lines="5-8">
      <p>Then we process each item in the loop...</p>
    </explain-section>

    <explain-section lines="10-12">
      <p>Finally, we return the result.</p>
    </explain-section>
  </div>

  <code-highlight lang="javascript" slot="code" line-numbers>
    <template>
      <script>
        const items = getData();
        const results = [];
        let count = 0;

        for (const item of items) {
          const processed = transform(item);
          results.push(processed);
          count++;
        }

        console.log(`Processed ${count} items`);
        return results;
      </script>
    </template>
  </code-highlight>
</scroll-explain>
```

### Without a bundler

If you're not using a bundler, provide peer dependencies via an import map:

```html
<script type="importmap">
{
  "imports": {
    "lit": "https://esm.run/lit",
    "lit/": "https://esm.run/lit/"
  }
}
</script>
<script type="module" src="https://esm.run/@jschofield/scroll-explain"></script>
<script type="module" src="https://esm.run/@jschofield/code-highlight"></script>
```

## Slots

| Slot | Content |
|---|---|
| `prose` | Container with text and `<explain-section>` elements |
| `code` | A `<code-highlight>` element with `line-numbers` |

## `<explain-section>` attributes

| Attribute | Type | Default | Description |
|---|---|---|---|
| `lines` | `string` | `""` | Line spec to highlight when this section is visible (e.g., `"1-3,5,7-9"`) |

## How it works

As the user scrolls, an IntersectionObserver detects which `<explain-section>` is visible and tells the `<code-highlight>` element to activate the corresponding lines. The code block smoothly scrolls to keep the active lines centered.

## Responsive behavior

- **Desktop (>900px):** Two-column grid. Code sticks to the right side.
- **Mobile (<900px):** Code sticks to the top of the viewport. Prose scrolls below.

## License

MIT
npm package: @jscholar/material-table-core
Description: Datatable for React based on https://material-ui.com/api/table/ with additional features
Author: Mehmet Baran, @material-table/core contributors
Latest version: 4.3.11

<div align="center">
  <!-- Title -->
  <h1>@material-table/core</h1>
  <!-- Subtitle : a fork of mbrn/material-table -->
  <h4>
    a fork of 
    <code>
      <a 
        target="_blank" 
        rel="noopener noreferrer"
        href="https://material-table.com"
      >
        mbrn/material-table
      </a>
    </code>
  </h4>
  <!-- * Badges * -->
  <p>
    <section>
      <!-- build status -->
      <a href="https://github.com/material-table-core/core/actions?query=workflow%3ABuild">
        <img 
          title="Build" 
          src="https://github.com/material-table-core/core/workflows/Build/badge.svg?branch=master"
        >
      </a>
      <!-- publish status -->
      <!--
      <a href="https://github.com/material-table-core/core/actions?query=workflow%3APublish">
        <img 
          title="Publish" 
          src="https://github.com/material-table-core/core/workflows/Publish/badge.svg"
        >
      </a>
      -->
      <!-- npm package -->
      <a href="https://www.npmjs.com/package/@material-table/core">
        <img 
          title="npm_package" 
          src="https://badge.fury.io/js/%40material-table%2Fcore.svg"
        >
      </a>
    </section>
    <section>
      <!-- discord -->
      <a href="https://discord.gg/uMr8pKDu8n">
        <img 
           alt="Discord" 
           src="https://img.shields.io/discord/796859493412765697?label=discord"
         >
      </a>    
    </section>
  </p> 
  <!-- ^^^ end badges ^^ -->
  
  Please review our [roadmap](https://github.com/material-table-core/core/wiki/Roadmap)!
  
💾 [Installation](https://material-table-core.com/docs/#installation) 🎉 [Usage](https://material-table-core.com/docs/#basic-usage) 
✅ [Why does this repo exist?](https://material-table-core.com/docs/about) 🚧 [Documentation](https://material-table-core.com/docs) ⚙️ [Demos](https://material-table-core.com/demos)
</div>

# Contributing

Thanks for taking interest in contributing! :rocket: In being a community based repository, we wouldn't be here without you!

**Urgent items include**:

- Get rid of [`data-manager.js`](https://github.com/material-table-core/core/blob/master/src/utils/data-manager.js) (which is a homegrown global state manager of sorts) and integrate [React context](https://github.com/material-table-core/core/tree/context/src/store) via the `context` branch
- Documentation over at [`material-table-core/website`](https://github.com/material-table-core/website)
- Implementing tests via Jest
npm package: @jschr/lambda-response
Description: Express-like API for sending responses from Lambda Integration Proxy to API Gateway and a CLI for local development.
Author: Jordan Schroter
Latest version: 0.1.8

# lambda-response

[![npm](https://img.shields.io/npm/v/@jschr/lambda-response.svg)](https://www.npmjs.com/package/@jschr/lambda-response)
[![Build Status](https://img.shields.io/travis/jschr/lambda-response/master.svg)](https://travis-ci.org/jschr/lambda-response)

Express-like API for sending responses from [Lambda Integration Proxy](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html) to API Gateway.

Includes a CLI tool and express middleware for local development.

## Install

```
npm install @jschr/lambda-response
```

## Usage

```js
const { Response } = require('@jschr/lambda-response')

export default function handler(event, context) {
  const res = new Response()

  context.succeed(res.send('OK'))
  // => { statusCode: 200, body: 'OK' }

  context.succeed(res.json({ foo: bar }))
  // => { statusCode: 200, body: '{"foo":"bar"}' }

  context.succeed(res.status(404).json({ message: 'Not found.' }))
  // => { statusCode: 404, body: '{"message":"Not found."}' }

  context.succeed(res.redirect('https://github.com'))
  // => { statusCode: 302, headers: { Location: 'https://github.com'} } }
}
```

Even more express-like with async/await:

```js
const { Response } = require('@jschr/lambda-response')

async function route(req, res) {
  const data = await someAsyncFunction(req.query.id)

  if (data) {
    res.json(data)
  } else {
    res.status(404).json({ message: 'Not found'. })
  }
}

export default function handler(event, context) {
  const req = { query: event.queryStringParameters || {} }
  const res = new Response()

  route(req, res)
    .then(() => context.succeed(res))
    .catch(context.fail)
}
```

### Headers

Default headers can be passed when creating a new response:
```js

const headers = { 'Content-Type': 'application/json' }
const res = new Response({ headers })
```

Or on an instance:
```js

const res = new Response()
const headers = { 'Content-Type': 'application/json' }
res.set(headers)
```

### CORS

CORS is enabled by default. You can pass in cors options when creating a new response:
```js
const cors = { origin: 'example.com', methods: ['GET'], headers: ['X-Api-Key'] }
const res = new Response({ cors })
```

Check out the [tests](src/Response.spec.ts) for more examples.

## CLI

You can use the CLI for local development. If you've installed `@jschr/lambda-response` globally:

```bash
$ lambda-response foo/bar.default --port 8080
```

Where `foo/bar` is the path to your lambda handler and `default` is the exported function.

## Middleware
For advanced use cases you can use the `lambda-response` express middleware:

```js
import * as express from 'express'
import { middleware } from '@jschr/lambda-response'

import handler from './foo/bar'

const app = express()

app.use(middleware(handler))

app.listen(8080)
```