open-index/open-npm huggingface dataset:
npm package: @flashcoffee/react-native-zendesk-messaging
Description: React Native Library for Zendesk Messaging
Author: Robby Widyahartono
Latest version: 1.0.4

# react-native-zendesk-messaging

React Native Library for Zendesk Messaging

## Installation

```sh
yarn add @flashcoffee/react-native-zendesk-messaging
```

## Usage

```js
import * as React from 'react';
import { Text, View, Button, Platform } from 'react-native';
import Config from 'react-native-config';
import {
  initialize,
  showMessaging,
} from '@flashcoffee/react-native-zendesk-messaging';

const App = () => {
  React.useEffect(() => {
    initialize(
      Platform.OS === 'android'
        ? Config.CHANNEL_KEY_ANDROID
        : Config.CHANNEL_KEY_IOS
    );
  }, []);
  return (
    <View style={{ padding: 100 }}>
      <Text
        style={{
          marginBottom: 50,
          textAlign: 'center',
          fontWeight: 'bold',
          fontSize: 20,
        }}
      >
        Zendesk Messaging
      </Text>
      <Text style={{ marginBottom: 10, textAlign: 'center' }}>
        Press The "CHAT" button to test
      </Text>
      <Button onPress={() => showMessaging()} title="CHAT" />
    </View>
  );
};

export default App;
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
npm package: @flashfix/browserslist-config
Description: Browserslist shared config
Author: flashfix
Latest version: 1.1.0

# `@flashfix/browserslist-config`

## What is Browserslist?

Share browsers list between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env.

- [Browserslist](https://github.com/ai/browserslist) (Github repo)
- [browserl.ist](http://browserl.ist) (Browserslist query syntax validation)
- ["Browserslist is a Good Idea"](https://css-tricks.com/browserlist-good-idea/) (blog post by [@chriscoyier](https://github.com/chriscoyier))


## Usage

```shell
npm install --save-dev @flashfix/browserslist-config
```

### `.browserslistrc`

```
# Browsers that we support. To see current list: `npx browserslist`

extends @flashfix/browserslist-config
```
npm package: @flashfix/config
Description: Shared config for universal JavaScript apps
Author: flashfix
Latest version: 1.0.2

@flashfix/config
================

Shared config for universal JavaScript apps.

Loads configs in a certain order, next config always overriding previous one. Performs a deep merge of nested properties.

To use this module create a `config` folder next to your `node_modules` folder with one of the following files (loaded in this order):

  1. `default.js`
  2. `mycustomenv.js` where `mycustomenv` is what you would set NODE_ENV to
  3. `local.js`

## Defaults:

By default config object is supplied with the following properties:
  - `environment` is the value of `NODE_ENV` environment variable or `'development'`
  - `debug` is `true` if `environment` is `development`
  - `sandbox` is `true` if `SANDBOX` environment variable is set to `true` or `debug` is `true`

## Options:

All options can be set in the process environment:
 - `NODE_ENV` sets node environment, default: `development`
 - `SANDBOX` sets sandbox mode, default: (empty), accepts: `true`
 - `CONFIG_DIR` sets the name/path to config folder, relative to the project root, default: `config`

## Usage:

```javascript
const config = require('@flashfix/config');
// use your config
```

There is a special ConfigPlugin for Webpack to bundle config in your client app:

```javascript
const ConfigPlugin = require('@flashfix/config/plugin');
// ...
plugins: [
  new ConfigPlugin(options),
],
```

ConfigPlugin accepts an options object:
```javascript
const options = {
  // An optional function to filter full config and hide secrets from the client app.
  // By default entire config object will be accessible to the client.
  // It's highly recommended to pass this function to filter your full config and only output
  // client relevant portions preserving original object structure.
  getConfig: (fullConfig) => {
    const { clientSafePortion } = fullConfig;
    const configWithoutSecrets = { clientSafePortion };
    return configWithoutSecrets;
  },
  // An optional boolean flag that switches internal loader output
  // between ES Module (default) and Common JS format
  esModule: true,
};
```
npm package: @flashfix/express-base-class
Description: Base ES6 class for ExpressJS controllers
Author: flashfix
Latest version: 2.0.0

@flashfix/express-base-class
================

Base controller class that allows you to easily attach route handlers that are automatically bound to the class instance. Each instance creates it's own router, which allows for better route composition/encapsulation.

Example:

1. Create a Controller
```javascript
const BaseController = require('@flashfix/express-base-class');


