open-index/open-npm huggingface dataset:
npm package: @mostafamohamed18/docker-image-downloader
Description: A modern web application to download Docker images directly from Docker Hub and Chainguard registries without needing Docker installed.
Author: Mostafa Mohamed Ali
Latest version: 1.0.1

# Docker Image Downloader

A modern web application to download Docker images directly from Docker Hub without needing Docker installed. The app downloads the image as a `.tar` file compatible with `docker load`.

## Prerequisites

- Node.js (v14 or higher)

## Installation

1. Install the package:
   ```bash
   npm i @mostafamohamed18/docker-image-downloader
   ```

## Usage

1. Run the package:
   ```bash
   node -e "require('@mostafamohamed18/docker-image-downloader')"
   ```
2. Open your browser and go to:
   [http://localhost:3000](http://localhost:3000)

3. Choose a registry (**Docker Hub** or **Chainguard (cgr.dev)**).
4. Enter an image name and click **Check Tags**.
   - Docker Hub examples: `nginx`, `redis`, `library/ubuntu`
   - cgr.dev examples: `chainguard/tomcat` or `cgr.dev/chainguard/tomcat`
5. Select a version from the dropdown.
6. Click **Download Image**.
7. Once downloaded, you can load the image on any machine with Docker:
   ```bash
   docker load -i <filename>.tar
   ```

## Troubleshooting

- **Large Images**: Downloading very large images (>2GB) might be slow or hit timeout limits depending on your connection.
- **Rate Limits**: Docker Hub has rate limits for anonymous pulls. If you encounter errors, retry later.
npm package: @mostafawaheed00/react-jvectormap-jquery-mousewheel
Description: A jQuery plugin that adds cross-browser mouse wheel support.
Author: jQuery Foundation and other contributors
Latest version: 1.0.2

# jQuery Mouse Wheel Plugin

A [jQuery](http://jquery.com/) plugin that adds cross-browser mouse wheel support with delta normalization.

In order to use the plugin, simply bind the `mousewheel` event to an element.

It also provides two helper methods called `mousewheel` and `unmousewheel`
that act just like other event helper methods in jQuery.

The event object is updated with the normalized `deltaX` and `deltaY` properties.
In addition there is a new property on the event object called `deltaFactor`. Multiply
the `deltaFactor` by `deltaX` or `deltaY` to get the scroll distance that the browser
has reported.

Here is an example of using both the bind and helper method syntax:

```js
// using on
$('#my_elem').on('mousewheel', function(event) {
    console.log(event.deltaX, event.deltaY, event.deltaFactor);
});

// using the event helper
$('#my_elem').mousewheel(function(event) {
    console.log(event.deltaX, event.deltaY, event.deltaFactor);
});
```

The old behavior of adding three arguments (`delta`, `deltaX`, and `deltaY`) to the
event handler is now deprecated and will be removed in later releases.


## The Deltas...

The combination of browsers, operating systems, and devices offer a huge range of possible delta values. In fact if the user
uses a trackpad and then a physical mouse wheel the delta values can differ wildly. This plugin normalizes those
values so you get a whole number starting at +-1 and going up in increments of +-1 according to the force or
acceleration that is used. This number has the potential to be in the thousands depending on the device.
Check out some of the data collected from users [here](http://mousewheeldatacollector.herokuapp.com/).

### Getting the scroll distance

In some use-cases we prefer to have the normalized delta but in others we want to know how far the browser should
scroll based on the users input. This can be done by multiplying the `deltaFactor` by the `deltaX` or `deltaY`
event property to find the scroll distance the browser reported.

The `deltaFactor` property was added to the event object in 3.1.5 so that the actual reported delta value can be
extracted. This is a non-standard property.

## Building the code in the repo

```sh
$ git clone git@github.com:jquery/jquery-mousewheel.git
$ cd jquery-mousewheel/
$ npm install
$ npm run build
$ npm run karma
```

The unit tests run by karma are _very_ basic sanity checks; improvements welcome.
To fully test the plugin, load [test/index.html](test/index.html) in each supported
browser and follow the instructions at the top of the file after the unit tests finish.
npm package: @mostafawaheed00/react-jvectormap-world
Description: A collection of JvectorMap maps of World.
Latest version: 1.1.2

# @react-jvectormap/world

A collection of JvectorMap maps of World.

Available Maps:

- worldMill
- worldMerc

## Installation:

```
    yarn add @react-jvectormap/world
```

or:

```
    npm install --save @react-jvectormap/world
```

## Usage

```
    import { worldMill } from '@react-jvectormap/world';
```

or:

```
    import worldMill from '@react-jvectormap/world/dist/worldMill';
```
npm package: @mostajs/audit
Description: Reusable audit logging module — fire-and-forget logAudit() with paginated consultation
Author: Dr Hamid MADANI
Latest version: 2.1.1

# @mostajs/audit

> Fire-and-forget audit logging with paginated consultation.
> Author: Dr Hamid MADANI drmdh@msn.com

## Install

```bash
npm install @mostajs/audit @mostajs/orm
```

## How to Use

### 1. Log an Action

```typescript
import { logAudit, getAuditUser } from '@mostajs/audit'

await logAudit({
  ...getAuditUser(session),
  action: 'user_create',
  module: 'users',
  resource: 'John Doe',
  resourceId: user.id,
  details: { email: 'john@test.com' },
})
// Fire-and-forget — never throws, never blocks
```

### 2. API Handler (paginated consultation)

```typescript
import { createAuditHandlers } from '@mostajs/audit/api/route'
export const { GET } = createAuditHandlers('audit:view', checkPermission)
// GET /api/audit-log?page=1&limit=50&module=users&action=create
```

### 3. Module Info (for @mostajs/setup)

```typescript
import { getSchemas } from '@mostajs/audit/lib/module-info'
const schemas = getSchemas() // [AuditLogSchema]
```

### 4. Dual ORM/NET Mode

Works automatically via `getAuditRepo()` — reads `MOSTA_DATA=orm|net` from environment.
npm package: @mostajs/auth
Description: Authentication — NextAuth, password hashing, session management
Author: Dr Hamid MADANI
Latest version: 2.1.1

# @mostajs/auth

> NextAuth authentication with RBAC — delegates user management to @mostajs/rbac.
> Author: Dr Hamid MADANI drmdh@msn.com

## Install

```bash
npm install @mostajs/auth @mostajs/rbac next-auth@5.0.0-beta.25
```

## How to Use

### 1. Create Auth Handlers

```typescript
// src/lib/auth.ts
import { createAuthHandlers } from '@mostajs/auth/server'

const ROLE_PERMISSIONS = {
  admin: ['*'],
  agent: ['client:view', 'ticket:create'],
}

const { handlers, auth, signIn, signOut } = createAuthHandlers(ROLE_PERMISSIONS, {
  pages: { signIn: '/login', error: '/login' },
})

export { handlers, auth, signIn, signOut }
```

### 2. Auth Checks in API Routes

```typescript
import { createAuthChecks } from '@mostajs/auth/server'
import { auth } from '@/lib/auth'

const { checkAuth, checkPermission } = createAuthChecks(auth, ROLE_PERMISSIONS)

// In API route:
const { error } = await checkPermission('client:view')
if (error) return error
```

### 3. Middleware

```typescript
import { createAuthMiddleware } from '@mostajs/auth/server'
export default createAuthMiddleware({ publicPaths: ['/login'], protectedPrefixes: ['/dashboard'] })
```

### 4. Create Admin (delegates to rbac)

```typescript
import { createAdmin } from '@mostajs/auth/server'
await createAdmin({ email: 'admin@test.com', password: 'Admin123!', firstName: 'Admin', lastName: 'Test' })
```

### 5. Client Components

```typescript
import { usePermissions } from '@mostajs/auth'
import { PermissionGuard, SessionProvider } from '@mostajs/auth'
```
npm package: @mostajs/payment
Description: Payment module for @mostajs — Multi-provider (Stripe, Satim/CIB, Chargily, PayPal), multi-method, multi-currency
Author: Dr Hamid MADANI
Latest version: 0.3.1

# @mostajs/payment

> Payment module for @mostajs — Stripe checkout, multi-method (card, transfer, cash), multi-currency.

## Install

```bash
npm install @mostajs/payment stripe
```

## Usage

### Schema

```typescript
import { createPaymentSchema } from '@mostajs/payment'

// Default (no relation, USD)
const schema = createPaymentSchema()

// With relation to Reservation, DZD currency
const schema = createPaymentSchema({
  currency: 'DZD',
  relationTarget: 'Reservation',
  relationRequired: true,
})
```

### Stripe Checkout (server-side)

```typescript
import { createCheckoutHandler } from '@mostajs/payment/server'

const config = {
  currency: 'EUR',
  stripeSecretKey: process.env.STRIPE_SECRET_KEY,
  successUrlTemplate: '/confirmation/{orderId}?paid=true',
  cancelUrlTemplate: '/payment/{orderId}?cancelled=true',
}

// Next.js App Router
export const POST = createCheckoutHandler(config)
```

### Payment Page (React)

```tsx
import { PaymentPage } from '@mostajs/payment'

<PaymentPage
  orderId="12345"
  orderSummary={{
    title: 'Commande #12345',
    lines: [{ label: 'Article', value: '2x Widget' }],
    amount: 99.99,
    currency: 'EUR',
  }}
  config={{
    currency: 'EUR',
    stripePublicKey: process.env.NEXT_PUBLIC_STRIPE_KEY,
    successUrlTemplate: '/confirmation/{orderId}',
    cancelUrlTemplate: '/payment/{orderId}',
    methods: ['card', 'transfer'],
    bankInfo: { rib: 'FR76...', bankName: 'BNP', holder: 'SARL Example' },
  }}
  onSuccess={(method) => console.log('Paid via', method)}
/>
```

## API

| Export | Entry | Description |
|---|---|---|
| `PaymentSchema` | `.` | Default schema (no relation) |
| `createPaymentSchema(opts)` | `.` | Schema factory with options |
| `PaymentPage` | `.` | React payment UI component |
| `createStripeClient(config)` | `./server` | Stripe SDK wrapper |
| `createCheckoutSession(stripe, req, config)` | `./server` | Create Stripe session |
| `handleWebhook(stripe, body, sig, secret)` | `./server` | Verify webhook |
| `createCheckoutHandler(config)` | `./server` | Next.js checkout route |
| `createPaymentHandlers(dialect)` | `./server` | CRUD route handlers |
| `getPaymentRepo(dialect)` | `./server` | Payment repository |

## License

MIT — (c) 2026 Dr Hamid MADANI <drmdh@msn.com>
npm package: @mostajs/rbac
Description: RBAC — User/Role/Permission schemas, repos, management UI, API handlers
Author: Dr Hamid MADANI
Latest version: 2.2.1

# @mostajs/rbac

> User, Role, Permission, PermissionCategory — schemas, repositories, seed, admin creation.
> Author: Dr Hamid MADANI drmdh@msn.com

## Install

```bash
npm install @mostajs/rbac @mostajs/orm
```

## How to Use

### 1. Schemas (client-safe)

```typescript
import { UserSchema, RoleSchema, PermissionSchema, PermissionCategorySchema } from '@mostajs/rbac'
```

### 2. Repositories (server-side)

```typescript
import { UserRepository, RoleRepository } from '@mostajs/rbac/server'

const dialect = await getDialect()
const userRepo = new UserRepository(dialect)
const user = await userRepo.findByEmail('admin@test.com')
await userRepo.findByIdWithRoles(user.id)
await userRepo.addRole(user.id, roleId)
```

### 3. Seed RBAC (from setup.json data)

```typescript
import { seedRBAC } from '@mostajs/rbac/server'

await seedRBAC({
  categories: [{ name: 'admin', label: 'Administration', icon: 'Settings', order: 0, system: true }],
  permissions: [{ code: 'admin:access', name: 'admin:access', description: 'Admin access', category: 'admin' }],
  roles: { admin: { name: 'admin', description: 'Administrator', permissions: ['*'] } },
})
```

### 4. Create Admin

```typescript
import { createAdmin } from '@mostajs/rbac/lib/create-admin'

await createAdmin({ email: 'admin@test.com', password: 'Admin123!', firstName: 'Admin', lastName: 'Test' })
// Handles: bcrypt hash + find admin role + create user + link role
```

### 5. Module Info (for @mostajs/setup)

```typescript
import { getSchemas, moduleInfo } from '@mostajs/rbac/lib/module-info'

const schemas = getSchemas()  // [UserSchema, RoleSchema, PermissionSchema, PermissionCategorySchema]
await moduleInfo.seed(setupJson.rbac)
await moduleInfo.createAdmin({ email, password, firstName, lastName })
```

### 6. Dual ORM/NET Mode

```typescript
import { getRbacRepos } from '@mostajs/rbac/lib/repos-factory'

const { users, roles, permissions, categories } = await getRbacRepos()
// In ORM mode: BaseRepository + dialect
// In NET mode: NetClient-backed repositories
// Controlled by MOSTA_DATA=orm|net
```

### 7. API Handlers (Next.js)

```typescript
import { createUsersHandler } from '@mostajs/rbac/api/users'
export const { GET, POST } = createUsersHandler({ checkPermission, adminPermission: 'admin:access' })
```
npm package: @mostajs/settings
Description: Reusable key-value settings module with typed factory, React provider and auto-generated form
Author: Dr Hamid MADANI
Latest version: 2.1.1

# @mostajs/settings

> Typed key-value settings with React provider and auto-generated form.
> Author: Dr Hamid MADANI drmdh@msn.com

## Install

```bash
npm install @mostajs/settings @mostajs/orm
```

## How to Use

### 1. Create Settings Module

```typescript
import { createSettingsModule } from '@mostajs/settings'

const appSettings = createSettingsModule({
  defaults: { darkMode: false, maxUploadSize: 10, companyName: 'Acme' },
  validators: { maxUploadSize: (v) => v > 0 && v < 100 },
})

const settings = await appSettings.getSettings() // { darkMode: false, maxUploadSize: 10, companyName: 'Acme' }
await appSettings.updateSettings({ darkMode: true })
await appSettings.resetSetting('darkMode')
```

### 2. React Components

```tsx
import { SettingsProvider, SettingsForm, useSettings } from '@mostajs/settings'

<SettingsProvider defaults={defaults} apiPath="/api/settings">
  <SettingsForm values={settings} definitions={fields} onSave={save} />
</SettingsProvider>
```

### 3. API Handler

```typescript
import { createSettingsHandlers } from '@mostajs/settings'
export const { GET, PUT } = createSettingsHandlers(settingsModule, 'admin:settings', checkPermission)
```

### 4. Module Info (for @mostajs/setup)

```typescript
import { getSchemas } from '@mostajs/settings/lib/module-info'
const schemas = getSchemas() // [SettingSchema]
```
npm package: @mostajs/setup
Description: Reusable setup wizard module — multi-dialect DB configuration, .env.local writer, seed runner
Author: Dr Hamid MADANI
Latest version: 2.2.1

# @mostajs/setup

> Setup wizard — multi-dialect DB config, schema management, seed runner, module discovery.
> Author: Dr Hamid MADANI drmdh@msn.com

## Install

```bash
npm install @mostajs/setup @mostajs/orm
```

## How to Use

### 1. Setup Route (Next.js catch-all)

```typescript
// src/app/api/setup/[...slug]/route.ts
import { createSetupRoutes } from '@mostajs/setup'
export const { GET, POST, DELETE, PATCH } = createSetupRoutes({
  needsSetup: appNeedsSetup,
  getSetupConfig,
})
```

### 2. Setup Page

```tsx
// src/app/setup/page.tsx
import { SetupWizard } from '@mostajs/setup'
export default function Setup() { return <SetupWizard /> }
```

### 3. Config from setup.json (generated by Studio)

```typescript
import { loadSetupJson } from '@mostajs/setup'
const config = await loadSetupJson('./setup.json', dalRepoFactory)
```

### 4. Module Discovery

```typescript
import { discoverModules, collectSchemas } from '@mostajs/setup/lib/module-registry'

const modules = await discoverModules(['rbac', 'audit', 'settings'])
const allSchemas = collectSchemas(modules)

// Seed each module
for (const mod of modules) {
  await mod.seed(setupJson[mod.name])
}

// Create admin via rbac
const rbac = modules.find(m => m.createAdmin)
await rbac.createAdmin({ email, password, firstName, lastName })
```

### 5. Dual ORM/NET Mode

The wizard supports both:
- **ORM mode**: direct DB connection (dialect selection, URI, create DB, apply schema)
- **NET mode**: remote @mostajs/net server (test connection, upload schemas, wait restart)

### 6. Setup Wizard Features

- Welcome: choose ORM or NET mode
- Modules: select @mostajs modules
- Dialect/Database or NET config
- Admin user creation (delegates to @mostajs/rbac)
- Schema upload (JSON, ZIP, scan directory)
- Seeds (from setup.json)
- Summary with config review

### 7. API Routes

```
GET  /api/setup/status        — needsSetup check
POST /api/setup/install       — run full installation
POST /api/setup/test-db       — test DB connection
POST /api/setup/create-db     — create database
POST /api/setup/create-admin  — create admin (delegates to rbac)
GET  /api/setup/detect-modules — list available modules
POST /api/setup/net-test      — test NET server connection
```
npm package: @mostajs/weather
Description: Weather module for @mostajs — OpenWeatherMap, flyability criteria, alerts, demo mode
Author: Dr Hamid MADANI
Latest version: 0.1.0

# @mostajs/weather

> Weather module for @mostajs — OpenWeatherMap, flyability criteria, alerts, demo mode.

## Install

```bash
npm install @mostajs/weather
```

## Usage

### Fetch weather data

```typescript
import { fetchWeather } from '@mostajs/weather'

const data = await fetchWeather({
  apiKey: process.env.OPENWEATHER_KEY,
  location: { lat: 48.8566, lon: 2.3522, label: 'Paris' },
})

console.log(data.current.temp)     // 22
console.log(data.forecast[0].flyable) // true
```

### Demo mode (no API key)

```typescript
const data = await fetchWeather({
  location: { lat: 36.75, lon: 3.06, label: 'Alger' },
})
// Returns mock data with isRealData: false
```

### React component

```tsx
import { WeatherPage } from '@mostajs/weather'

<WeatherPage
  config={{
    apiKey: process.env.NEXT_PUBLIC_OPENWEATHER_KEY,
    location: { lat: 36.7538, lon: 3.0588, label: 'Alger — Site de decollage' },
    flyabilityCriteria: { maxWindKmh: 25, minVisibilityKm: 3, forbiddenConditions: ['Rain', 'Thunderstorm', 'Snow'] },
  }}
  onBack={() => router.back()}
/>
```

### Flyability check

```typescript
import { isFlyable, msToKmh } from '@mostajs/weather'

const windKmh = msToKmh(7.2) // 26 km/h
isFlyable(windKmh, 'Clear')  // false (> 25 km/h)
isFlyable(15, 'Rain')        // false (Rain is forbidden)
isFlyable(15, 'Clear')       // true
```

## API

| Export | Description |
|---|---|
| `fetchWeather(config)` | Fetch current + 5-day forecast (or mock data) |
| `isFlyable(wind, condition, criteria?)` | Check if conditions allow flight |
| `msToKmh(ms)` | Convert m/s to km/h |
| `getConditionIcon(condition)` | Get emoji for weather condition |
| `getMockWeather(config)` | Generate mock weather data |
| `WeatherPage` | React component for weather display |
| `DEFAULT_CRITERIA` | Default flyability criteria |
| `CONDITION_ICONS` | Condition-to-emoji mapping |

## License

MIT — (c) 2026 Dr Hamid MADANI <drmdh@msn.com>
npm package: @mostakchif/revocable-promise
Description: revocablePromise allows you to revoke a promise or an array of promises, and set a minimum time to response.
Author: habdel-i
Latest version: 1.0.1

# revocablePromise:
revocablePromise allows you to revoke a promise or an array of promises, and set a minimum time to response.

# installation:
```sh
npm install @mostakchif/revocable-promise
```

# simple use:

```js
const {RevocablePromise} = require("@mostakchif/revocable-promise");

// init
const q = new RevocablePromise(fetch("http://localhost:8080/users"));

// set a minimum timeout
q.minTimeout = 500;

// revoke the promise and then or catch methods not be calls if they are not already called
q.revoke();

q.then((users) => console.log(users));
q.catch((err) => console.log(err));

/* multi promises */

const qs = new RevocablePromise([
    fetch("http://localhost:8080/users"),
    fetch("http://localhost:8080/tweets"),
]);

qs.minTimeout = 500;

qs.revoke();

qs.then(([users, tweets]) => console.log(users, tweets));
qs.catch((err) => console.log(err));
```

# react example:
```js
class Bar extends React.Component {
    componentDidMount() {
        this.q = new RevocablePromise(fetch("http://localhost:8080/users"));
    }
    
    componentWillUnmount() {
        this.q.revoke();
    }
}
```
npm package: @mosteast/cli_add_space_around_alphanumeric
Description: Add space around latin and numbers in Chinese context.
Author: kev
Latest version: 1.0.1

@mosteast/cli_add_space_around_alphanumeric
===========================================

Add space around latin and numbers in Chinese context.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@mosteast/cli_add_space_around_alphanumeric.svg)](https://npmjs.org/package/@mosteast/cli_add_space_around_alphanumeric)
[![Downloads/week](https://img.shields.io/npm/dw/@mosteast/cli_add_space_around_alphanumeric.svg)](https://npmjs.org/package/@mosteast/cli_add_space_around_alphanumeric)
[![License](https://img.shields.io/npm/l/@mosteast/cli_add_space_around_alphanumeric.svg)](https://github.com/mosteast/cli_add_space_around_alphanumeric/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @mosteast/cli_add_space_around_alphanumeric
$ cli_add_space_around_alphanumeric COMMAND
running command...
$ cli_add_space_around_alphanumeric (-v|--version|version)
@mosteast/cli_add_space_around_alphanumeric/1.0.1 darwin-x64 node-v12.14.0
$ cli_add_space_around_alphanumeric --help [COMMAND]
USAGE
  $ cli_add_space_around_alphanumeric COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->

<!-- commandsstop -->
npm package: @mosteast/cli_markdown_helper
Description: Helper for markdown writer.
Author: kev
Latest version: 1.0.2

@mosteast/cli_markdown_helper
=============================

Helper for markdown writer.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@mosteast/cli_markdown_helper.svg)](https://npmjs.org/package/@mosteast/cli_markdown_helper)
[![Downloads/week](https://img.shields.io/npm/dw/@mosteast/cli_markdown_helper.svg)](https://npmjs.org/package/@mosteast/cli_markdown_helper)
[![License](https://img.shields.io/npm/l/@mosteast/cli_markdown_helper.svg)](https://github.com/mosteast/cli_markdown_helper/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @mosteast/cli_markdown_helper
$ cli_markdown_helper COMMAND
running command...
$ cli_markdown_helper (-v|--version|version)
@mosteast/cli_markdown_helper/1.0.2 darwin-x64 node-v12.14.0
$ cli_markdown_helper --help [COMMAND]
USAGE
  $ cli_markdown_helper COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`cli_markdown_helper add_space_around_code FILE`](#cli_markdown_helper-add_space_around_code-file)
* [`cli_markdown_helper help [COMMAND]`](#cli_markdown_helper-help-command)

## `cli_markdown_helper add_space_around_code FILE`

describe the command here

```
USAGE
  $ cli_markdown_helper add_space_around_code FILE

OPTIONS
  -h, --help  show CLI help
```

_See code: [src/commands/add_space_around_code.ts](https://github.com/mosteast/cli_markdown_helper/blob/v1.0.2/src/commands/add_space_around_code.ts)_

## `cli_markdown_helper help [COMMAND]`

display help for cli_markdown_helper

```
USAGE
  $ cli_markdown_helper help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.3/src/commands/help.ts)_
<!-- commandsstop -->
npm package: @mostly-adequate/support
Description: Support functions and data-structures from the Mostly Adequate Guide to Functional Programming
Author: @mostly-adequate
Latest version: 2.0.1

# Mostly Adequate Guide to Functional Programming - Support

## Overview 

This package contains all functions and data-structure referenced in the
appendixes of the [Mostly Adequate Guide to Functional Programming](https://github.com/MostlyAdequate/mostly-adequate-guide).

These functions have an educational purpose and aren't intended to be used in
any production environment. They are however, a good learning material for anyone
interested in functional programming.

## How to install

The package is available on `npm` and can be installed via the following incantation:

```
npm install @mostly-adequate/support
```

## How to use

There's no particular structure to the module, everything is flat and exported
from the root (the curious reader may have a quick glance at the `index.js` to
get convinced about this). 

Also, all top-level functions are curried so you don't have to worry about calling
`curry` on any of them.

For example:

```js
const { Maybe, liftA2, append, concat, reverse } = require('@mostly-adequate/support');

const a = Maybe.of("yltsoM").map(reverse);
const b = Maybe.of("Adequate").map(concat(" "));

liftA2(append)(b)(a);
// Just("Mostly Adequate")
```