open-index/open-npm huggingface dataset:
npm package: @routeinc/node
Description: Core NodeJS modules for Route backends.
Author: routeinc
Latest version: 1.0.4

# Route 2.0 Nodes

## About This Package

This package was created for sharing core nodejs modules across services for the Route Platform.

### Dependencies

- colors
- cookie-session
- express
- express-validator
- jsonwebtoken
- node-nats-streaming
- uuid

### Developer Dependencies

- @babel/cli
- @babel/core
- @babel/preset-env
- copyfiles
- prettier
- rimraf

## Errors

Use the following Errors by their corresponding HTTP Status Codes:

- 400 (Bad Request) - BadRequestError
- 401 (Unauthorized) - AuthenticationError
- 403 (Forbidden) - AuthorizationError
- 404 (Not Found) - NotFoundError
- 409 (Conflict) - ResourceAlreadyExistsError
- 422 (Unprocessable Entity) - RequestValidationError
- 500 (Internal Server Error) - GeneralError
- 503 (Service Unavailable) - DatabaseConnectionError

The Unknown Error is returned by the Error Middleware when an Error occurs and is not an instance of a known Error type. This ensures that any internal backend server errors are not sent to the frontend.

## Events

Events were developed for use with NATS Streaming Server.

### Listeners

Pass a custom onMessage handler to the subscribe function to handle message parsing. Be sure to call `event.ack()` at the end of your handler to acknowledge the event for the NATS Streaming Server.

- @client: Stan, an instantiated node-nats-streaming service
- @group: String, typically process.env.APP_NAME
- @channel: String, of the convetion 'service:action' (such as 'user:created')
- @subscribe: (onMessage: onMessage) => void
- @onEvent: (event: EventData) => void
- @parse: (message: Message) => any
- @subscriptionOptions: SubscriptionOptions, usually best to use defaults
- @wait: Number, default is 5000ms

### Publishers

Publishers do not need much customization beyond the channel. Simply send through any data you'd like.

- @client: Stan, an instantiated node-nats-streaming service
- @channel: String, of the convetion 'service:action' (such as 'user:created')
- @publish: (data) => void

## Middleware

The following Express Middleware is available through this package:

- errors: All purpose Express Error Handler, see Errors for types
- isAuthenticated: Verify JSON Web Tokens
- isAuthorized: Access Control (ACL) -- INCOMPLETE
- isValid: Validate values passed to Express Validator
- NotFound: 404 Handler for Express Router (not for requested resources that cannot be found)
- responses: Express Handler for HTTP Responses

## Utils

### Launcher

A more fun than useful terminal message used when the server starts.

### Terminator

Server termination handler, for the most part using a standard NodeJS shutdown configuration. Shuts down NATS Streaming Server if one is running.

### Token

JSON Web Token creation, decoding and verification. Requires a valid secret found at process.env.JWT_SECRET.
npm package: @routejs/router
Description: Fast and lightweight http routing engine for nodejs
Author: Rajkumar Dusad
Latest version: 3.0.3

<p align="center">
  <img src="https://raw.githubusercontent.com/routejs/docs/main/routejs.jpg" width="400px" alt="Routejs Logo">
</p>

[![NPM Version][npm-version-image]][npm-url]
[![NPM Install Size][npm-install-size-image]][npm-install-size-url]
[![NPM Downloads][npm-downloads-image]][npm-downloads-url]

