open-index/open-npm huggingface dataset:
npm package: @premitive/polymer
Description: a react re useable component
Author: nondefyde
Latest version: 1.0.0

# @premitive/polymer

> a react re useable component

[![NPM](https://img.shields.io/npm/v/@premitive/polymer.svg)](https://www.npmjs.com/package/@premitive/polymer) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @premitive/polymer
```

## Usage

```tsx
import React, { Component } from 'react'

import MyComponent from '@premitive/polymer'
import '@premitive/polymer/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [nondefyde](https://github.com/nondefyde)
npm package: @premiumads/react-native-admob-adapter
Description: PremiumAds AdMob mediation adapter for React Native (react-native-google-mobile-ads).
Author: alexgmax
Latest version: 1.0.1

# @premiumads/react-native-admob-adapter

PremiumAds mediation adapter for [react-native-google-mobile-ads](https://github.com/invertase/react-native-google-mobile-ads).

Wires the PremiumAds AdMob custom-event adapter into your React Native app's Android and iOS builds so that Google Mobile Ads mediation can fill inventory from the PremiumAds network.

## Installation

```bash
npm install @premiumads/react-native-admob-adapter react-native-google-mobile-ads
```

### iOS

Nothing extra to configure. `PremiumAdsGoogleAdapter` is published on CocoaPods trunk and is pulled in transitively by the wrapper podspec:

```bash
cd ios && pod install
```

### Android

Nothing extra to configure. The wrapper's `build.gradle` already adds the PremiumAds JFrog Maven repository (`https://repo.premiumads.net/artifactory/mobile-ads-sdk/`) and pulls in `net.premiumads.sdk:admob-adapter-v2` via autolinking.

## Usage

```ts
import mobileAds from 'react-native-google-mobile-ads';
import {setDebug} from '@premiumads/react-native-admob-adapter';

// Enable verbose logging from the PremiumAds adapter (dev only)
setDebug(__DEV__);

mobileAds().initialize().then(statuses => {
  console.log('Adapters:', statuses);
});
```

Once initialized, use the standard `react-native-google-mobile-ads` APIs (`BannerAd`, `InterstitialAd`, `RewardedAd`, `AppOpenAd`, etc.). The PremiumAds adapter will receive ad requests via AdMob mediation when your ad units are configured to mediate through PremiumAds in the AdMob console.

See the [`example/`](https://github.com/premium-ads/googleads-adapter-v2-react-native/tree/main/example) folder for a full working example app.

## Supported ad formats

- Banner
- Interstitial
- Rewarded
- Rewarded Interstitial
- App Open
- Native (via `react-native-google-mobile-ads` native ad support)

## Versioning

This JS package is versioned independently from the native adapters. It pins:

- Android: `net.premiumads.sdk:admob-adapter-v2:1.0.8`
- iOS: `PremiumAdsGoogleAdapter` (1.0.6)

## License

MIT © PremiumAds
npm package: @premiumfastnet/wsgateway
Description: Library Package For WSGateway API
Author: Premium Fast Network
Latest version: 1.0.2

# PFN NodeJS Library WSGateway

[![npm version](https://badge.fury.io/js/%40premiumfastnet%2Fwsgateway.png)](https://badge.fury.io/js/%40premiumfastnet%2Fwsgateway)

This library for easy to use in NodeJS with NPM or Yarn installation. Please referer to our [REST API Documentation](https://docs.premiumfast.net/tutorials/whatsapp-gateway/rest-api) if you want to build in your own programing language.

## Installation

```
npm i @premiumfastnet/wsgateway
```

# How to Use

## Send Message Example

- Request
```javascript
const wa = new WSGateway()
wa.token = 'YOUR-TOKEN-HERE'
wa.deviceid = 'YOUR-DEVICE-ID'
wa.sendmessage('0812xxxxxxxx','test from nodejs')
.then((res) => {
    console.log(res.data)
})
.catch((err) => {
    console.error(err)
})
```

- Response
```
{
    code: 200,
    message: 'success, message will be send in background.'
}
```

## Send Bulk Message Example

- Request
```javascript
const wa = new WSGateway()
wa.token = 'YOUR-TOKEN-HERE'
wa.deviceid = 'YOUR-DEVICE-ID'
wa.sendmessage(['08xxxx', '08xxxxx'],'test from nodejs')
.then((res) => {
    console.log(res.data)
})
.catch((err) => {
    console.error(err)
})
```

- Response
```
{
    code: 200,
    message: 'success, all message in waiting list.'
}
```

## Send Bulk Message to Contact Group

- Request
```javascript
const wa = new WSGateway()
wa.token = 'YOUR-TOKEN-HERE'
wa.deviceid = 'YOUR-DEVICE-ID'
wa.sendgroup('xxxx', 'test from nodejs')
.then((res) => {
    console.log(res.data)
})
.catch((err) => {
    console.error(err)
})
```

- Response
```
{
    code: 200,
    message: 'success, all message in waiting list.'
}
```
npm package: @premix/blob
Description: blob converter
Author: lbwa
Latest version: 0.2.0

<h1 align="center">@premix/blob</h1>

This package is a kind of converter between Blob/File and base64 URL.

## Installation

```bash
npm i @premix/blob
```

## Basic usage

```ts
import { base64ToBlob, blobToBase64, downloadBlob } from '@premix/blob'

const base64String = 'data:image/png;base64,xxxx'
const blob = base64ToBlob(base64String)
const base64 = blobToBase64(blob)
console.log(base64String === base64) // true

// download blob object to local file system
downloadBlob(blob)
```

## Advanced usage

- Download the Excel Blob object

  ```ts
  import axios from 'axios'
  import { downloadBlob } from '@premix/blob'

  function downloadExcel(
    url: string,
    payload: Record<string, any>,
    filename: string
  ) {
    return axios
      .post(url, payload, {
        responseType: 'blob'
      })
      .then(res => {
        const blob = new Blob([res], {
          type:
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
        })
        // make Blob object downloadable
        downloadBlob(blob)
      })
  }
  ```

- Convert any HTTP(S) URL to base64 or Blob

  ```ts
  import axios from 'axios'
  import { blobToBase64 } from '@premix/blob'

  function urlToBas64(url: string, payload: Record<string, any>) {
    return axios
      .get(url, { params: payload }, { responseType: 'blob' })
      .then(res => blobToBase64(res))
  }
  ```

## License

MIT © [Bowen Liu](https://github.com/lbwa)
npm package: @premix/buffer
Description: Handle ArrayBuffer easily
Author: Bowen
Latest version: 0.2.0

<h1 align="center">@premix/buffer</h1>

This package is used to help people to handle buffer easily.

## Between ArrayBuffer and Buffer

[ArrayBuffer][mdn-array-buffer] object is used to represent a generic, **fixed-length** _raw binary data buffer_. [Buffer][nodejs-buffer] object in node.js is equivalent to _Uint8Array_ (A kind of [TypedArray][mdn-typed-array])<sup>[source](https://nodejs.org/dist/latest/docs/api/buffer.html#buffer_buffers_and_typedarray)</sup>, not ArrayBuffer object.

A [TypedArray][mdn-typed-array] object describes an array-like view of an underlying binary data buffer.

> With TypedArray available, the [Buffer][nodejs-buffer] class implements the _Uint8Array_ API in a manner that is more optimized and suitable for Node.js.

[mdn-array-buffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
[nodejs-buffer]: https://nodejs.org/dist/latest-v13.x/docs/api/buffer.html#buffer_buffer
[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray

## Relationship with binary

1. The Number type is a double-precision **64-bit** binary format IEEE 754 value (numbers between -(2<sup>53</sup> -1) and 2<sup>53</sup> -1).

1. The String type is a set of "elements" of **16-bit** unsigned integer values

## Byte order

If control over byte order is needed, you may need to use _DataView_ and take care of [endian, endianness, byte-order](https://developer.mozilla.org/en-US/docs/Glossary/Endianness).

## Usage

- convert a string data type to an arrayBuffer

```ts
import { stringToBuffer } from '@premix/buffer'

stringToBuffer('a') // return a ArrayBuffer<byteLength=2>
```

- convert an arrayBuffer to a string

```ts
import { bufferToString } from '@premix/buffer'

const view = new Uint16Array(new ArrayBuffer(2))
view[0] = 'a'.charCodeAt(0)
bufferToString(view.buffer) // return a string 'a'
```

## Further readings

- [MDN - JavaScript data types and data structures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures)
- [MDN - ArrayBuffer][mdn-array-buffer]
- [Nodejd.org - Buffer][nodejs-buffer]
- [MDN - TypedArray][mdn-typed-array]
- [ECMA 262 - TypedArray](https://www.ecma-international.org/ecma-262/#sec-typedarray-objects)

## License

MIT © [Bowen Liu](https://github.com/lbwa)
npm package: @premix/typescript
Description: utils for type-checking
Author: Liu Bowen
Latest version: 0.2.0

# @premix/typescript

This project aims to help people resolve type-checking more efficiently and easily. 🔥

It provides a set of utility types for developers to help them improve the speed, accuracy and convenience of type-checking in their code. 🛠️

With `@premix/typescript`, developers can:

- Write type-safe code faster 🚀
- Reduce the risk of type errors 🤝
- Make types more readable 🕵️‍♀️

## 📦 Installation

To get started, simply install the `@premix/typescript` package:

```sh
npm i @premix/typescript
```

We hope you find `@premix/typescript` useful and we would love to hear your feedback! 🤗

## License

MIT © [Liu Bowen](https://github.com/lbwa)