class DefaultController extends BaseController {
  default(req, res) {
    // `this` is DefaultController instance - bound automatically
    res.status(404).send('Page doesn\'t exist');
  }
  attachRoutes() {
    this.get('*', this.default);
  }
}

module.exports = new DefaultController();
```
2. Attach a Controller to an Express app

```javascript
const defaultController = require(`./controllers/default`); // Returns a controller instance.
defaultController.use(app); // Attaches router to the app
```
npm package: @flashfix/express-graceful
Description: Graceful shutdown for ExpressJS
Author: flashfix
Latest version: 1.0.1

Graceful tools
================

Gracefully shuts down ExpressJS server. Sends PM2 events to signal when instance is ready to accept connections. Sends 502 responses during shutdown for a load balancer to handle.

## Usage:

```
const app = require('express')();
const { middleware: gracefulMiddleware, start: gracefulStart } = require('@flashfix/express-graceful');

const host = process.env.HOST; // to bind server to a specific host, defaults to `undefined`
const port = parseInt(process.env.PORT, 10) || 3000; // port to listen to, defaults to `3000`
const timeout = 300; // ms, defaults to `1000`

// As early as you can - this will end requests during shutdown.
app.use(gracefulMiddleware());

...

// When you're ready to start your app
// onShutdown - invoked when shutdown started
gracefulStart(app, { host, port, timeout }, onShutdown);
```
npm package: @flashfix/express-sanitizeurl
Description: ExpressJS middleware that checks request URL for potentially breaking things
Author: flashfix
Latest version: 1.0.1

@flashfix/express-sanitizeurl
======================

ExpressJS middleware that checks request URL for potentially breaking things, such as:
 - Unparsable query string sequences that would crash on attempt to parse on the client side
 - Double question mark in URL
 - Multiple slashes

After one of the above checks fails the middleware attempts to guess a safe variant of the url and redirect there.

## Options:
 - `redirectTo (string)`: When url contains breaking character sequences and is impossible to parse, redirect to this URL, default: `'/'`

## Usage:

```javascript
app.use(require('@flashfix/express-sanitizeurl')());
```
npm package: @flashfix/express-trailingslash
Description: ExpressJS middleware that redirects requests with trailing slashes to a clean one without it
Author: flashfix
Latest version: 1.0.2

@flashfix/express-trailingslash
========================

ExpressJS middleware that redirects requests with trailing slashes to a clean one without it

## Usage:

```javascript
app.use(require('@flashfix/express-trailingslash')());
```

When used together with serve-static, pass `redirect: false` option to it to avoid conflicts:

```javascript
app.use(require('serve-static')(`${__dirname}/public`, { redirect: false }));
```
npm package: @flashfix/react-polyglot
Description: A React wrapper for node-polyglot
Author: flashfix
Latest version: 1.0.1

@flashfix/react-polyglot
=============

A React wrapper for [node-polyglot](https://airbnb.io/polyglot.js/).

## API:

### <International />

You need to use the `<International />` wrapper around your app to create a [node-polyglot](https://airbnb.io/polyglot.js/) instance and to provide context to your components.
```javascript
import International from '@flashfix/react-polyglot';

const locale = {
  type: 'de',
  dictionary: {
    greeting: 'Hallo!',
  },
  // anything else locale related
};

<International locale={locale}>
  <App />
