open-index/open-npm huggingface dataset:
npm package: @paypay/jsbridge-core
Description: Jsbridge for communication between native app and webview
Author: Kun Cheng
Latest version: 2.0.0-pre.0

<p align="center">
  <h3 align="center"><code>@paypay/jsbridge-core</code></h3>

  <p align="center">
    Module containing core, shared logic for JsBridge.
  </p>
</p>

<!-- TABLE OF CONTENTS -->
## Table of Contents

* [About the Project](#about-the-project)
  * [Built With](#built-with)
* [Getting Started](#getting-started)
  * [Prerequisites](#prerequisites)
  * [Installation](#installation)
* [API](#api)
* [License](#license)


<!-- ABOUT THE PROJECT -->
## About The Project

This module contains all shared logic, that most of the other modules use.

### Built With

* [Typescript](https://www.typescriptlang.org/)



<!-- GETTING STARTED -->
## Getting Started

The package is just an base for the other packages and can't be used as a standalone library. 
### Prerequisites

The only requirement is to have NPM or Yarn installed in the system.

### Installation

To install package, simply use NPM:

```sh
npm install @paypay/jsbridge-core
```

Or Yarn

```sh
yarn add @paypay/jsbridge-core
```

<!-- API -->
## API

API documentation, auto generated by [Typedoc](https://typedoc.org/) are available in [`docs`](./docs) folder.

<!-- LICENSE -->
## License

Distributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.
npm package: @paypay/mini-app-js-sdk
Description: ## Installation
Author: paypay
Latest version: 2.64.2

# mini-app-js-sdk

## Installation

#### Option 1 (recommended): NPM Package

The SDK is provided as [NPM package](https://www.npmjs.com/package/@paypay/mini-app-js-sdk). Please add it to your project by:
```bash
npm i @paypay/mini-app-js-sdk -S
# OR 
yarn add @paypay/mini-app-js-sdk
```

To use the Javascript API, please add the following import:
```js
import pp from "@paypay/mini-app-js-sdk";
```

#### Option 2: HTML

The SDK can also be used by simply including it in your HTML code:
```HTML
<script src="https://static.paypay.ne.jp/libs/mini-app-js-sdk/<version#>/mini-app-js-sdk.js"></script>
```

## Getting started

The Javascript automatically detects if you are running your website inside PayPay's Mini App environment or inside a browser.

Please initialize the SDK with the following command:
```js
pp.init({
  clientId: 'YOUR_CLIENT_ID',
  env: 'sandbox', //default: 'production'
  success() {
    console.log('init successful')
  },
  fail() {
    console.log('init failed')
  },
})
```

After initializing, the Mini App JS SDK is ready to use.
You can verify it by getting a `success` callback with a sample call, i.e.:
```js
pp.getUAID({
  success: (res) => {
    console.log(JSON.stringify(res))
  },
  fail: (error) => {
    console.log(JSON.stringify(error))
  },
  complete: () => {}
})
```