Routejs is a fast and lightweight http routing engine for [Node.js](http://nodejs.org)

## Features

- Fast and lightweight
- Group based routing
- Host based routing
- Named routing
- Middleware support
- Object and array based routing
- Regular expression support

## Installation

Install using npm:

```console
$ npm i @routejs/router
```

Install using yarn:

```console
$ yarn add @routejs/router
```

## Example

```js
const { Router } = require("@routejs/router");
const http = require("http");

const app = new Router();

app.get("/", function (req, res) {
  res.end("Ok");
});

// Create 404 page not found error
app.use(function (req, res) {
  res.writeHead(404).end("404 Page Not Found");
});

http.createServer(app.handler()).listen(3000);
```

## Url route example

Routejs is very simple and flexible, it support both object and array based url routing.

Let's create `urls.js` urls file for routes:

```js
const { path, use } = require("@routejs/router");

// Url routes
const urls = [
  path("get", "/", (req, res) => res.end("Ok")),
  // Create 404 page not found error
  use((req, res) => res.writeHead(404).end("404 Page Not Found")),
];

module.exports = urls;
```

Use urls in routejs app:

```javascript
const { Router } = require("@routejs/router");
const http = require("http");
const urls = require("./urls");

const app = new Router();

// Use url routes
app.use(urls);

http.createServer(app.handler()).listen(3000);
```

## Documentation

- Learn more from [Documentation](https://github.com/routejs/docs/)
- Documentation : [https://routejs.github.io/docs](https://routejs.github.io/docs)

## License

[MIT License](https://github.com/routejs/router/blob/main/LICENSE)

[npm-downloads-image]: https://badgen.net/npm/dm/@routejs/router
[npm-downloads-url]: https://npmcharts.com/compare/@routejs/router?minimal=true
[npm-install-size-image]: https://badgen.net/packagephobia/install/@routejs/router
[npm-install-size-url]: https://packagephobia.com/result?p=@routejs/router
[npm-url]: https://npmjs.org/package/@routejs/router
[npm-version-image]: https://badgen.net/npm/v/@routejs/router
npm package: @routemcp/connect-sdk
Description: Connect SDK — embed the provider connection flow in any web app
Author: Codiste Emerging Tech
Latest version: 1.0.1

# @routemcp/connect-sdk

Connect SDK for embedding the provider connection flow into any web app.

## Installation

```bash
npm install @routemcp/connect-sdk
# or
pnpm add @routemcp/connect-sdk
```

## Usage

### Vanilla JS / TypeScript

```ts
import { RouteMCPConnect } from '@routemcp/connect-sdk';

const instance = RouteMCPConnect.open({
  token: 'your-session-token',
  onSuccess: (data) => console.log('Connected:', data),
  onError: (err) => console.error('Error:', err),
  onClose: () => console.log('Modal closed'),
});
```

### React

```tsx
import { ConnectButton } from '@routemcp/connect-sdk/react';

<ConnectButton token="your-session-token" onSuccess={handleSuccess} />
```

## License

MIT
npm package: @router360/react-native-adcolony
Description: TODO
Author: Your Name
Latest version: 1.0.19
Deprecated: false

# react-native-adcolony

## Getting started

`$ npm install react-native-adcolony --save`

### Mostly automatic installation

`$ react-native link react-native-adcolony`

## Usage
```javascript
import Adcolony from 'react-native-adcolony';

// TODO: What to do with the module?
Adcolony;
```
npm package: @router360/react-native-adscend-media
Description: TODO
Author: Your Name
Latest version: 1.0.2

# react-native-adscend-media

## Getting started

`$ npm install react-native-adscend-media --save`

### Mostly automatic installation

`$ react-native link react-native-adscend-media`

## Usage
```javascript
import AdscendMedia from 'react-native-adscend-media';

// TODO: What to do with the module?
AdscendMedia;
```
npm package: @router360/react-native-google-signin
Description: TODO
Author: Your Name
Latest version: 1.0.0

# react-native-google-signin

## Getting started

`$ npm install react-native-google-signin --save`

### Mostly automatic installation

`$ react-native link react-native-google-signin`

## Usage
```javascript
import GoogleSignin from 'react-native-google-signin';

// TODO: What to do with the module?
GoogleSignin;
```
npm package: @router360/react-native-theoremreach
Description: TODO
Author: Your Name
Latest version: 1.0.0

# react-native-theoremreach

## Getting started

`$ npm install react-native-theoremreach --save`

### Mostly automatic installation

`$ react-native link react-native-theoremreach`

## Usage
```javascript
import Theoremreach from 'react-native-theoremreach';

// TODO: What to do with the module?
Theoremreach;
```
npm package: @router360/react-native-vungle
Description: TODO
Author: Your Name
Latest version: 1.0.2
Deprecated: false

# react-native-rn-vungle

## Getting started

`$ npm install react-native-rn-vungle --save`

### Mostly automatic installation

`$ react-native link react-native-rn-vungle`

## Usage
```javascript
import RnVungle from 'react-native-rn-vungle';

// TODO: What to do with the module?
RnVungle;
```