</International>
```
`<International />` component takes a `locale` object prop with following:
  - `type`: string, name of the locale, for possible values check [here](https://github.com/airbnb/polyglot.js/blob/master/index.js#L96).
  - `dictionary`: object, same as `phrases` object one would pass to [node-polyglot](https://github.com/airbnb/polyglot.js#translation).
  - anything else you pass will be available to every component connected to the context. Use this object to store locale specific configurations, like first day of the week.

### T

`T` is a component that allows for JSX within your substitutions options. Use it when you need to use JSX or accessing `t` function is inconvenient.

```javascript
import { T } from '@flashfix/react-polyglot';

const locale = {
  dictionary: {
    substitution: 'I have come here to chew %{variable_1} and kick %{variable_2}... and I\'m all out of %{variable_1}.',
  },
};

const MyComponent = ({ t, locale }) => (
  <T
    id="substitution"
    variable_1={<strong onClick={() => alert('🍬')}>bubblegum</strong>}
    variable_2={<em onClick={() => alert('🍑')}>ass</em>}
  />
);
// => I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.
```

### Hooks: useInternational, useLocale, useT

`useInternational`, `useLocale` and `useT` are hooks that allow access to the locale context. `useInternational` is the main hook, `useLocale` and `useT` are convenience shortcuts.

```javascript
import { useInternational, useLocale, useT } from '@flashfix/react-polyglot';

const MyComponent = ({ t, locale }) => {
  const { t, locale } = useInternational();
  // or
  const locale = useLocale();
  // or
  const t = useT();
  // ...
};

```

### withLocale

`withLocale` is a HOC you can use to wrap your components to get access to the internationalization context. It's considered legacy and will be removed in the future versions. It is preferrable to use hooks or the `T` component.

```javascript
import { withLocale } from '@flashfix/react-polyglot';

const MyComponent = ({ t, locale }) => (
  // ...
);

export default withLocale(MyComponent);
```
npm package: @flashjames/medusa-plugin-algolia
Description: Algolia search plugin for Medusa
Author: Medusa
Latest version: 2.0.1

# Algolia

Provide powerful indexing and searching features in your commerce application with Algolia.

[Algolia Plugin Documentation](https://docs.medusajs.com/plugins/search/algolia) | [Medusa Website](https://medusajs.com) | [Medusa Repository](https://github.com/medusajs/medusa)

## Features

- Flexible configurations for specifying searchable and retrievable attributes.
- Ready-integration with [Medusa's Next.js starter storefront](https://docs.medusajs.com/starters/nextjs-medusa-starter).
- Utilize Algolia's powerful search functionalities including typo-tolerance, query suggestions, results ranking, and more.

---

## Prerequisites

- [Medusa backend](https://docs.medusajs.com/development/backend/install)
- [Algolia account](https://www.algolia.com/)

---

## How to Install

1\. Run the following command in the directory of the Medusa backend:

  ```bash
  npm install medusa-plugin-algolia
  ```

2\. Set the following environment variables in `.env`:

  ```bash
  ALGOLIA_APP_ID=<YOUR_APP_ID>
  ALGOLIA_ADMIN_API_KEY=<YOUR_ADMIN_API_KEY>
  ```

3\. In `medusa-config.js` add the following at the end of the `plugins` array:

  ```js
