open-index/open-npm huggingface dataset:
npm package: @mhhegazy/next
Description: The React Framework
Latest version: 9.5.4-canary.25

[![Next.js](https://assets.vercel.com/image/upload/v1538361091/repositories/next-js/next-js.png)](https://nextjs.org)

<p align="center">
  <a aria-label="Vercel logo" href="https://vercel.com">
    <img src="https://img.shields.io/badge/MADE%20BY%20Vercel-000000.svg?style=for-the-badge&logo=Vercel&labelColor=000">
  </a>
  <a aria-label="NPM version" href="https://www.npmjs.com/package/next">
    <img alt="" src="https://img.shields.io/npm/v/next.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="License" href="https://github.com/vercel/next.js/blob/canary/license.md">
    <img alt="" src="https://img.shields.io/npm/l/next.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="Join the community on GitHub" href="https://github.com/vercel/next.js/discussions">
    <img alt="" src="https://img.shields.io/badge/Join%20the%20community-blueviolet.svg?style=for-the-badge&logo=Next.js&labelColor=000000&logoWidth=20">
  </a>
</p>

## Getting Started

Visit <a aria-label="next.js learn" href="https://nextjs.org/learn">https://nextjs.org/learn</a> to get started with Next.js.

## Documentation

Visit [https://nextjs.org/docs](https://nextjs.org/docs) to view the full documentation.

## Who is using Next.js?

Next.js is used by the world's leading companies. Check out the [Next.js Showcase](https://nextjs.org/showcase) to learn more.

## Contributing

Please see our [contributing.md](/contributing.md).

## Authors

- Arunoda Susiripala ([@arunoda](https://twitter.com/arunoda)) – [Vercel](https://vercel.com/about/arunoda-zeit)
- Tim Neutkens ([@timneutkens](https://twitter.com/timneutkens)) – [Vercel](https://vercel.com/about/timneutkens)
- Naoyuki Kanezawa ([@nkzawa](https://twitter.com/nkzawa)) – [Vercel](https://vercel.com/about/nkzawa)
- Tony Kovanen ([@tonykovanen](https://twitter.com/tonykovanen)) – [Vercel](https://vercel.com)
- Guillermo Rauch ([@rauchg](https://twitter.com/rauchg)) – [Vercel](https://vercel.com/about/rauchg)
- Dan Zajdband ([@impronunciable](https://twitter.com/impronunciable)) – Knight-Mozilla / Coral Project
npm package: @mhilx/button-component
Description: This is a demo npm package
Author: Mohammed Hoque
Latest version: 1.0.2

# MHILX NPM Package

## Install Package
    npm install @mhilx/button-component--registry=https://npm.pkg.github.com
    npm install @mhilx/button-component --registry=https://registry.npmjs.org

## Usage Example
```TypeScript
import Button from "@mhilx/button-component";

```
---
## How to publish a package to GitHub Packages

### Initialize NPM in your project
    npm init -y

This command will create a `package.json` file. 

### Create a personal access token
To publish your npm package using a GitHub token, you need to select the appropriate scopes when creating the token. The scopes determine the permissions and access levels that the token will have. Here are the recommended scopes for publishing an npm package:

  1. repo: This scope is required to access the repository where your npm package is located. It allows the token to read and write repository-related information.

  2. write:packages: This scope is required to publish packages to the GitHub Packages registry. It allows the token to publish, update, and delete packages associated with the repository.

  3. read:packages: This scope is required to install packages from the GitHub Packages registry. It allows the token to read and download packages associated with the repository.

  4. delete:packages: This scope is optional but recommended if you want to have the ability to delete packages from the GitHub Packages registry using the token.

When creating your GitHub token, make sure to select these scopes to ensure that you have the necessary permissions to publish your npm package.

### Create `.npmrc` file at root of project and the following lines
    @NAMESPACE:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=<YOUR_TOKEN>

### Publish Package
    npm publish --access=public
npm package: @mhilx/counter-component
Description: My counter react typescript package
Author: Igor Gaponov
Latest version: 1.0.0

# my-react-typescript-package

[![NPM version][npm-image]][npm-url]
[![Build][github-build]][github-build-url]
![npm-typescript]
[![License][github-license]][github-license-url]

This repo is the example of the article ["How to create and publish React Typescript npm package with demo and automated build"](https://medium.com/@igaponov/how-to-create-and-publish-react-typescript-npm-package-with-demo-and-automated-build-80c40ec28aca).

You can clone it and step by step create your own NPM package and publish it.

It is simple React counter.

[**Live Demo**](https://gapon2401.github.io/my-react-typescript-package/)

## Installation:

```bash
npm install my-react-typescript-package --save-dev
```

or

```bash
yarn add -D my-react-typescript-package
```

## Usage :

Add `MyCounter` to your component:

```js
import React from 'react'
import ReactDOM from 'react-dom/client'
import { MyCounter } from 'my-react-typescript-package'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
    <React.StrictMode>
        <div>
            <h2>Default counter</h2>
            <MyCounter />
        </div>
        <hr />
        <div>
            <h2>Counter with predefined value</h2>
            <MyCounter value={5} />
        </div>
    </React.StrictMode>,
)

```

[npm-url]: https://www.npmjs.com/package/my-react-typescript-package
[npm-image]: https://img.shields.io/npm/v/my-react-typescript-package
[github-license]: https://img.shields.io/github/license/gapon2401/my-react-typescript-package
[github-license-url]: https://github.com/gapon2401/my-react-typescript-package/blob/master/LICENSE
[github-build]: https://github.com/gapon2401/my-react-typescript-package/actions/workflows/publish.yml/badge.svg
[github-build-url]: https://github.com/gapon2401/my-react-typescript-package/actions/workflows/publish.yml
[npm-typescript]: https://img.shields.io/npm/types/my-react-typescript-package
npm package: @mhilx/greeting
Description: This is a demo npm package
Author: Mohammed Hoque
Latest version: 1.0.1

# MHILX NPM Package

## Install Package
    npm install @mhilx/greeting --registry=https://npm.pkg.github.com
    npm install @mhilx/greeting --registry=https://registry.npmjs.org

## Usage Example
```TypeScript
import sayHello from "@mhilx/greeting";
console.log(sayHello("World"));
```
---
## How to publish a package to GitHub Packages

### Initialize NPM in your project
    npm init -y

This command will create a `package.json` file. 

### Create a personal access token
To publish your npm package using a GitHub token, you need to select the appropriate scopes when creating the token. The scopes determine the permissions and access levels that the token will have. Here are the recommended scopes for publishing an npm package:

  1. repo: This scope is required to access the repository where your npm package is located. It allows the token to read and write repository-related information.

  2. write:packages: This scope is required to publish packages to the GitHub Packages registry. It allows the token to publish, update, and delete packages associated with the repository.

  3. read:packages: This scope is required to install packages from the GitHub Packages registry. It allows the token to read and download packages associated with the repository.

  4. delete:packages: This scope is optional but recommended if you want to have the ability to delete packages from the GitHub Packages registry using the token.

When creating your GitHub token, make sure to select these scopes to ensure that you have the necessary permissions to publish your npm package.

### Create `.npmrc` file at root of project and the following lines
    @NAMESPACE:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=<YOUR_TOKEN>

### Publish Package
    npm publish --access=public
npm package: @mhio/check
Description: Check JS types
Author: Matt Hoyle
Latest version: 0.2.2

[@mhio/check](https://github.com/mhio/check)
-----------

Check JS variables types

[API docco](doc/API.md)

### Install
```
yarn add @mhio/check
npm i @mhio/check --save
```

### Usage
```
import { Check } from '@mhio/check'
let checkFn = Check.generate({
  first_name: {
    label: "First Name",
    check: 'length',
    args: [ 1, 64 ],
  },
  last_name: {
    label: "Last Name",
    check: 'length',
    args: [ 1, 96 ],
  }
  size: {
    label: "Size",
    type: 'integer' 
  }
})
const some_data = {
  first_name: 'Jimmy',
  last_name: 'Stewart',
  size: 42,
}
fn(some_data)
```

### Links

- [Github `mhio/check`](https://github.com/mhio/check)
- [npm `@mhio/check`](https://npmjs.org/package/@mhio/check)
npm package: @mhio/class-debug
Description: Class debug helper
Author: Matt Hoyle
Latest version: 0.1.1

ClassDebug
----------

## Install

```
yarn add @mhio/class-debug
npm install @mhio/class-debug
```

## Usage

[API Docs](doc/API.md)

```
import { ClassDebug } from '@mhio/class-debug'

class Meee {
  static whatever(){
    this.debug('debug is here')
    this.debugr('debugr is here')
  }
}

// This is the bit you will need to do in code
ClassDebug.setup(Meee, 'one')

// Then you end up with `.debug()` attached to the class
console.log('debug goes below here')
Meee.debug('testing')
Meee.whatever()

// and the prototype
let meee = new Meee()
meee.debug('test instance')
```

Then run the example
```
→ DEBUG='one:*' node examples/Meee.js 
debug goes below here
  one:Meee testing +0ms
  one:Meee debug is here +1ms
  one:Meee debugr is here +0ms
```
npm package: @mhio/exception
Description: Extend Errors into Exceptions
Author: mhio
Latest version: 0.2.1

Exception - [@mhio/exception](http://npmjs.com/package/@mhio/exception)
----------

ES2015+ Exception class extending Error

## Install

```
yarn add @mhio/exception
npm install @mhio/exception
```

## Usage

[API Docs](doc/API.md)

```
import { Exception } from '@mhio/exception'

class MyException extends Exception {
  constructor( message, options = {} ){
    super(message, options)
    this.myprop = options.myprop
  }
}


throw new MyException('Normal error message', { simple: 'Set a simple message', label: 'UI Label', myprop: 13 })
```

## Links

- Github - [mhio/node-exception](https://github.com/mhio/js-exception)
- npm - [@mhio/exception](https://www.npmjs.com/package/@mhio/exception)
npm package: @mhio/jobs
Description: Job/Process runner
Author: Matt Hoyle
Latest version: 0.3.2

Jobs
----------

Manage a process as a Job. 

Execute a Job, recieve an ID

Query the start of the Job. 

## Install

```
yarn add @mhio/job
npm install @mhio/job
```

## Usage

[API Docs](doc/API.md)

```
import { Job } from '@mhio/job'

let job = new Job({ command: [ 'printf', '%s\n%s\n', 'one', 'two' ] })
try {
  console.log('Job ID %s', job.id)
  await job.run() // resolves to the same `job` instance
  console.log(job.output)
} catch (err) {
  console.error(err)
  console.error('Job output', job.output)
}

```

```
import { Jobs } from '@mhio/job'

let jobs = new Jobs()
let job = jobs.createJob({ command: [ 'sh', '-c', 'echo running; sleep 4; exit 2' ] })
job.run().catch(err => console.error(err)  // resolves to the same `job` instance
console.log('Job "%s" running in the background', job.id)
```
npm package: @mhio/jwt
Description: Do JWT things for Koa
Author: mhio
Latest version: 0.6.0

JWT - @mhio/jwt
----------

Do JWT things for koa

## Install

```
yarn add @mhio/jwt
npm install @mhio/jwt
```

## Usage

```
import { Jwt } from '@mhio/jwt'

const jwt = new Jwt({ jwt_sign_secret: 'SomeStrongPasswordForJwt' })
```

Auto generated private/public key
```
import { Jwt } from '@mhio/jwt'
import Koa from 'koa'
import Router from '@koa/router'

const jwt = new Jwt({ jwt_algorithm: 'RS256' })
const app = new Koa()
const router = new Router()

router.get('/jwt', async function(ctx) {
  const token = await jwt.jwtSign({ role: 'admin' })
  ctx.body = token
})
router.use(jwt.koaMiddleware())
router.get('/protected', async function(ctx) {
  ctx.body = ok
})

app.use(router.routes())
 .use(router.allowedMethods())


```

## Links

https://github.com/mhio/node-jwt

https://www.npmjs.com/package/@mhio/jwt
npm package: @mhio/koa-api-handle
Description: Koa API Handler
Author: mhio
Latest version: 0.12.1

@mhio/koa-api-handle
--------------------

A Koa API Handler to do all the request heavy lifting, so you just write logic

Higher level use from: https://github.com/mhio/node-koa-api

## Install

```
yarn add @mhio/koa-api-handle
npm install @mhio/koa-api-handle
```

## Usage

[API docs](doc/API.md)

```
const Koa = require('koa')
const Router = require('koa-router')
const {KoaApiHandle} = require('@mhio/koa-api-handle')

class MyHandler {
  
  static get error_message(){
    return 'Failure'
  }

  static async ok(ctx){
    return {
      ok: true,
      request_id, ctx.state.request_id,
    }
  }

  static async other(){
    return 'other'
  }

  static async error(){
    throw new Error(this.error_message)
  }

}

const app = new Koa()
const router = new Router()

app.use(KoaApiHandle.error())
app.use(KoaApiHandle.tracking())

router.get('/ok', KoaApiHandle.response(MyHandler, 'ok'))
router.post('/other', KoaApiHandle.response(MyHandler, 'other'))
router.get('/error', KoaApiHandle.response(MyHandler.error.bind(MyError)))

app.use(router.routes())
   .use(router.allowedMethods())

app.use(KoaApiHandle.notFound())

app.listen()
```

## Changes

v0.12.x -- Node 20+, pino for logger


https://github.com/mhio/node-koa-api-handle
npm package: @mhio/koa-generic-handle
Description: Shared components for [@mhio/koa-api-handle](https://github.com/mhio/node-koa-api-handle)  and [@mhio/koa-web-handle](https://github.com/mhio/node-koa-web-handle)
Author: mhio
Latest version: 0.3.0

# @mhio/koa-generic-handle

Shared components for [@mhio/koa-api-handle](https://github.com/mhio/node-koa-api-handle)
 and [@mhio/koa-web-handle](https://github.com/mhio/node-koa-web-handle)

[npm](https://www.npmjs.com/package/@mhio/koa-generic-handle)

### Related

[@mhio/koa-api](https://www.npmjs.com/package/@mhio/koa-api) / 
 [@mhio/koa-api-handle](https://www.npmjs.com/package/@mhio/koa-api-handle)

[@mhio/koa-web](https://www.npmjs.com/package/@mhio/koa-web) / 
 [@mhio/koa-web-handle](https://www.npmjs.com/package/@mhio/koa-web-handle)
npm package: @mhio/koa-handle
Description: Koa API Promise Handler
Author: Matt Hoyle
Latest version: 0.4.0

@mhio/koa-handle
--------------------

A Koa Handler to do all the heavy lifting, so you just write logic


## Install

```
yarn add @mhio/koa-handle
npm install @mhio/koa-handle
```

## Usage

[API docs](doc/API.md)

```
const Koa = require('koa')
const Router = require('koa-router')
const {KoaHandle} = require('@mhio/koa-handle')

let handler = {
  ok: ()=> Promise.resolve('<ok>ok</ok>'),
  template: ()=> Promise.resolve({ say: 'hello' }),
  error: ()=> Promise.reject(new Error('nope')),
}

const app = new Koa()
const router = new Router()

KoaHandle.views({ path: '../views', engine: 'mustache', extension: 'ms' })
app.use(KoaHandle.tracking()) // first for logging/timings
app.use(KoaHandle.error())

router.get('/ok', KoaHandle.response(handler, 'ok'))
router.post('/rendered', KoaHandle.response(handler, 'other', { template: 'helloer' }))
router.get('/error', KoaHandle.response(handler, 'error'))

app.use(router.routes())
   .use(router.allowedMethods())

app.use(KoaHandle.notFound())

app.listen()
```
npm package: @mhio/koa-web
Description: Koa Web Sites
Author: mhio
Latest version: 0.1.1

@mhio/koa-web | [git](https://github.com/mhio/node-koa-web) | [npm](https://www.npmjs.com/package/@mhio/koa-web)
--------------------

A Koa Web module to do all the request heavy lifting, so you just write logic/templates

Errors, logging, and templates are handled, just `return` the data or `throw` the errors

Based on [`@mhio/koa-web-handle`](https://github.com/mhio/node-koa-web-handle) under the hood.

## Install

```
yarn add @mhio/koa-web
npm install @mhio/koa-web
```

## Usage

[API docs](doc/API.md)

```
const {KoaWeb, KoaWebHandler} = require('@mhio/koa-web')

class MyHandler extends KoaWebHandler {
  static templateWhateverThePath(ctx) {
     return 'goes in `whatever` from /the/path'
  }
  static responseOveralls(ctx) {
     return '<span>some html on /overalls</span>'
  }
}

const web = new KoaWeb({ routes: MyHandler.routeConfig() })
web.listen().then(srv => console.log(srv))
```

Or custom config can be injected as an array of `routes`
```
const {KoaWeb} = require('@mhio/koa-web')

class MyHandler {

  static get error_message(){
    return 'Failure'
  }

  static async ok(ctx){
    return {
      ok: true,
      request_id, ctx.state.request_id,
    }
  }

  static async other(){
    return 'other'
  }

  static async error(){
    throw new Error(this.error_message)
  }

}

// Route config for the API
const routes = [
  // Simple function
  [ 'get', '/ok', MyHandler.ok ],

  // Function bound to parent
  [ 'get', '/ok2', MyHandler, 'ok' ],

  // Object setup
  { method: 'post', path: '/other', fn: MyHandler.other },

  // binds `MyHandler` for you
  { method: 'get', path: '/error', handler_object: MyHandler, handler_function: 'error' },
]
const web = new KoaWeb({ routes })
web.listen().then(srv => console.log(srv))
```

## Related

[npm](https://www.npmjs.com/package/@mhio/koa-web)

[@mhio/koa-api](https://www.npmjs.com/package/@mhio/koa-api) /
 [@mhio/koa-api-handle](https://www.npmjs.com/package/@mhio/koa-api-handle)

[@mhio/koa-web](https://www.npmjs.com/package/@mhio/koa-web) /
 [@mhio/koa-web-handle](https://www.npmjs.com/package/@mhio/koa-web-handle)
npm package: @mhio/koa-web-handle
Description: Koa Web template/response handler
Author: mhio
Latest version: 0.6.0

@mhio/koa-handle | [git](https://github.com/mhio/node-koa-web-handle) | [npm](https://www.npmjs.com/package/@mhio/koa-web-handle)
--------------------

A Koa Handler to do all the heavy lifting, so you just write logic


## Install

```
yarn add @mhio/koa-web-handle
npm install @mhio/koa-web-handle
```

## Usage

[API docs](doc/API.md)

```
const Koa = require('koa')
const Router = require('koa-router')
const {KoaWebHandle} = require('@mhio/koa-web-handle')

let handler = {
  ok: ()=> Promise.resolve('<ok>ok</ok>'),
  template: ()=> Promise.resolve({ say: 'hello' }),
  error: ()=> Promise.reject(new Error('nope')),
}

const app = new Koa()
const router = new Router()

KoaHandle.views({ path: '../views', engine: 'mustache', extension: 'ms' })
app.use(KoaHandle.tracking()) // first for logging/timings
app.use(KoaHandle.error())

router.get('/ok', KoaHandle.response(handler, 'ok'))
router.post('/rendered', KoaHandle.response(handler, 'other', { template: 'helloer' }))
router.get('/error', KoaHandle.response(handler, 'error'))

app.use(router.routes())
   .use(router.allowedMethods())

app.use(KoaHandle.notFound())

app.listen()
```


## Related

[npm](https://www.npmjs.com/package/@mhio/koa-web-handle)

[@mhio/koa-api](https://www.npmjs.com/package/@mhio/koa-api) /
 [@mhio/koa-api-handle](https://www.npmjs.com/package/@mhio/koa-api-handle)

[@mhio/koa-web](https://www.npmjs.com/package/@mhio/koa-web) /
 [@mhio/koa-web-handle](https://www.npmjs.com/package/@mhio/koa-web-handle)
npm package: @mhio/message
Description: Classes for carrying messages around an app or api
Author: Matt Hoyle
Latest version: 0.5.0

# @mhio/message

Standardised messages inside your app, with an id and timestamp.

## Install

```
yarn add @mhio/message
npm install @mhio/message
```

## Usage

```
const { Message, MessageData } = require('@mhio/message')

let m = new Message()
// Message { id: 'OLZmJLjSReTYqZYVAM', ts: 1520632858508 }

let md = new MessageData({ foo: 'bar' })
// MessageData { id: 'kC8gVDlWW89PS8gDX2', ts: 1520632986181, data: { foo: 'bar' } } 
```
npm package: @mhio/node-logger
Description: @mhio/node-logger -----------
Author: mhio
Latest version: 0.5.4

@mhio/node-logger
-----------

Node logging with [`pino`](https://github.com/pinojs/pino) and [`debug`](https://github.com/visionmedia/debug).

```
yarn add @mhio/node-logger
```

Setup a base logger in `./logger.js`
```
import { MhioLogger } from '@mhio/node-logger'
export const Logger = new MhioLogger('your:log:prefix')
export default Logger
// or
const { MhioLogger } = require('@mhio/node-logger')
const Logger = new MhioLogger('your:log:prefix')
module.exports = Logger
```

Then in each module
```
import Logger from './logger'
const Logger = require('./logger')

const { logger, debug } = Logger.ns('myModule')

// Pino
logger.info({ msg: 'test', data: {} })

// DEBUG="your:prefix" node app.js
debug('test', { ok: true })
```

## Changelog

0.3.0 Upgrade to pino 6, remove debug as it's a runtime injection

0.2.0 Remove `{namespace}` duplication from loggers metadata

## Related

[`@mhio/node-logger-http`](https://github.com/mhio/node-logger-http)
npm package: @mhio/node-logger-http
Description: Extends [`@mhio/node-logger`](https://github.com/mhio/node-logger) with koa middleware ``` import { MhioLoggerHttp } from '@mhio/node-logger-http' ```
Author: mhio
Latest version: 0.3.0


Extends [`@mhio/node-logger`](https://github.com/mhio/node-logger) with koa middleware
```
import { MhioLoggerHttp } from '@mhio/node-logger-http'
```

### Changelog

0.3.0 pino-http@5.3. and 0node-logger@0.3.0 (pino@6.7.0)

0.2.0 Upgrade to node-logger 0.2.0 for `{namespace}` duplication fix
npm package: @mhio/pinky
Description: pinky promise -------------
Latest version: 0.8.3


pinky promise
-------------

[github.com/mhio/pinky](https://github.com/mhio/pinky)

```
yarn add @mhio/pinky
npm i @mhio/pinky
```

`delay(ms) ⇒ Promise`<br>
delay for ms

`delayFrom(ts, ms) ⇒ Promise`<br>
Delay from a timestamp for milliseconds

`delayTo(ts) ⇒ Promise`<br>
Delay until a timestamp milliseconds

`map(iterator, asyncFn) ⇒ Promise.<Array>`<br>
map an async function across an iterable

`mapSeries(iterator, asyncFn) ⇒ Promise.<Array>`<br>
map an async function in series across an iterable

`mapConcurrent(iterator_in, asyncFn, concurrent_num) ⇒ Promise.<Array>`<br>
Use n workers to resolve a function across an iterable. (via .mapSeries) Resulting array is in worker order, then work started order, so doesn't match initial order.

`firstWithoutError(iterable) ⇒ Promise`<br>
Run a bunch of promises, if the first fails return the next until all promises have been checked. All promises start resolving immediately.

`firstInSeriesWithoutError(iterable) ⇒ Promise`<br>
Run a bunch of promises in series, if the one fails move onto the next.

`allProps(obj) ⇒ object`<br>
Resolve all promises in an object

`outerSettle()`<br>
Create a promise and return the promise,resolve and reject Allows you to resolve/reject the promise out of the promise scope

`waitFor(timeout_ms, condition_fn, options) ⇒ object`<br>
Wait until a timestamp for some condition function to become truthey. Can be an async or standard function


[API docco](https://mhio.github.io/pinky/modules.html)

```
const { delay, mapSeries } = require('@mhio/pinky')
import { delay, mapSeries } from '@mhio/pinky'

async function go(){
  const waits = [ 60, 10, 50, 5, 35, 19 ]
  const res = await mapSeries(waits, async (ms) => {
    console.log('wait ms', ms)
    await delay(ms)
    return ms
  })
}

go().catch(console.error)
```

mhio 2022
npm package: @mhio/spawn
Description: Spawn a process
Author: Matt Hoyle
Latest version: 0.6.1

Spawn - @mhio/spawn
----------

Spawn a process

## Install

```
yarn add @mhio/spawn
npm install @mhio/spawn
```

## Usage

[API Docs](doc/API.md)

```
import { Spawn } from '@mhio/spawn'

let proc = Spawn.run([ 'printf', '%s\n%s\n', 'one', 'two' ], {})
```
npm package: @mhio/taxios
Description: Test apps with axios
Author: mhio
Latest version: 0.6.5

# taxios

Testing made easier with axios.
If your app can inject a pino logger, mocha can dump more app context on errors.

```
const { App } = require('../lib/App')
const { Taxios } = require('taxios')

describe('test the app', function(){

  let request

  beforeEach(async function(){
    const logger = Taxios.logger()
    const app = await App.setup({ logger })
    request = await Taxios.app(app, logger)
  })

  afterEach(async function(){
    // Get some error context from your app, if it uses the logger
    request.handleMochaError(this)
    // Close down the server
    await request.cleanUp()
  })

  // Or both steps in one
  afterEach(async function(){
    await request.afterMocha(this)
  })

  it('should request from the app for great success', async function(){
    const res = request.send('get', '/whatever', {}, { headers: { type: 'yeet' } })
    expect( res.data ).to.containSubset({
      yote: true
    })
  })

})
```
npm package: @mhio/test-cli
Description: Cli command and code test helpers
Author: mhio
Latest version: 0.3.1

# [mhio - test cli commands](https://github.com/mhio/mhio-test-cli)

## @mhio/test-cli

Helper classes for testing cli commands and cli code.

Stores the stdout, stderr and return of the command for subsequent testing.

## Install
 
    yarn add mhio-test-cli --dev

    npm install mhio-test-cli --save-dev

## Usage

### Cli

```javascript

const { Cli } = require('@mhio/test-cli') 
Cli.run(['echo', 'test']).then(results => {
  console.log(results.stdout)
  console.log(results.stdout)
  console.log(results.exit_code)
})

```

### Cli Code

```javascript

const { CliCode } = require('@mhio/test-cli') 

const fn = ()=> { 
  console.log('testout')
  console.error('testerr')
  process.exit(1)
}

CliCode.run(fn).then(results => {
  console.log(results.stdout)
  console.log(results.stdout)
  console.log(results.return) // The data the function returns
  console.log(results.exit)   // Did the code try to exit
  console.log(results.exit_code) // What was the exit code
})

```

## About

mhio-test-cli is released under the MIT license.

Copyright 2019 mhio

https://github.com/mhio/mhio-test-cli
npm package: @mhirba/babel-preset-next
Description: Mhirba's babel preset for typescript and next features
Author: Majdi Toumi
Latest version: 1.9.2
Deprecated: For study, not used yet sorry :|

# @mhirba/babel-preset-next

<p>
	<a href="https://circleci.com/gh/mhirba/babel-preset-next">
		<img src="https://img.shields.io/circleci/project/github/mhirba/babel-preset-next.svg?style=flat-square&logo=circleci" alt="build status">
	</a>
	<a href="https://mhirba.com">
		<img src="https://img.shields.io/npm/v/@mhirba/babel-preset-next.svg?style=flat-square&logo=npm" alt="version">
	</a>
</p>

## <a name='TOC'>Summary</a>

- [Overview](#overview)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Credits](#credits)

## <a name='overview'>Overview</a>

A Node.js Typescript with Babel configuration for Mhirba source code.<br />
Yes, it's a beautiful 融合, Fūjon :)

> Je ne pense jamais au futur. Il vient bien assez tôt.. \_ Albert Einstein

## <a name='installation'>Installation</a>

Use Yarn or NPM to install.

```console
❯ yarn add --dev @mhirba/babel-preset-next
```

or

```console
❯ npm install --save-dev @mhirba/babel-preset-next
```

## <a name='usage'>Usage</a>

### Simple. Basic.

Extends your specific babel configuration and add the presets; For example in an `.babelrc` file:

```json
{
  "presets": ["@mhirba/next"]
}
```

## <a name='configuration'>Configuration</a>

### Presets

We use the basic presets **@babel/env** and **@babel/typescript**

### Plugins

The plugins used are:

- **@babel/plugin-transform-runtime**
- **@babel/plugin-proposal-class-properties**
- **@babel/plugin-proposal-object-rest-spread**
- **@babel/plugin-proposal-decorators**
- **@babel/plugin-proposal-object-rest-spread**
- **babel-plugin-transform-typescript-metadata**

## <a name='credits'>Credits</a>

Craft with :heart: by [**Majdi Toumi**](http://majditoumi.com)|[**Mhirba**](http://mhirba.com) in **Paris**.
npm package: @mhirba/eslint-config-base
Description: Mhirba's eslint configuration preset for typescript
Author: Majdi Toumi
Latest version: 1.5.0
Deprecated: For study, not used yet sorry :|

# @mhirba/eslint-config-base

<p>
	<a href="https://circleci.com/gh/mhirba/eslint-config-base">
		<img src="https://img.shields.io/circleci/project/github/mhirba/eslint-config-base.svg?style=flat-square&logo=circleci" alt="build status">
	</a>
	<a href="https://mhirba.com">
		<img src="https://img.shields.io/npm/v/@mhirba/eslint-config-base.svg?style=flat-square&logo=npm" alt="version">
	</a>
</p>

## <a name='TOC'>Summary</a>

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usge)
- [Credits](#credits)

## <a name='overview'>Overview</a>

A Node.js ESLint configuration for Mhirba source code.<br />

> L'exception vient toujours de la raison de la règle. \_ Joseph Joubert

## <a name='installation'>Installation</a>

Use Yarn or NPM to install.

```console
❯ yarn add --dev @mhirba/eslint-config-base
```

or

```console
❯ npm install --save-dev @mhirba/eslint-config-base
```

## <a name='usage'>Usage</a>

### Simple. Basic.

Extends your specific ESLint configuration and add your rules; For example in an `.eslintrc.js` file:

```javascript
module.exports = {
  extends: '@mhirba/eslint-config-base',
  globals: {
    iWantThisGlobal: true
  },
  rules: {
    'linebreak-style': ['error', 'unix'], // https://eslint.org/docs/rules/linebreak-style
  }
```

## <a name='credits'>Credits</a>

Craft with :heart: by [**Majdi Toumi**](http://majditoumi.com)|[**Mhirba**](http://mhirba.com) in **Paris**.
npm package: @mhirba/eslint-config-react
Description: Mhirba's eslint configuration preset for typescript + react
Author: Majdi Toumi
Latest version: 2.1.0
Deprecated: For study, not used yet sorry :|

# @mhirba/eslint-config-react

<p>
	<a href="https://circleci.com/gh/mhirba/eslint-config-react">
		<img src="https://img.shields.io/circleci/project/github/mhirba/eslint-config-react.svg?style=flat-square&logo=circleci" alt="build status">
	</a>
	<a href="https://mhirba.com">
		<img src="https://img.shields.io/npm/v/@mhirba/eslint-config-react.svg?style=flat-square&logo=npm" alt="version">
	</a>
</p>

## <a name='TOC'>Summary</a>

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usge)
- [Credits](#credits)

## <a name='overview'>Overview</a>

A Node.js ESLint configuration for Mhirba source code.

> L'exception vient toujours de la raison de la règle. \_ Joseph Joubert

## <a name='installation'>Installation</a>

Use Yarn or NPM to install.

```console
❯ yarn add --dev @mhirba/eslint-config-react
```

or

```console
❯ npm install --save-dev @mhirba/eslint-config-react
```

## <a name='usage'>Usage</a>

### Simple. Basic.

Extends your specific ESLint configuration and add your rules; For example in an `.eslintrc.js` file:

```javascript
module.exports = {
  extends: '@mhirba/react',
  globals: {
    iWantThisGlobal: true
  },
  rules: {
    "react/jsx-uses-react": "error",
    "react/jsx-uses-vars": "error",
  }
```

## <a name='credits'>Credits</a>

Craft with :heart: by [**Majdi Toumi**](http://majditoumi.com)|[**Mhirba**](http://mhirba.com) in **Paris**.
npm package: @mhirba/shenron-capsule
Description: Mhirba's miscellaneous toolbox
Author: Majdi Toumi
Latest version: 1.5.0
Deprecated: For study, not used yet sorry :|

<h1 align="center">
  <br />
    <a href="https://mhirba.com">
      <img src="./assets/shenron.capsule.logo.png">
    </a>
</h1>

<p align="center">
  <a href="https://codeclimate.com/repos/5db5fa5b01ea1f014e0017ee/maintainability">
    <img src="https://api.codeclimate.com/v1/badges/2f38138d2bccb83281f2/maintainability" alt="code quality" />
  </a>

  <a href="https://codeclimate.com/repos/5db5fa5b01ea1f014e0017ee/test_coverage">
    <img src="https://api.codeclimate.com/v1/badges/2f38138d2bccb83281f2/test_coverage" />
  </a>

  <a href="https://www.npmjs.com/package/@mhirba/shenron-capsule">
    <img src="https://img.shields.io/npm/v/@mhirba/shenron-capsule.svg?style=flat-square&logo=npm" alt="version">
  </a>
  <a href="https://mhirba.com">
    <img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square&logo=docker" alt="software license">
  </a>
</p>

<p align="center">
  <code>@mhirba/shenron-capsule</code> is a simple way to use miscellaneous utilities
  <br />
</p>

## <a name='TOC'>Summary</a>

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usge)
- [Credits](#credits)

## <a name='overview'>Overview</a>

Simple package used internally at mhirba for simple utilities such as **log**, **command line arguments parsing**, etc.

> Je suis adroit de la main gauche et je suis gauche de la main droite \_ Raymond Devos

## <a name='installation'>Installation</a>

Use Yarn or NPM to install.

```sh
❯ yarn add @mhirba/shenron-capsule
```

or

```sh
❯ npm install @mhirba/shenron-capsule
```

## <a name='usage'>Usage</a>

### Simple. Basic.

A tiny library with vanilla individual export functions:

#### log

Display output depending several options like colors, timestamps and newLine.

```typescript
import { log, LogLevel } from '@mhirba/shenron-capsule'

log('Hello, World', { how: LogLevel.INFO, withTimestamps: true })
```

```console
❯ ts-node ./main.ts
2019-10-29T21:55:40+01:00 :: Hello, World
```

> There is also some alias **logError**, **logWarn**, **logWithSteps**, etc.

### Scraping

Some usefull function to use specific [**puppeteer**](https://github.com/GoogleChrome/puppeteer) action with ease

#### download

Fetch and save a file from a web link

```typescript
import { download } from '@mhirba/shenron-capsule'

await download('https://mhirba.com/nindo.pdf', './philosophy/mhirba-nindo.pdf')
```

```console
❯ ts-node ./main.ts
File `mhirba-nindo.pdf` successfully saved in directory `./philosophy` !
```

## <a name='credits'>Credits</a>

Craft with :heart: by [**Mhirba**](http://mhirba.com) in **Paris**.
npm package: @mhirba/shenron-capsule-gatsby
Description: Mhirba's miscellaneous toolbox for gatsby
Author: Majdi Toumi
Latest version: 1.1.1
Deprecated: For study, not used yet sorry :|

## Shenron-capsule-gatsby

<p align="center">
  <code>@mhirba/shenron-capsule-gatsby</code> is a simple way to use miscellaneous utilities
  <br />
</p>

## <a name='TOC'>Summary</a>

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usge)
- [Credits](#credits)

## <a name='overview'>Overview</a>

Simple package used internally at mhirba for simple utilities such as **log**, **command line arguments parsing**, etc.

> Je suis adroit de la main gauche et je suis gauche de la main droite \_ Raymond Devos

## <a name='installation'>Installation</a>

Use Yarn or NPM to install.

```sh
❯ yarn add @mhirba/shenron-capsule
```

or

```sh
❯ npm install @mhirba/shenron-capsule
```

## <a name='usage'>Usage</a>

### Simple. Basic.

A tiny library with vanilla individual export functions:

#### log

Display output depending several options like colors, timestamps and newLine.

```typescript
import { log, LogLevel } from '@mhirba/shenron-capsule'

log('Hello, World', { how: LogLevel.INFO, withTimestamps: true })
```

```console
❯ ts-node ./main.ts
2019-10-29T21:55:40+01:00 :: Hello, World
```

> There is also some alias **logError**, **logWarn**, **logWithSteps**, etc.

### Scraping

Some usefull function to use specific [**puppeteer**](https://github.com/GoogleChrome/puppeteer) action with ease

#### download

Fetch and save a file from a web link

```typescript
import { download } from '@mhirba/shenron-capsule'

await download('https://mhirba.com/nindo.pdf', './philosophy/mhirba-nindo.pdf')
```

```console
❯ ts-node ./main.ts
File `mhirba-nindo.pdf` successfully saved in directory `./philosophy` !
```

## <a name='credits'>Credits</a>

Craft with :heart: by [**Mhirba**](http://mhirba.com) in **Paris**.