open-index/open-npm huggingface dataset:
npm package: @mck-p/logger
Description: A Node logging wrapper for the McK-P services
Author: Tim Roberts
Latest version: 0.0.1

# @mck-p/logger

## Overview

This package is a wrapper around logging that offers a uniform interface for all `@mck-p` services.

## Usage

```javascript
const createLogger = require("@mck-p/logger");

const logger = createLogger({
  name: "SERVICE_NAME" /* defaults to process.env.SERVICE_NAME */,
  level: "trace" /* defaults to process.env.LOG_LEVEL */
  serializers: {}, /* defaults to bunyan.stdSerializers */
  /* any other bunyan options will be copied over */
});

logger.trace("Some event happened.")

logger.warn(error, "Some Error happened.")

logger.fatal(error, "We are exiting one after a fatal error!")
```

### Levels

- `fatal` (60): The service/app is going to stop or become unusable now. An operator should definitely look into this soon.
- `error` (50): Fatal for a particular request, but the service/app continues servicing other requests. An operator should look at this soon(ish).
- `warn` (40): A note on something that should probably be looked at by an operator eventually.
- `info` (30): Detail on regular operation.
- `debug` (20): Anything else, i.e. too verbose to be included in `info` level.
- `trace` (10): Logging from external libraries used by your app or very detailed application logging.
npm package: @mck-p/obvi
Description: An HTTP server using Observables
Author: Tim Roberts
Latest version: 0.1.1

<p align='center'>
  <img src='https://imgur.com/4ex8uWw.png' style='width:auto;height:auto;max-width:150px;'/>
</p>

## Observable Server

### Overview

`@mck-p/obvi` is a simple wrapper around `http.createServer`. It exposes a few helper methods and wraps each request inside of a `Context` object. The goal of this library is to be the lowest abstraction for more robust userland libraries.

### Usage

```js
const makeServer = require('@mck-p/obvi')

const {
  _server, // http.creatServer() response
  requests, // Observable of requests sent to server
  start, // Start server listening on passed in port
  stop // Stop server
} = makeServer({
  port: 5000 // Port to listen for connections on
})

// We subscribe to all requests from this server
requests.subscribe((context) => {
  console.log('I am responding to a request!')
})

// We create a stream of all post requests
const postRequests = requests.filter(({ request }) => request.method.toLowerCase() === 'post')

postRequests
  // And we handle all post requests
  .subscribe(({ response }) => response.send('You are sending me a post request!'))
```

### API

* `makeServer({ port?: number })`: 
  - Main export of module
  - Returns a `Server` object

**Server**

* `requests: Observable<Context>`:
  - The main abstraction over `http` requests
* `_server: http.Server`:
  - The underlying `http.createServer()` value
* `stop: () => http.Server`:
  - How we stop listening for incoming requests
* `start: () => http.Server`

**Context**

* `request: Request`:
  - Our base abstraction over `http.IncomingMessage`
* `response: Response`:
  - Our base abstraction over `http.ServerResponse`

**Request**

It is the underlying `http.IncomingMessage` with