const plugins = [
  // ...
  {
    resolve: `medusa-plugin-algolia`,
    options: {
      applicationId: process.env.ALGOLIA_APP_ID,
      adminApiKey: process.env.ALGOLIA_ADMIN_API_KEY,
      settings: {
        products: {
          indexSettings: {
            searchableAttributes: ["title", "description"],
            attributesToRetrieve: [
              "id",
              "title",
              "description",
              "handle",
              "thumbnail",
              "variants",
              "variant_sku",
              "options",
              "collection_title",
              "collection_handle",
              "images",
            ],
          },
          transform: (product) => ({ 
            id: product.id, 
            // other attributes...
          }),
        },
      },
    },
  },
]
  ```

---

## Test the Plugin

1\. Run the following command in the directory of the Medusa backend to run the backend:

  ```bash
  npm run start
  ```

2\. Try searching products either using your storefront or using the [Store APIs](https://docs.medusajs.com/api/store#tag/Product/operation/PostProductsSearch).

---

## Additional Resources

- [Algolia Plugin Documentation](https://docs.medusajs.com/plugins/search/algolia)
npm package: @flashlab/twikoo-func
Description: A simple comment system.
Author: flashlab
Latest version: 1.6.37

# Twikoo 云函数

[![](https://img.shields.io/npm/v/@flashlab/twikoo-func)](https://www.npmjs.com/package/@flashlab/twikoo-func)
[![](https://img.shields.io/npm/l/twikoo-func)](./LICENSE)

使用说明：https://twikoo.js.org

## Changelog
**2024/06/19** - Remove `@imaegoo/node-ip2region` pkg, use `ipRegion` filed from upstream database for geolocation. The `ipRegion` is easy to access from `request.cf` scope of Cloudflare Worker.
npm package: @flashpay-inc/sdk
Description: A Typescript SDK for FlashPay Payment Integration
Latest version: 0.2.3

<div>
 <img width="400" valign="top" src="https://flashpay.finance/img/svg/logo.svg" alt="FlashPay logo">
</div>

## Get Started

FlashPay Javascript SDK provides a simple and convenient payment flow for web applications to receive payments in USDC, ALGO, USDT, etc. on Algorand blockchain.

## Install

```bash
npm install @flashpay-inc/sdk
```

## SDK Parameters
The SDK accepts the following parameters:

| Param      | Required           | Description                                                                                       |
|:-----------|:-------------------|:--------------------------------------------------------------------------------------------------|
| payload    | :white_check_mark: | An object containing `asset`, `recipient`, and `amount`.                                          |
| public_key | :white_check_mark: | User's public key which can be gotten from the Flashpay dashboard.                                |
| callback   | :white_check_mark: | A function with signature (response, error) that gets called on successful or failed transaction. |

**NOTE**: To get the list of supported assets, make a `GET` request to `https://api.flashpay.finance/api/core/assets`

## Example Applications

