open-index/open-npm huggingface dataset:
npm package: @humanwhocodes/mailgun-list-export
Description: CLI to export members from a Mailgun list
Author: Nicholas C. Zakas
Latest version: 0.1.1

# Mailgun List Export

by [Nicholas C. Zakas](https://humanwhocodes.com)

If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).

## Description

A simple command-line utility to download all of the members of a [Mailgun](https://mailgun.com) email list. Mailgun itself doesn't provide this ability and the API limits members returned to 100 per call. This utility uses calls the Mailgun API repeatedly to download all of the members of an email list.

## Required: Mailgun API Key

In order to use this utility, you must have a [Mailgun API key](https://help.mailgun.com/hc/en-us/articles/203380100-Where-can-I-find-my-API-key-and-SMTP-credentials-) and that key must be stored in an [environment variable](https://linuxize.com/post/how-to-set-and-list-environment-variables-in-linux/) called `MAILGUN_AUTH_KEY`.

## Global Installation and Usage

Install globally using [npm][npm] or [yarn][yarn]:

```
npm install @humanwhocodes/mailgun-list-export -g

# or

yarn global add @humanwhocodes/mailgun-list-export
```

You can then run this utility by passing in the name of the mailing list:

```
$ mailgun-list-export my-list-name@example.com
```

The complete member list will be downloaded into a file called `members.json` in the current working directory.

## Local Installation and Usage

You can also install the utility locally using [npm][npm] or [yarn][yarn]:

```
npm install @humanwhocodes/mailgun-list-export --save-dev

# or

yarn add @humanwhocodes/mailgun-list-export -D
```

You can then run this utility with npx by passing in the name of the mailing list:

```
$ npx mailgun-list-export my-list-name@example.com
```

The complete member list will be downloaded into a file called `members.json` in the current working directory.

## Copyright and License

Copyright Human Who Codes LLC. Apache 2.0 license.

[npm]: https://npmjs.com/
[yarn]: https://yarnpkg.com/
npm package: @humanwhocodes/markdown-it-markua-aside
Description: Markua-style asides and blurbs for markdown-it
Author: Nicholas C. Zaks
Latest version: 0.2.0

# Markua Aside Plugin for markdown-it

by [Nicholas C. Zakas](https://humanwhocodes.com)

If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).

## Description

A [markdown-it](https://github.com/markdown-it/markdown-it) plugin to support Markua-style [asides](https://leanpub.com/markua/read#leanpub-auto-asides-a-or-aside) and [blurbs](https://leanpub.com/markua/read#leanpub-auto-blurbs-b-or-blurb), such as:

```
{aside}Something said to the side.{/aside}

{blurb}Something else you should know.{/blurb}

{blurb, class: warning}
Don't do this!
{/blurb}

A> Something said to the site.

B> Something else you should know.
```


## Prerequisites

* Node.js 12.22+

## Usage

Install using [npm][npm] or [yarn][yarn]:

```
npm install @humanwhocodes/markdown-it-markua-aside --save

# or

yarn add @humanwhocodes/markdown-it-markua-aside
```

Import into your project:

```js
// CommonJS
const { asidePlugin } = require("@humanwhocodes/markdown-it-markua-aside");

// ESM
import { asidePlugin } from "@humanwhocodes/markdown-it-markua-aside";
```

## API

After importing, create a new instance of `DataExtractor`. The constructor expects one object argument that defines the data schema.

For example:

```js
import MarkdownIt from "markdown-it";
import { asidePlugin } from "@humanwhocodes/markdown-it-markua-aside";

// create a new instance
const md = new MarkdownIt();

// install the plugin
md.use(asidePlugin);

// render your text
const result = md.render("{aside}Hello world!{/aside}");
```

## Developer Setup

1. Fork the repository
2. Clone your fork
3. Run `npm install` to setup dependencies
4. Run `npm test` to run tests

## License

Apache 2.0

[npm]: https://npmjs.com/
[yarn]: https://yarnpkg.com/
npm package: @humanwhocodes/memory
Description: A library for working with ArrayBuffer as raw memory.
Author: Nicholas C. Zaks
Latest version: 0.2.0

# Memory utility

by [Nicholas C. Zakas](https://humanwhocodes.com)

If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).

## Description

A JavaScript implementation of dynamic memory using an `ArrayBuffer` as the memory storage.

**Warning:** Very experimental right now. May or may not be useful.

## Usage

### Node.js

Install using [npm][npm] or [yarn][yarn]:

```
npm install @humanwhocodes/memory --save

# or

yarn add @humanwhocodes/memory
```

Import into your Node.js project:

```js
// CommonJS
const { Memory } = require("@humanwhocodes/memory");

// ESM
import { Memory } from "@humanwhocodes/memory";
```

### Deno

Import into your Deno project:

```js
import { Memory } from "https://cdn.skypack.dev/@humanwhocodes/memory?dts";
```

### Browser

It's recommended to import the minified version to save bandwidth:

```js
import { Memory } from "https://cdn.skypack.dev/@humanwhocodes/memory?min";
```

However, you can also import the unminified version for debugging purposes:

```js
import { Memory } from "https://cdn.skypack.dev/@humanwhocodes/memory";
```

## API

After importing, create a new instance of `Memory` and pass in an `ArrayBuffer` to represent your memory:

```js
const memory = new Memory(new ArrayBuffer(64));

// allocate 4 bytes
const address = memory.allocate(4);

// address is 0 if no memory could be allocated
if (address) {

    // write some data into that address - must be a typed array
    memory.write(address, new Uint8Array([1, 2, 3, 4]));

    // read the data back out - returns a Uint8Array
    const data = memory.read(address);

    // free up the mory
    memory.free(address);

} else {
    console.error("Could not allocate memory.");
}
```

## Safety

The `Memory` class provides safeguards to ensure you aren't accidentally writing or reading data where you shouldn't:

1. `allocate()` returns `0` when no more memory can be allocated, allowing you to handle out-of-memory issues gracefully.
1. `write()` throws an error when:
    1. You try to write to address `0`.
    1. You try to write to an unallocated address.
    1. The data you're writing is larger than the allocated space.
1. `read()` throws an error if you attempt to read from an invalid address.
1. `free()` throws an error if you attempt to free an invalid address.

All of this is to say, it should be difficult to accidentally overwrite memory locations.

## Developer Setup

1. Fork the repository
2. Clone your fork
3. Run `npm install` to setup dependencies
4. Run `npm test` to run tests

## License

Apache 2.0

[npm]: https://npmjs.com/
[yarn]: https://yarnpkg.com/
npm package: @humanwhocodes/module-importer
Description: Universal module importer for Node.js
Author: Nicholas C. Zaks
Latest version: 1.0.1

# ModuleImporter

by [Nicholas C. Zakas](https://humanwhocodes.com)

If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).

## Description

A utility for seamlessly importing modules in Node.js regardless if they are CommonJS or ESM format. Under the hood, this uses `import()` and relies on Node.js's CommonJS compatibility to work correctly. This ensures that the correct locations and formats are used for CommonJS so you can call one method and not worry about any compatibility issues.

The problem with the default `import()` is that it always resolves relative to the file location in which it is called. If you want to resolve from a different location, you need to jump through a few hoops to achieve that. This package makes it easy to both resolve and import modules from any directory.

## Usage

### Node.js

Install using [npm][npm] or [yarn][yarn]:

```
npm install @humanwhocodes/module-importer

# or

yarn add @humanwhocodes/module-importer
```

Import into your Node.js project:

```js
// CommonJS
const { ModuleImporter } = require("@humanwhocodes/module-importer");

// ESM
import { ModuleImporter } from "@humanwhocodes/module-importer";
```

### Bun

Install using this command:

```
bun add @humanwhocodes/module-importer
```

Import into your Bun project:

```js
import { ModuleImporter } from "@humanwhocodes/module-importer";
```

## API

After importing, create a new instance of `ModuleImporter` to start emitting events:

```js
// cwd can be omitted to use process.cwd()
const importer = new ModuleImporter(cwd);

// you can resolve the location of any package
const location = importer.resolve("./some-file.cjs");

// you can also import directly
const module = importer.import("./some-file.cjs");
```

For both `resolve()` and `import()`, you can pass in package names and filenames.

## Developer Setup

1. Fork the repository
2. Clone your fork
3. Run `npm install` to setup dependencies
4. Run `npm test` to run tests

## License

Apache 2.0

[npm]: https://npmjs.com/
[yarn]: https://yarnpkg.com/
npm package: @humanwhocodes/number-to-words
Description: Converts a number into English words.
Author: Nicholas C. Zakas
Latest version: 1.0.0

# Number to Words

by [Nicholas C. Zakas](https://humanwhocodes.com)

If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).

## Description

A function that accepts a positive integer (or zero) and returns the English-language description of the number.

## Usage

### Node.js

Install using [npm][npm] or [yarn][yarn]:

```
npm install @humanwhocodes/number-to-words --save

# or

yarn add @humanwhocodes/number-to-words
```

Import into your Node.js project:

```js
// CommonJS
const { numberToWords } = require("@humanwhocodes/number-to-words");

// ESM
import { numberToWords } from "@humanwhocodes/number-to-words";
```

### Deno

Import into your Deno project:

```js
import { numberToWords } from "https://cdn.skypack.dev/@humanwhocodes/number-to-words?dts";
```

### Browser

It's recommended to import the minified version to save bandwidth:

```js
import { numberToWords } from "https://cdn.skypack.dev/@humanwhocodes/number-to-words?min";
```

However, you can also import the unminified version for debugging purposes:

```js
import { numberToWords } from "https://cdn.skypack.dev/@humanwhocodes/number-to-words";
```

## API

After importing, pass any positive integer or zero to `numberToWords()`:

```js
console.log(numberToWords(0));      // "zero"
console.log(numberToWords(10));     // "ten"
console.log(numberToWords(524));    // "five hundred twenty-four"
```

The `numberToWords()` function works up to 999 trillion. If you need larger numbers then that, I envy you.

## Developer Setup

1. Fork the repository
2. Clone your fork
3. Run `npm install` to setup dependencies
4. Run `npm test` to run tests

## License

Apache 2.0

[npm]: https://npmjs.com/
[yarn]: https://yarnpkg.com/
npm package: @humanwhocodes/ordered-set
Description: A set whose items can be traversed in order
Author: nzakas
Latest version: 0.2.1

# Ordered Set

by [Nicholas C. Zakas](https://humanwhocodes.com)

If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).

## Description

A JavaScript data structure that allows random access and traversal of a set's items. This is implemented as a doubly-linked list behinds the scenes.

## Installation

You can install using npm or Yarn:

```bash
npm install @humanwhocodes/ordered-set --save

# or

yarn add @humanwhocodes/ordered-set
```

## Usage

Retrieve the `OrderedSet` constructor and use the methods:

```js
const { OrderedSet } = require("@humanwhocodes/ordered-set");

// create a new instance
const set = new OrderedSet();

// add in data
set.add(1);
set.add(2);
set.add(3);

// get the value before 2
const prev = set.previous(2);

// get the value after 1
const next = set.next(1);

// check if a value exists in the set
const exists = set.has(2);

// how many values are in the set?
const size = set.size;

// get the first value in the set
const first = set.first();

// get the last value in the set
const last = set.last();

// find the next value matching this function
const value1 = set.findNext(value => value > 1, 1);

// find the previous value matching this function
const value2 = set.findPrevious(value => value > 1, 3);

// remove a value
set.delete(1);

// get all values
let values1 = [...set.values()];
let values2 = [...set];

// get all values in reverse order
let values3 = [...set.reverse()];
```

## License

Apache 2.0