* `url: Url`:
  - Instead of `string`, it returns [this](https://nodejs.org/api/http.html#http_message_url) object with `true` as the second argument.

**Response**

* `response: http.ServerResponse`:
  - The underlying `http.ServerResponse` of the request
* `send: string => void`:
  - An alias for `response.end`
npm package: @mck-p/project-envs
Description: Creates project env files from a JSON config
Author: Tim Roberts
Latest version: 0.0.1

# Project Envs

[![CircleCI](https://circleci.com/gh/beardedtim/project-envs.svg?style=svg)](https://circleci.com/gh/beardedtim/project-envs)

## Usage

```javascript
const { writeEnvs, formatEnvs, createEnvs } = require("@mck-p/project-envs");

/* Given some object */
const data = {
  /*
      That can have meta keys
      or other data that you need
      to write your envs. These
      do not get written to env,
      they are only here for meta/
      resolving data
  */
  other: {
    turtle: "face"
  },
  // This will create SERVICE_NAME: "RESOURCES_SERVICE"
  SERVICE_NAME: "RESOURCES_SERVICE",
  // This will create SERVICE_FULL_NAME: "face:RESOURCES_SERVICE::FULL"
  SERVICE_FULL_NAME: "${other::turtle}:${SERVICE_NAME}::FULL"
};

const formattedEnvs = formatEnvs(createEnvs(data));
/* 
    ["SERVICE_NAME=RESOURCES_SERVICE", "SERVICE_FULL_NAME=face:RESOURCE_SERVICE::FULL"]
*/

writeEnvs(formattedEnvs, __dirname + "/.env").then(() => {
  /*
    .env written as

      SERVICE_NAME=RESOURCES_SERVICE
      SERVICE_FULL_NAME=face:RESROUCE_SERVICE::FULL

  */
});
```
npm package: @mck-p/time-converter
Description: A basic Millisecond/Days converter
Author: Tim Roberts
Latest version: 0.2.0

# time-converter

> Conversions between milliseconds and weeks or anywhere in between.

_**Naming Convetion**_

* `ms` - millisecond
* `s` - second
* `m` - minute
* `h` - hour
* `d` - day
* `w` - week

## Usage

```js
import timeConverter from '@mck-p/time-converter'

const milliseconds = 1000
timeConverter.ms.to.s(milliseconds) // 1

const seconds = 60
timeConverter.s.to.m(seconds) // 1

const minutes = 60
timeConverter.m.to.h(minutes) // 1

const hours = 24
timeConverter.h.to.d(hours) // 1

const days = 1
timeConverter.d.to.h(days) // 24

const weeks = 1
timeConverter.w.to.d(weeks) // 7

/** We also export them named! **/

timeConverter.milliseconds.to.seconds(1000) // 1
```

## API

All `initials` are also accessible via their plural names:

```
ms -> milliseconds
s -> seconds
m -> minutes
h -> hours
d -> days
w -> weeks
```

* `ms`
  - `from`:
      * `ms` - `1 -> 1`
      * `s` - `1 -> 1000`
      * `m` - `1 -> 1000 * 60 `
      * `h` - `1 -> 1000 * 60 * 60`
      * `d` - `1 -> 1000 * 60 * 60 * 24`
  - `to`:
      * `ms` - `1 -> 1`
      * `s` - `1000 -> 1`
      * `m` - `1000 * 60 -> 1`
      * `h` - `1000 * 60 * 60 -> 1`
      * `d` - `1000 * 60 * 60 * 24 -> 1`

* `s`
  - `from`:
      * `ms` - `1 -> 1/1000`
      * `s` - `1 -> 1`
      * `m` - `1 -> 60 `
      * `h` - `1 -> 60 * 60`
      * `d` - `1 -> 60 * 60 * 24`
  - `to`:
      * `ms` - `1 -> 1000`
      * `s` - `1 -> 1`
      * `m` - `60 -> 1`
      * `h` - `60 * 60 -> 1`
      * `d` - `60 * 60 * 24 -> 1`

* `m`
  - `from`:
      * `ms` - `1 -> 1/(60 * 1000)`
      * `s` - `1 -> 1/60`
      * `m` - `1 -> 1 `
      * `h` - `1 -> 60`
      * `d` - `1 -> 60 * 24`
  - `to`:
      * `ms` - `1 -> 60 * 1000`
      * `s` - `1 -> 60`
      * `m` - `1 -> 1`
      * `h` - `60 -> 1`
      * `d` - `60 * 24 -> 1`

* `h`
  - `from`:
      * `ms` - `1 -> 1/(60 * 60 * 1000)`
      * `s` - `1 -> 1/(60 * 60)`
      * `m` - `1 -> 1/60 `
      * `h` - `1 -> 1`
      * `d` - `1 -> 24`
  - `to`:
      * `ms` - `1 -> 60 * 60 * 1000`
      * `s` - `1 -> 60 * 60`
      * `m` - `1 -> 60`
      * `h` - `1 -> 1`
      * `d` - `24 -> 1`

* `d`
  - `from`:
      * `ms` - `1 -> 1/(60 * 60 * 24 * 1000)`
      * `s` - `1 -> 1/(60 * 60 * 24)`
      * `m` - `1 -> 1/(60 * 24) `
      * `h` - `1 -> 1/24`
      * `d` - `1 -> 1`
  - `to`:
      * `ms` - `1 -> 60 * 60 * 24 * 1000`
      * `s` - `1 -> 60 * 60 * 24`
      * `m` - `1 -> 60 * 24`
      * `h` - `1 -> 24`
      * `d` - `1 -> 1`

* `from` : `'1 day' -> { to: 'hours' -> 24 }`
    * You can give `from` a multi-value, separated by commas:
        - `converter.from('1 day, 14 hours, 3 minutes, 2 seconds').to('milliseconds')`
    * You can mix-n-match in the from
        - `converter.from('1 day, 14 hr, 3 minutes, 2 s').to('ms')`
npm package: @mck-p/trie
Description: A trie structure for efficient word and phrase search
Author: beardedtim
Latest version: 0.0.2

# trie

> Fast word and phrase search

## Usage

```js
// Require/import package
const createTrie = require('@mck-p/trie')

// Create Trie instance
const trie = createTrie()

// Add a word to the trie structure
trie.add('word')

// #search only returns true
// if the string is found AND
// it is found at a `isTail` node
trie.search('word') // true
trie.search('wor') // false

// #searchBy is a HoF that
// lets us search by a given
// function

// `If we have gotten to the end of the word,
// lets still return true, even if it isn't a
// full word`
const partialOk = node => node
// Create a function that lets us search the trie
// by whatever equality function we give it.
// We can also return the node itself, as we
// are above.
const searchTrie = trie.searchBy(partialOk)

Boolean(searchTrie('word')) // true 
Boolean(searchTrie('wor')) // true

// We can get access to the keys
// for someone else to do things with
trie.getKeys()
/*
  { w:
    { keys:
      { o:
        { keys:
          { r:
            { keys:
              { d:
                { keys: {}, isTail: true}
              }
            }
          }
        }
      }
    }
  }
*/

// We can load a list of words
// instead of calling `add` for 
// each one
trie.loadIndexes(['another', 'one'])

trie.getKeys()
/*
  {
    w: {...},
    a: {...},
    o: {...}
  }
*/
```

## Options

```js
const trie = createTrie({
  /*
    A function that given a string will
    return a list of keys to walk.

    Default:

        str => str.toLowerCase().split('')
  */
  getKeysFrom: str => [str],
  /*
    A function that given nothing will
    return a BasicNode interface, something
    with { keys }

    Default:

      () => ({ keys: {}, isHead: false, isTail: false })
  */
  createNode: () => BasicNode,
  /*
    A starting keys states

    Default:
    
      {}
  */
  keys: {}
})
```

## Examples

You can find examples inside of the [examples dir](./examples/README.md) of how to interact with the `trie` structure for saving/reading cached keys, along with a JSON object of almost all English words.
npm package: @mckayla/electron-redux
Description: Make sure all your stores are on the same page
Author: McKayla Washburn
Latest version: 3.0.3

<h1 align="center">
<img height=100 src="https://cdn.mckayla.cloud/-/d622b29166eb46e080f5103f22e1d2a9/electron-redux-logo.svg" />
<br />
electron-redux
</h1>

## Usage

```javascript
// in the main process
import { syncMain } from "@mckayla/electron-redux";
const store = createStore(reducer, syncMain);
```

```javascript
// in the renderer processes
import { syncRenderer } from "@mckayla/electron-redux/renderer";
const store = createStore(reducer, syncRenderer);
```

```javascript
// in your preload script
import "@mckayla/electron-redux/preload";
```

If you don't have your own preload script, you can specify the provided preload
script directly whenever you initialize a `BrowserWindow`

```javascript
// when initializing a BrowserWindow
const view = new BrowserWindow({
	webPreferences: {
		preload: require.resolve("@mckayla/electron-redux/preload"),
	},
});
```

### w/ redux-thunk (or any other middleware/enhancer)

Just use the `compose` function provided by Redux

```javascript
import { syncRenderer } from "@mckayla/electron-redux/renderer";
import { applyMiddleware, compose, createStore } from "redux";
import thunk from "redux-thunk";

const store = createStore(reducer, compose(syncRenderer, applyMiddleware(thunk)));
```

## Actions

Actions **must** be [FSA](https://github.com/acdlite/flux-standard-action#example)-compliant,
i.e. have a `type` and `payload` property. Any actions not passing this test will
be ignored and simply passed through to the next middleware.

Actions **must** be serializable. electron-redux supports serializing anything that
`JSON.stringify` can usually handle, as well as `Map` and `Set`.

-   Objects with enumerable properties
-   Arrays
-   Numbers
-   Booleans
-   Strings
-   Maps
-   Sets

### Local actions

By default, all actions are played in all processes. If an action should only be
played in the current thread, then you can set the scope meta property to local.

```javascript
const myLocalActionCreator = () => ({
	type: "MY_ACTION",
	payload: 123,
	meta: {
		scope: "local", // only play the action locally
	},
});
```

We also provide a utility function for this

```javascript
import { stopForwarding } from "@mckayla/electron-redux";
dispatch(stopForwarding(action));
```
npm package: @mckayla/eslint-plugin
Description: An ESLint plugin for people named McKayla (and maybe you too)
Author: McKayla Washburn
Latest version: 0.13.0

![screenshot of a basic configuration example](https://cdn.mckayla.cloud/-/24418eea266d464e8b31e58b4af90ac1/eslintrc.webp)

<!--
https://ray.so/?title=.eslintrc.json&theme=midnight&spacing=64&background=true&darkMode=true&code=ewoJImV4dGVuZHMiOiBbIm1ja2F5bGEiXQp9&language=json
-->

## Usage

Rather than use this package directly, you probably want to use [eslint-config-mckayla]

[eslint-config-mckayla]: https://github.com/aslilac/mckayla/tree/main/packages/eslint-config
npm package: @mckayla/prettier
Description: A Prettier config for people named McKayla (and maybe you too)
Author: McKayla Washburn
Latest version: 1.0.5

![screenshot of a basic configuration example](https://cdn.mckayla.cloud/-/ebe403ce1a964ae394bc09cc416b395e/prettierrc.webp)

<!--
https://ray.so/?title=.prettierrc.json&theme=midnight&spacing=64&background=true&darkMode=true&code=IkBtY2theWxhL3ByZXR0aWVyIg&language=json
-->

## Usage

-   Add the package as a dependency to your project

```sh
npm add @mckayla/prettier
```

-   Update your .prettierrc.json

```json
"@mckayla/prettier"
```
npm package: @mckayla/tsconfig
Description: A TypeScript config for people named McKayla (and maybe you too)
Author: McKayla Washburn
Latest version: 1.0.5

![screenshot of a basic configuration example](https://cdn.mckayla.cloud/-/50c0c54daa194ebca0f9841dc8507e5c/tsconfig.webp)

<!--
https://ray.so/?title=tsconfig.json&theme=midnight&spacing=64&background=true&darkMode=true&code=ewoJImV4dGVuZHMiOiAiQG1ja2F5bGEvdHNjb25maWciLAoJImNvbXBpbGVyT3B0aW9ucyI6IHsKCQkib3V0RGlyIjogIi4vYnVpbGQvIiwKCQkidHlwZXMiOiBbXSwKCQkiYmFzZVVybCI6ICIuIgoJfSwKCSJpbmNsdWRlIjogWyIuL3NyYy8qKi8qIl0KfQ&language=json
-->

## Usage

- Add the package as a dependency to your project

```sh
npm add @mckayla/tsconfig
```

- Update your tsconfig.json

```json
{
	"extends": "@mckayla/tsconfig",
	"compilerOptions": {
		"outDir": "./build/",
		"types": [],
		"baseUrl": "."
	},
	"include": ["./src/**/*"]
}
```
npm package: @mckenzielong/winmemoryjs
Description: N-API add-on for Windows memory and processes
Latest version: 0.0.1

# winmemoryjs &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mckenzielong/winmemoryjs/blob/master/LICENSE.md) 

winmemoryjs began life as a fork of https://github.com/Rob--/memoryjs. I started this as a learning project to play around with electron and ffxiv memory reading, but after it didn't compile on newer versions of node, I kind of went down a rabbit hole and ended up with this mess. Basically, since memoryjs was written using the v8 structures, winmemoryjs began life as a port to node-addon-api. It quickly turned into its own gross thing. Ideally the feature set of this will cover a similar range of memoryjs, however that project.

# Features

- List all processes (sync, async, callback)
- List all modules associated with a process
- List all threads associated with a process
- Open and close a process handle

# Missing features
- Read process memory
- Write process memory
- Read buffers from memory
- Write buffer to memory
- Change memory protection
- Reserve/allocate, commit or change regions of memory
- Fetch a list of memory regions within a process
- Pattern scanning
- Execute a function within a process
- Hardware breakpoints (find out what accesses/writes to this address etc)