open-index/open-npm huggingface dataset:
npm package: @moonbiz/sdk
Description: 🛠 An SDK for building applications on top of Moonbiz.
Latest version: 2.4.28

# moonbiz SDK

Forked from the [pancakeswap  SDK](https://github.com/pancakeswap/pancake-swap-sdk/commit/d2903d4c136cd11eeda0f3f874a838632fd75704).

You can refer to the pancakeswap SDK documentation [pancakeswap .org](https://docs.pancakeswap.finance/products/pancakeswap-exchange).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/Atayen/MoonBiz-SDK.git
```

Move into the moonbiz-sdk working directory

```sh
cd moonbiz-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @moonboot/plugin-express
Description: > A Project support rest module for `moon-boot`
Author: CYJ
Latest version: 0.0.7

# @moonboot/plugin-express

## What

> A Project support rest module for `moon-boot`

## How to use

> `npm i @moonboot/plugin-express`
> Then you can create controller as the following example.

```ts
// This Moudle will auto use when installed
// See project For More Information
// index.ts
import { start } from 'moon-boot'
class Main {
  constructor() {
    start(__dirname)
  }
}
new Main()
// controller.ts
@Controller()
class TestController {
  @Get('test/:id')
  test(@Body(UserParam) userParam: UserParam) {
    return 'success'
  }
}
```

### Decorator

1. `@Controller`
   To Mark One Class is Controller.

   ```ts
   @Controller()
   class TestController {}
   ```

   > Param: basePath, must startsWith `/`, default: `'/'`

2. `@Get` `@Post` `@Delete` `@Put`
   To Mark One Method is Route Method

   ```ts
   @Controller()
   class TestController {
     @Get('test/:id')
     test(@Body(UserParam) userParam: UserParam) {
       return 'success'
     }
   }
   ```

   > Param: followingPath, `path.resolve(ControllerPath, MethodPath)`, default: `''`

3. `@Req` `@Res` `@Next`
   Some simple Param For Express

   ```ts
   @Controller()
   class TestController {
     @Get('test/:id')
     test(
       @Req() req: Express.Request,
       @Res() res: Express.Response,
       @Next() next: Express.Next
     ) {
       res.json({ success: true })
     }
   }
   ```

   > Tip: !!! When you use param `@Res`, plugin will not deal method return value.

4. `@Path` === `req.param`
   Get Param With Express param

   ```ts
   @Controller()
   class TestController {
     @Get('test/:id')
     test(@Path('id') id: string) {
       return 'success'
     }

     // When you pass one constructor with the second param, Method will auto transform data
     @Post('test/:id')
     test(@Path('id', Number) id: number) {
       return 'success'
     }
   }
   ```

5. `@Query` === `req.query`
   Get Param With Express query params

   example as `@Path`

6. `@Header` === `req.header`
   Get Param With Express header params

   example as `@Path`

7. `@Body` === `req.body`
   Get Param With Express body

   ```ts
   class User {
     name?: string
   }
   @Controller()
   class TestController {
     @Get('test')
     test(@Body() body: any) {
       return 'success'
     }

     // When you pass one constructor with the first param, Method will auto transform data
     @Post('test')
     test(@Body(User) body: User) {
       return 'success'
     }
   }
   ```

### FAQ

### Param

1. `server.port = 8080`
   The Port which express will listen
npm package: @moonboot/plugin-mysql
Description: > A Project support [mysql2](https://www.npmjs.com/package/mysql2) for `moon-boot`
Author: CYJ
Latest version: 0.0.5

# @moonboot/plugin-mysql

## What

> A Project support [mysql2](https://www.npmjs.com/package/mysql2) for `moon-boot`

## How to use

> `npm i @moonboot/plugin-mysql`

> Then you can use mysql with `MysqlTemplate` as the following example.

```ts
// This Moudle will auto use when installed
// See project For More Information
// index.ts
import { start } from 'moon-boot'
class Main {
  constructor() {
    start(__dirname)
  }
}
new Main()
// service.ts
@Bean()
class TestService {
  @Autowired()
  mysqlTemplate!: MysqlTemplate

  test() {
    this.mysqlTemplate.query('select 1 from dual')
  }
}
```

#### With npx

```bash
$ npx create-moon-boot use plguin-mysql
```

### Decorator

### FAQ

### Param

1. `redis.cluster = false`
   useCluster or not, default is `false`
2. `redis...`
   The config under `redis` will pass to `new IoRedis() / new IoRedis.Cluster()`
npm package: @moonboot/plugin-mysql-mybatis
Description: > A Project support Simple Sql For `moon-boot` Align with `@moonboot/plugin-mysql`
Author: CYJ
Latest version: 0.0.4

# @moonboot/plugin-mysql-mybatis

## What

> A Project support Simple Sql For `moon-boot` Align with `@moonboot/plugin-mysql`

## How to use

> `npm i @moonboot/plugin-mysql-mybatis`

> Then you can use mysql with `@Select` as the following example.

```ts
// This Moudle will auto use when installed
// See project For More Information
// index.ts
import { start } from 'moon-boot'
class Main {
  constructor() {
    start(__dirname)
  }
}
new Main()
// service.ts
@Bean()
class TestService {
  @Select('select dev_code from td_m_developer limit 1')
  @Type([Array, Developer])
  test(e?: any): Promise<Developer[]> {
    // Fallback Call
    console.log(e);
    throw new Error()
  }
}
```

#### With npx
```bash
$ npx create-moon-boot use plugin-mysql-mybatis
```

### Decorator

### FAQ

### Param
npm package: @moonboot/plugin-nacos
Description: > A Project support [nacos](https://nacos.io/zh-cn/docs/what-is-nacos.html) for `moon-boot`
Author: CYJ
Latest version: 0.0.4

# @moonboot/plugin-redis

## What

> A Project support [nacos](https://nacos.io/zh-cn/docs/what-is-nacos.html) for `moon-boot`

## How to use

> `npm i @moonboot/plugin-nacos`
> Then you can use nacos with `EnableNacosDiscovery` `NacosDiscovery` `NacosConfig` as the following example.

```ts
// This Moudle will auto use when installed
// See project For More Information
// index.ts
import { start } from 'moon-boot'
@EnableNacosDiscovery
class Main {
  constructor() {
    start(__dirname)
  }
}
new Main()
```

### Decorator

### FAQ

### Param
npm package: @moonboot/plugin-redis
Description: > A Project support [redis](https://www.npmjs.com/package/ioredis) for `moon-boot`
Author: CYJ
Latest version: 0.0.4

# @moonboot/plugin-redis

## What

> A Project support [redis](https://www.npmjs.com/package/ioredis) for `moon-boot`

## How to use

> `npm i @moonboot/plugin-redis`
> Then you can use Redis with `RedisTemplate` `RedisClusterTemplate` as the following example.

```ts
// This Moudle will auto use when installed
// See project For More Information
// index.ts
import { start } from 'moon-boot'
class Main {
  constructor() {
    start(__dirname)
  }
}
new Main()
// service.ts
@Bean()
class TestService {
  @Autowired()
  redisTemplate!: RedisTemplate

  test() {
    this.redisTemplate.mget('abc', 'key')
  }
}
```
#### With npx
```bash
$ npx create-moon-boot use plugin-redis
```

### Decorator

### FAQ

### Param

1. `redis.cluster = false`
   useCluster or not, default is `false`
2. `redis...`
   The config under `redis` will pass to `new IoRedis() / new IoRedis.Cluster()`
npm package: @mooncake-dev/check-symbols
Description: Checks if a string of space separated symbols includes a specific one or not.
Author: Daniël Illouz
Latest version: 1.0.3

# Check Symbols

Checks if a string of space separated symbols includes a specific one or not.

- [Installation](#installation)
- [API](#api)
- [Usage](#usage)
- [Publish](#publish)

## Installation

```
npm i @mooncake-dev/check-symbols
```

## API

The module exposes a single function to check symbols.

### checkSymbols(receivedSymbols, requiredSymbol)

**Parameters:**

| Name            | Required | Type   | Description                                          |
| --------------- | -------- | ------ | ---------------------------------------------------- |
| receivedSymbols | Yes      | String | A string of space separated symbols, e.g. `"a b c"`. |
| requiredSymbol  | Yes      | String | The symbol to check for, e.g. `"b"`.                 |

**Returns:**

Boolean. If the required symbol was found or not.

## Usage

```js
const checkSymbols = require('@mooncake-dev/check-symbols');
checkSymbols('a b c', 'e'); // false
```

## Publish

For now we publish manually using:

```
npm publish --access public
```

Make sure:

- You increment the npm version after you make code changes with `npm version`.
- You're logged in.

More information can be found [here](https://docs.npmjs.com/creating-and-publishing-an-org-scoped-package).
npm package: @mooncake-dev/lambda-body-parser
Description: AWS Lambda APIG proxy integration helper to parse an HTTP request body.
Author: Daniël Illouz
Latest version: 1.0.4

# Lambda body parser

AWS Lambda APIG proxy integration helper to parse an HTTP request body.

- [Installation](#installation)
- [API](#api)
- [Usage](#usage)
- [Examples](#examples)
- [Publish](#publish)

## Installation

```
npm i @mooncake-dev/lambda-body-parser
```

## API

The module exposes the following methods:

### json(body)

**Parameters:**

| Name | Required | Type   | Description                  |
| ---- | -------- | ------ | ---------------------------- |
| body | Yes      | String | The JSON string to be parsed |

**Returns:**

Parsed JSON Object.

## Usage

```js
const bodyParser = require('@mooncake-dev/lambda-body-parser');
bodyParser.json('{"hello": "world"}');
```

## Examples

```js
'use strict';

const bodyParser = require('@mooncake-dev/lambda-body-parser');

/**
 * Lambda APIG proxy integration.
 *
 * @param {Object} event - HTTP input
 *
 * @return {Object} HTTP output
 */
module.exports.sendData = async event => {
  try {
    const body = bodyParser.json(event.body);
  } catch (err) {
    console.log('error: ', err); // eslint-disable-line no-console
  }
};
```

## Publish

For now we publish manually using:

```
npm publish --access public
```

Make sure:

- You increment the npm version after you make code changes with `npm version`.
- You're logged in.

More information can be found [here](https://docs.npmjs.com/creating-and-publishing-an-org-scoped-package).
npm package: @mooncake-dev/react-day-time-picker
Description: A React component to help with scheduling a day and time.
Author: Daniël Illouz
Latest version: 1.0.5

# React Day Time picker

A React component to help with scheduling a day and time.

For documentation see the [website](https://react-day-time-picker.netlify.com/).

## Running Locally

```
npm start
```

## Publish

For now we publish manually using:

```
npm publish --access public
```

Make sure:

- You increment the npm version after you make code changes with `npm version`.
- You're logged in.

More information can be found [here](https://docs.npmjs.com/creating-and-publishing-an-org-scoped-package).