open-index/open-npm huggingface dataset:
npm package: @refactor-later/core
Description: Basic http-server functionality
Author: Marcus Klein
Latest version: 0.0.2

[![Build Status](https://travis-ci.com/marcklei/refactor-later.svg?branch=master)](https://travis-ci.com/marcklei/refactor-later)
[![Maintainability](https://api.codeclimate.com/v1/badges/4ca9acecbe97cf744377/maintainability)](https://codeclimate.com/github/marcklei/refactor-later/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/4ca9acecbe97cf744377/test_coverage)](https://codeclimate.com/github/marcklei/refactor-later/test_coverage)

Most importantly, here are the badges. :)

# @refactor-later/core

This is a fun repository to play around with node http.  
It is not its aim to be a production ready framework. If you are looking for a solid solution maybe try one of my favorites:

[Nest.js](https://nestjs.com/)  
If you love typescript and/or angular you will love it aswell.

[Fastify](https://www.fastify.io/)  
Currently the fastest lightweight framework around.

[Hapi.js](https://hapijs.com/)  
Lightweight and easy to configure.

[Express.js](http://expressjs.com/)  
And of course the good old express.

## Installation

`npm install @refactor-later`

## Usage

```javascript
const http = require('http')
const { createApp, prepareRoutes } = require('@refactor-later/core')

const PORT = process.env.port || 3000

const routes = prepareRoutes({
  GET: [
    {
      path: '/',
      handler: (req, res) => {
        res.writeHead(200, {
          'Content-Type': 'application/json'
        })
        res.write(JSON.stringify({ hello: 'world' }))
        res.end()
      }
    },
    {
      path: '/posts/:postId?sort=date',
      handler: (req, res) => {
        const { postId } = req.params
        const { sort } = req.query
        res.writeHead(200, {
          'Content-Type': 'application/json'
        })
        res.write(JSON.stringify({ 
          postId,
          sort
        }))
        res.end()
      }
    }
  ]
})

const app = createApp({ routes })
const server = http.createServer(app)

server.listen(PORT, () => {
  console.log(`Server listening on port ${PORT}`)
})
```

## API

TBD

### createApp(config)
___

### prepareRoutes(routes)
___

### mergeRoutes(route1, routes2, ...)
___
npm package: @refactoring/whatsapp-sdk
Description: WhatsApp Cloud API SDK for Node.js
Author: Refactoring, SRL
Latest version: 1.0.1

# WhatsApp Cloud API SDK

<p align="center">
<img src="./assets/whatsapp-sdk.svg" width="300" alt="@refactoring-do/whatsapp-sdk" />
</p>

Dependencies-free WhatsApp Cloud API SDK for Node.js.

[![NPM Package](https://github.com/refactoring-do/whatsapp-sdk/actions/workflows/publish-package-npm.yml/badge.svg)](https://github.com/refactoring-do/whatsapp-sdk/blob/main/.github/workflows/publish-package-npm.yml)
[![Tests](https://github.com/refactoring-do/whatsapp-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/refactoring-do/whatsapp-sdk/blob/main/.github/workflows/tests.yml)
[![Linting and Formatting](https://github.com/refactoring-do/whatsapp-sdk/actions/workflows/lint-format.yml/badge.svg)](https://github.com/refactoring-do/whatsapp-sdk/blob/main/.github/workflows/lint-format.yml)

## Getting Started

Ready to send WhatsApp messages? Prepare to do it as efficiently and simply as possible.

### Installation

#### Install from NPM

```sh
npm install @refactoring/whatsapp-sdk
```

### Usage example

```ts
import { Client } from "@refactoring/whatsapp-sdk";

(async () => {
  const client = new Client({
    accessToken: 'Introduce here your bearer token',
    cloudApiVersion: 'v15.0',
    phoneNumberId: 000000000000000,
  });

  await client.sendText({ body: 'Hello world from Mars!' }, '10000000000');
})();
```

### Credits

This package has been inspired by the [official WhatsApp Cloud API for Node.js](https://github.com/WhatsApp/WhatsApp-Nodejs-SDK). A few improvements and facilities have been added.

Made with ❤️ by [Refactoring, SRL](https://refactoring.do)
npm package: @refactoring/whatsapp-webhook
Description: WhatsApp Cloud API webhook in a nutshell
Author: Refactoring, SRL
Latest version: 1.0.5

# WhatsApp Cloud API Webhook

<p align="center">
<img src="./assets/logo.svg" width="300" alt="@refactoring-do/whatsapp-webhook" />
</p>

WhatsApp Cloud API Webhook for message subscriptions.

[![NPM Package](https://github.com/refactoring-do/whatsapp-webhook/actions/workflows/publish-package-npm.yml/badge.svg)](https://github.com/refactoring-do/whatsapp-webhook/blob/main/.github/workflows/publish-package-npm.yml)
[![Tests](https://github.com/refactoring-do/whatsapp-webhook/actions/workflows/tests.yml/badge.svg)](https://github.com/refactoring-do/whatsapp-webhook/blob/main/.github/workflows/tests.yml)
[![Linting and Formatting](https://github.com/refactoring-do/whatsapp-webhook/actions/workflows/lint-format.yml/badge.svg)](https://github.com/refactoring-do/whatsapp-webhook/blob/main/.github/workflows/lint-format.yml)

## Getting started

1. Install dependecy

    ```sh
    npm install @refactoring/whatsapp-webhook
    ```

2. Write the following code:

    ```js
    import { Logger, Webhook, ProcessedMessage } from "@refactoring/whatsapp-webhook";

    const observer = (message: any) => {
      console.log(JSON.stringify(message));
    };

    const port = +process.env['PORT'] || 3000;
    const verificationToken = process.env['VERIFICATION_TOKEN'] || 'qwertyuiop1234567890';

    (async () => {
      const webhook = new Webhook({
        endpoint: '/webhook',
        port,
        verificationToken,
        observer,
      });

      webhook.run().then(Logger.log).catch(Logger.error);
    })();
    ```

3. Run the code

    ```sh
      node webhook.js
    ```

4. Output

    The server is listening on the provided port and ready to verify the WhatsApp Cloud API token and receive messages.

## Debuggin

1. Install cloudflared CLI:

    ```sh
    brew install cloudflared
    ```

2. Run instance with a Cloudflare tunnel:

    ```sh
    cloudflared tunnel --url localhost:3000   
    ```

3. Write message to the bot and wait for the webhook subscription.

### Credits

This package has been inspired by the [official WhatsApp Cloud API for Node.js](https://github.com/WhatsApp/WhatsApp-Nodejs-SDK). A few improvements and facilities have been added.

Made with ❤️ by [Refactoring, SRL](https://refactoring.do)
npm package: @refactorjs/http-proxy-middleware
Description: Alternative to http-proxy-middleware
Author: Steven Chim
Latest version: 0.0.1

<h1 align="center" >Http Proxy Middleware</h1>
<p align="center">An Alternative to HTTP Proxy Middleware</p>

<p align="center">
<a href="https://www.npmjs.com/package/@refactorjs/http-proxy-middleware">
    <img alt="" src="https://img.shields.io/npm/v/@refactorjs/http-proxy-middleware.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/@refactorjs/http-proxy-middleware">
    <img alt="" src="https://img.shields.io/npm/dt/@refactorjs/http-proxy-middleware.svg?style=flat-square">
</a>
</p>
npm package: @refactorpro/pixi-virtual-joystick
Description: 🕹 Virtual Touch Joystick for pixi.js
Author: Endel Dreyer
Latest version: 0.4.3

# 🕹 pixi-virtual-joystick

Virtual Touch Joystick for [pixi.js](https://github.com/pixijs/pixi.js), tested on both Pixi v5 and Pixi v6.

<img src="screenshot.gif?raw=1" />

## Usage

```typescript
import { Joystick } from "pixi-virtual-joystick";

const joystick = new Joystick({
  outer: PIXI.Sprite.from("outer"), // ("images/joystick.png")
  inner: PIXI.Sprite.from("inner"), // ("images/joystick-handle.png")

  outerScale: { x: 0.5, y: 0.5 },
  innerScale: { x: 0.8, y: 0.8 },

  onChange: (data) => {
    console.log(data.angle); // Angle from 0 to 360
    console.log(data.direction); // 'left', 'top', 'bottom', 'right', 'top_left', 'top_right', 'bottom_left' or 'bottom_right'.
    console.log(data.power); // Power from 0 to 1
  },

  onStart: () => {
    console.log('start')
  },

  onEnd: () => {
    console.log('end')
  },
});

app.stage.addChild(joystick);
```

## Similar alternatives

- [nipplejs](https://github.com/yoannmoinet/nipplejs/) (more features, DOM-based)
- [react-nipple](https://github.com/loopmode/react-nipple)

## License

Endel Dreyer © MIT