- [Using ReactJS](https://codesandbox.io/s/flashpay-sdk-react-example-61rtmj)
- [Using Vanilla JS](https://codesandbox.io/s/flashpay-sdk-vanilla-js-example-epjpzi)

## License

MIT © [Flashpay](https://github.com/FlashPayInc)
npm package: @flashphoner/sfusdk-examples
Description: Official Flashphoner WebCallServer SFU SDK usage examples
Author: Flashphoner
Latest version: 2.0.339

# @flashphoner/sfusdk

# Flashphoner WebCallServer SFU API (SFU SDK) usage examples

Flashphoner [WebCallServer](https://flashphoner.com) [SFU](https://docs.flashphoner.com/display/WCS52EN/SFU+functions+with+Simulcast) API (SFU SDK) usage examples.

## Get the sources

Install as NPM package
```
npm init
npm install @flashphoner/sfusdk-examples
cd node_modules/@flashphoner/sfusdk-examples
```

or download from GitHub
```
git clone https://github.com/flashphoner/sfu_sdk.git
cd sfu_sdk/examples
```

## Build
```
npm install && npm run build
```

### Deploy to web server
```
mkdir -p /var/www/html/flashphoner-sfu-test
cp -r dist/* /var/www/html/flashphoner-sfu-test
```

## Documentation

[SFU functions description](https://docs.flashphoner.com/display/WCS52EN/SFU+functions+with+Simulcast)

[SFU SDK documentation](https://docs.flashphoner.com/display/SS1E/SFU+SDK+1.0+-+EN)

[SFU examples description](https://docs.flashphoner.com/display/SS1E/SFU+SDK+Examples)

[API documentation](http://flashphoner.com/docs/api/WCS5/client/sfu-sdk/latest)
npm package: @flashphoner/websdk
Description: Official Flashphoner WebCallServer WebSDK package
Author: Flashphoner
Latest version: 2.0.282

# @flashphoner/websdk

# Flashphoner WebCallServer JavaScript API (Web SDK)

Flashphoner [WebCallServer](https://flashphoner.com) JavaScript API (Web SDK) implementation.

## Install
npm install @flashphoner/websdk

## Using prebuild Javascript bundle in browser
two-way-streaming.html:
```HTML
<!DOCTYPE html>
<html lang="en">
<head> 
    <script type="text/javascript" src="node_modules/@flashphoner/websdk/flashphoner.js"></script> 
    <script type="text/javascript" src="two-way-streaming.js"></script> 
</head>
<body onload="init_api()">
    <div id="publish" style="width:320px;height:240px;border: solid 1px"></div>
    <br/><button id="publishBtn">Publish</button><br/>
    <br/>
    <div id="play" style="width:320px;height:240px;border: solid 1px"></div>
    <br/><button id="playBtn">Play</button><br/>
    <br/>
    <br/><button id="stopBtn">Stop</button><br/>
</body>
</html>
```

two-way-streaming.js:
```Javascript
//Constants
var SESSION_STATUS = Flashphoner.constants.SESSION_STATUS;
var STREAM_STATUS = Flashphoner.constants.STREAM_STATUS;
var session;
var stream;
  
//Init Flashphoner API on page load
function init_api() {
    Flashphoner.init({});
    publishBtn.onclick = connect;
    playBtn.onclick = playStream;
    stopBtn.onclick = stopPublish;
}
  
//Connect to WCS server over websockets
function connect() {
    session = Flashphoner.createSession({
        urlServer: "wss://demo.flashphoner.com"
    }).on(SESSION_STATUS.ESTABLISHED, function(session) {
        publishStream(session);
    });
}
  
//Publish stream
function publishStream(session) {
    stream = session.createStream({
        name: "stream",
        display: document.getElementById("publish"),
    });
    stream.publish();
}
  
//Playing stream
function playStream() {
    session.createStream({
        name: "stream",
        display: document.getElementById("play"),
    }).play();
}
 
//Stopping stream
function stopPublish() {
    stream.stop();
}
```

## More examples

Please look for more examples on [GitHub](https://github.com/flashphoner/flashphoner_client/tree/wcs_api-2.0/examples) and on [this page](https://flashphoner.com/)

## Documentation

Please read the details [here](https://docs.flashphoner.com/display/WEBSDK2EN/Web+SDK+2.0+-+EN) and API docs [here](http://flashphoner.com/docs/api/WCS5/client/web-sdk/latest)

## Known issues

WebSDK is build with [webrtc/adapter](https://github.com/webrtc/adapter/) library version not lower than 7.2.6. In this regard, direct use of this library together with WebSDK should be avoided.
npm package: @flashport/flashport
Description: FlashPort is a TypeScript 2D graphics library that largely replicates the Flash ActionScript 3.0 library
Author: Kenny Lerma
Latest version: 0.0.10

# FlashPort
Typescript Port of Actionscript 3.0 Flash Library

```
npm i @flashport-org/flashport
```

![chrome_UOOhQEXDip](https://user-images.githubusercontent.com/1977536/219205763-f9d6784f-8ee6-411b-b443-1d81cbff1820.gif)
npm package: @flashport/flashportui
Description: This is a set basic UI components for FlashPort
Author: Kenny Lerma
Latest version: 0.0.10

# FlashPortUI
Basic UI components for the FlashPort graphics library

![chrome_cFVTXZx9kZ](https://user-images.githubusercontent.com/1977536/219176444-4b77243e-b082-491c-b169-417685e9bfb6.png)