open-index/open-npm huggingface dataset:
npm package: @hohuyhoangg/boundless-checkout-react-custom
Description: The official checkout React component for Boundless Commerce.
Author: Kirill Zhirnov
Latest version: 1.3.9

# Boundless Checkout React Component 

Checkout React Component for [Boundless Commerce](https://boundless-commerce.com/).

### About Boundless Commerce

API’s First Headless E-commerce CMS: We Provide An Admin-Side For Store Management, Powerful API, And Ready-To-Use
Checkout Area.

## Installation

Besides the checkout component the API client should be installed:

`yarn add boundless-api-client boundless-checkout-react` 

Or via NPM:

`npm install boundless-api-client boundless-checkout-react --save`

## Getting Started

1. Create client:

```js
import {BoundlessClient} from 'boundless-api-client';
const apiClient = new BoundlessClient('<YOUR PERMANENT TOKEN>');
apiClient.setInstanceId('<YOUR INSTANCE ID>');
```

2. Add component to the checkout page:

```jsx
import {startCheckout, StarterWrapper} from 'boundless-checkout-react';

const starter = startCheckout(document.querySelector('.some-el'), {
	api: apiClient,
	onHide: () => console.log('on hide'),
	onThankYouPage: (data) =>  console.log('on thank you page', data),
	basename: '/shop/checkout',
	cartId: 'uid',
	logoSrc: 'https://domain/logo.png',
	logoText: 'My Logo'
});
```

Props `api`, `onHide`, `onThankYouPage` - are required, others are optional.

`basename` - Start url for the checkout. If checkout located at `/checkout`, then `basename: '/checkout'`.

3. Need more example? Look at: [Checkout page at Next.js](https://github.com/kirill-zhirnov/boundless-nextjs-sample/blob/master/pages/checkout/%5B%5B...slug%5D%5D.tsx)

# Development process

1. Copy & adjust `.env.example` => `.env`
2. `yarn dev` - starts dev server at http://localhost:8080
3. Real component usage can be tested locally via yarn link or manually creation symbolic link in node_modules.

---

[NextJS eCommerce templates](https://boundless-commerce.com/templates) - Free. Ready to use. Just clone & deploy!
npm package: @hoishin/editorconfig
Description: Hoishin's .editorconfig
Author: Hoishin
Latest version: 2.1.2

# @hoishin/editorconfig

> Copy Hoishin's editorconfig file to current directory

## Install

```
$ npm i -g @hoishin/editorconfig
```

## Usage

```
$ hoishin-editorconfig
```
npm package: @hoishin/prettierrc
Description: Hoishin's Prettier configuration
Author: Hoishin
Latest version: 2.2.0

# prettierrc

Hoishin's Prettier configuration

## Install

```
$ npm i -D @hoishin/prettierrc
```

## Usage

```js
// .prettierrc.js
module.exports = require('@hoishin/prettierrc')
```
npm package: @hoishin/tslint-config
Description: Hoishin's TSLint configuration
Author: Hoishin
Latest version: 2.0.3

# @hoishin/tslint-config

[![Build Status](https://travis-ci.com/Hoishin/tslint-config.svg?branch=master)](https://travis-ci.com/Hoishin/tslint-config)
[![npm version](https://badge.fury.io/js/%40hoishin%2Ftslint-config.svg)](https://www.npmjs.com/package/@hoishin/tslint-config)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

Sharable TSLint configuration. It's made strict and opinionated for maintainablity, consistency, and preventing bugs in earlier stages.

## Install

```sh
npm install --save-dev @hoishin/tslint-config
# or
yarn add -D @hoishin/tslint-config
```

## Usage

In tslint.json

```json
{
	"extends": "@hoishin/tslint-config"

	// Your configuration...
}
```

## License

MIT
npm package: @hoist/mongoose-shortid
Description: Short Ids for mongoose
Author: Jason Choy
Latest version: 1.0.1

mongoose-shortid
================

This plugin provides a new Schema Type, ShortId, that can be used in place of ObjectId. Typically you will want to use this instead of the default `id` field, but you can also use ShortId for any other field. To make sure however the ShortId is unique, you should add an index on the field.
The generated IDs are random url-safe strings of configurable length, represented in a configurable base (10, 16, 32, 36, 62, 64 only).

This plugin will automatically retry inserts on a collision.

### Usage

```javascript
var mongoose = require('mongoose');
var ShortId = require('mongoose-shortid');

var personSchema = mongoose.Schema({
    _id: ShortId,
    name: String
});

// or 

var anotherSchema = mongoose.Schema({
    alternativeId: { type: ShortId, index: true},
    name         : String
});


```

### Options

The default options are:

```javascript
var personSchema = mongoose.Schema({
    _id: {
        type: ShortId,
        len: 7,     // Length 7 characters
        base: 64,   // Web-safe base 64 encoded string
        alphabet: undefined // Use default alphabet for base
        retries: 4  // Four retries on collision
    },
    name: String
});
```

### Custom Alphabets

A custom alphabet can be provided using the `alphabet` option. This takes priority over the `base` argument.

```javascript
var personSchema = mongoose.Schema({
    _id: {
        type: ShortId,
        len: 9,
        alphabet: 'fubar'
    }
});
```

The generated IDs will be 9 characters long with only the characters `f` `u` `b` `a` and `r`.


### Custom ID Generation

A custom ID generator function can be provided by setting the `generator` option. This function will be called with two arguments: `generatorOptions` and `callback`.

The `generatorOptions` is made up from the `generatorOptions` object in the field options (if set), with `len`, `base` and `alphabet` overriden if set on the field options.

The `callback` function expects to be called with `err` and `id` parameters.

Here's an example:

```javascript
var mongoose = require('mongoose');
var ShortId = require('mongoose-shortid');

function customIdGenerator(options, callback) {
    var desiredLength = options.len || 7;
    var base = options.base || 64;
    var alphabet = options.alphabet || alphabetForBase(base);
    var customOption = options.customOption;
    
    // do Id generation
    var generatedId = ...;

    if (generatedId) {
        callback(null, generatedId);
    } else {
        callback(err);
    }
}

var exampleSchema = mongoose.Schema({
    _id: {
        type: ShortId,
        len:4,
        generator: customIdGenerator,
        generatorOptions: { customOption: 'foo' }
    },
    name: String
});

```
npm package: @hojihooks/use-async-dispatch
Description: React Hook to dispatch asynchronous action and shows the progress of the action.
Author: Hoeon Woo
Latest version: 1.0.1

# @hojihooks/use-async-dispatch

React Hook to dispatch asynchronous action and shows the progress of the action.

## Installation

#### yarn

`yarn add @hojihooks/use-async-dispatch`

#### npm

`npm i @hojihooks/use-async-dispatch`

## Usage

```js
import React, { useEffect } from "react";
import ReactDOM from "react-dom";
import { createStore, applyMiddleware } from "redux";
import { Provider } from "react-redux";
import promiseMiddleware from "redux-promise";
import useAsyncDispatch from "@hojihooks/use-async-dispatch";

// Action Creators
async function fetchData(url) {
  try {
    const response = await fetch(url);
    const data = await response.json();
    return {
      type: "FETCH_DATA",
      payload: { data }
    };
  } catch (error) {
    return console.error(error);
  }
}

function showProgress() {
  return {
    type: "SHOW_PROGRESS"
  };
}

function hideProgress() {
  return {
    type: "HIDE_PROGRESS"
  };
}

// Reducers
function reducer(state = [], action) {
  switch (action.type) {
    case "FETCH_DATA":
      console.log(action.payload.data);
      return state;
    case "SHOW_PROGRESS":
      console.log("show progress");
      return state;
    case "HIDE_PROGRESS":
      console.log("hide progress");
      return state;
    default:
      return state;
  }
}

const store = createStore(reducer, {}, applyMiddleware(promiseMiddleware));

function App() {
  // Easy to use
  const fetchExample1 = useAsyncDispatch(fetchData);

  // Using options
  const callback = () => {
    console.log("success");
  };
  const opts = {
    showProgress,
    hideProgress
  };
  const fetchExample2 = useAsyncDispatch(fetchData, callback, opts);

  useEffect(() => {
    fetchExample1("https://api.github.com/orgs/nodejs");
    fetchExample2("https://api.github.com/gists");
  });
  return <h1>Hello Hojihooks</h1>;
}

const rootElement = document.getElementById("root");
ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  rootElement
);
```

### Arguments

| Argument | Type     | Description                                       | Required |
| -------- | -------- | ------------------------------------------------- | -------- |
| asyncAction  | function | Function to dispatch asynchronously | yes      |
| callback  | function | Callback function after asynchronous dispatch completion | no      |
| opts  | Object | showProgress: Function to dispatch to show progress, hideProgress: Function to dispatch to hide progress | no      |

### Return

| Return value | Type      | Description                                                     | Default value |
| ------------ | --------- | --------------------------------------------------------------- | ------------- |
| function          | function | Function wrapped around the async dispatch logic | null          |
npm package: @hojihooks/use-url-search-params-get-object
Description: React Hook to Returns all the values associated with a given search parameter as an object.
Author: Hoeon Woo
Latest version: 1.0.1

# @hojihooks/use-url-search-params-get-object

React Hook to Returns all the values associated with a given search parameter as an object.

## Installation

#### yarn

`yarn add @hojihooks/use-url-search-params-get-object`

#### npm

`npm i @hojihooks/use-url-search-params-get-object`

## Usage

```javascript
import React from "react";
import ReactDOM from "react-dom";
import useURLSearchParamsGetObject from "@hojihooks/use-url-search-params-get-object";

function App() {
  const getURLSearchParamsObject = useURLSearchParamsGetObject();
  const searchParamsObj = getURLSearchParamsObject(
    "q=URLUtils.searchParams&topic=api"
  );
  return (
    <React.Fragment>
      <h1>Hello hojihooks</h1>
      <h2>{`${searchParamsObj.q}`}</h2>
      <h2>{`${searchParamsObj.topic}`}</h2>
    </React.Fragment>
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
```


### Arguments

| Argument | Type     | Description                                       | Required |
| -------- | -------- | ------------------------------------------------- | -------- |
| paramsString  | string | Query string of a URL | yes      |

### Return

| Return value | Type      | Description                                                     |
| ------------ | --------- | --------------------------------------------------------------- | 
| Object          | Object | Objects with keys and values |
npm package: @hokaccha/create-react-app-ts-dev
Description: Configuration and scripts for Create React App for development
Author: Kazuhito Hokamura
Latest version: 1.2.1

# create-react-app-ts-dev

My react and typescript template for development.

```
$ npx create-react-app my-app --scripts-version=@hokaccha/create-react-app-ts-dev
```
npm package: @hokaccha/eslint-config
Description: My eslint config
Author: Kazuhito Hokamura
Latest version: 2.3.0

# eslint-config

My eslint config set.

## Usage

```
$ npm install --save-dev eslint @hokaccha/eslint-config
```

```json
{
  "extends": ["@hokaccha/eslint-config"]
}
```

### with React

```
$ npm install --save-dev eslint eslint-plugin-react @hokaccha/eslint-config
```

```json
{
  "extends": [
    "@hokaccha/eslint-config",
    "@hokaccha/eslint-config/react"
  ]
}
```

## License

MIT
npm package: @hokaccha/sql-formatter
Description: Format whitespace in a SQL query to make it more readable
Latest version: 1.4.0

# SQL Formatter

Forked from [zeroturnaround/sql-formatter](https://github.com/zeroturnaround/sql-formatter) but with improvements and ported Typescript.

**SQL Formatter** is a JavaScript library for pretty-printing SQL queries.
It started as a port of a [PHP Library](https://github.com/jdorn/sql-formatter), but has since considerably diverged.

SQL formatter supports the following dialects:

- **sql** - [Standard SQL](https://en.wikipedia.org/wiki/SQL:2011)
- **mariadb** - [MariaDB](https://mariadb.com/)
- **mysql** - [MySQL](https://mariadb.com/)
- **postgresql** - [PostgreSQL](https://www.postgresql.org/)
- **db2** - [IBM DB2](https://www.ibm.com/analytics/us/en/technology/db2/)
- **plsql** - [Oracle PL/SQL](https://www.oracle.com/database/technologies/appdev/plsql.html)
- **n1ql** - [Couchbase N1QL](http://www.couchbase.com/n1ql)
- **redshift** - [Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/dg/cm_chap_SQLCommandRef.html)
- **spark** - [Spark](https://spark.apache.org/docs/latest/api/sql/index.html)
- **tsql** - [SQL Server Transact-SQL](https://docs.microsoft.com/en-us/sql/sql-server/)
- **bigquery** - [Google BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/introduction)

It does not support:

- Stored procedures.
- Changing of the delimiter type to something else than `;`.

## Install

Get the latest version from NPM:

```sh
npm install @hokaccha/sql-formatter
```

## Usage as library

```js
import { format } from "sql-formatter";

console.log(format("SELECT * FROM tbl"));
```

This will output:

```sql
SELECT
  *
FROM
  tbl
```

You can also pass in configuration options:

```js
format("SELECT * FROM tbl", {
  language: "spark",        // Defaults to "sql" (see the above list of supported dialects)
  indent: "    ",           // Defaults to two spaces
  keywordCase: "upper",     // Defaults to preserve ("upper" | "lower" | "preserve")
  linesBetweenQueries: 2,   // Defaults to 1
});
```

### Placeholders replacement

```js
// Named placeholders
format("SELECT * FROM tbl WHERE foo = @foo", {
  params: {foo: "'bar'"}
}));

// Indexed placeholders
format("SELECT * FROM tbl WHERE foo = ?", {
  params: ["'bar'"]
}));
```

Both result in:

```
SELECT
  *
FROM
  tbl
WHERE
  foo = 'bar'
```

## License

[MIT](https://github.com/hokaccha/sql-formatter/blob/main/LICENSE)
npm package: @hokid/babel-preset-react-app
Description: Babel preset used by Create React App
Latest version: 9.0.0

# babel-preset-react-app

This package includes the Babel preset used by [Create React App](https://github.com/facebook/create-react-app).<br>
Please refer to its documentation:

- [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.

## Usage in Create React App Projects

The easiest way to use this configuration is with [Create React App](https://github.com/facebook/create-react-app), which includes it by default. **You don’t need to install it separately in Create React App projects.**

## Usage Outside of Create React App

If you want to use this Babel preset in a project not built with Create React App, you can install it with the following steps.

First, [install Babel](https://babeljs.io/docs/setup/).

Then install babel-preset-react-app.

```sh
npm install babel-preset-react-app --save-dev
```

Then create a file named `.babelrc` with following contents in the root folder of your project:

```json
{
  "presets": ["react-app"]
}
```

This preset uses the `useBuiltIns` option with [transform-object-rest-spread](http://babeljs.io/docs/plugins/transform-object-rest-spread/) and [transform-react-jsx](http://babeljs.io/docs/plugins/transform-react-jsx/), which assumes that `Object.assign` is available or polyfilled.

## Usage with Flow

Make sure you have a `.flowconfig` file at the root directory. You can also use the `flow` option on `.babelrc`:

```json
{
  "presets": [["react-app", { "flow": true, "typescript": false }]]
}
```

## Usage with TypeScript

Make sure you have a `tsconfig.json` file at the root directory. You can also use the `typescript` option on `.babelrc`:

```json
{
  "presets": [["react-app", { "flow": false, "typescript": true }]]
}
```
npm package: @hokify/axios
Description: Secure and easy Axios integration with Nuxt.js
Latest version: 5.12.3
Deprecated: use @nuxtjs/axios instead

[![@nuxtjs/axios](https://axios.nuxtjs.org/preview.png)](https://axios.nuxtjs.org)

# @nuxtjs/axios

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]

> Secure and easy [Axios](https://github.com/axios/axios) integration for [Nuxt](https://nuxtjs.org).

- [✨ &nbsp;Release Notes](https://axios.nuxtjs.org/releases)
- [📖 &nbsp;Documentation](https://axios.nuxtjs.org)

## Features

- Automatically set base URL for client & server side
- Exposes `setToken` function to `$axios` so we can easily and globally set authentication tokens
- Automatically enables `withCredentials` when requesting to base URL
- Proxy request headers in SSR
- Fetch Style requests
- Integrated with Nuxt progress bar
- Integrated with Proxy Module
- Auto retry requests with axios-retry

[📖 &nbsp;Read more](https://axios.nuxtjs.org)

## Contributing

1. Clone this repository
2. Install dependencies using `yarn install` or `npm install`
3. Start development server using `npm run dev`

## 📑 License

[MIT License](./LICENSE)

Copyright (c) Nuxt Community

<!-- Badges -->
<!-- Badges -->
[npm-version-src]: https://flat.badgen.net/npm/v/@nuxtjs/axios
[npm-version-href]: https://npmjs.com/package/@nuxtjs/axios

[npm-downloads-src]: https://flat.badgen.net/npm/dm/@nuxtjs/axios
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/axios

[github-actions-ci-src]: https://github.com/nuxt-community/axios-module/workflows/ci/badge.svg
[github-actions-ci-href]: https://github.com/nuxt-community/axios-module/actions?query=workflow%3Aci

[codecov-src]: https://flat.badgen.net/codecov/c/github/nuxt-community/axios-module
[codecov-href]: https://codecov.io/gh/nuxt-community/axios-module

[license-src]: https://img.shields.io/npm/l/@nuxtjs/axios.svg
[license-href]: https://npmjs.com/package/@nuxtjs/axios
npm package: @hokify/axios-module
Description: Secure and easy axios integration with Nuxt.js
Latest version: 5.6.1

# 📦 Axios Module

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Circle CI][circle-ci-src]][circle-ci-href]
[![Codecov][codecov-src]][codecov-href]
[![Dependencies][david-dm-src]][david-dm-href]
[![Standard JS][standard-js-src]][standard-js-href]

> Secure and Easy <a href="https://github.com/mzabriskie/axios">Axios</a> integration with Nuxt.js

## ✅ Features

✓ Automatically set base URL for client & server side

✓ Exposes `setToken` function to `$axios` so we can easily and globally set authentication tokens

✓ Automatically enables `withCredentials` when requesting to base URL

✓ Proxy request headers in SSR (Useful for auth)

✓ Fetch Style requests

✓ Integrated with Nuxt.js Progressbar while making requests

✓ Integrated with [Proxy Module](https://github.com/nuxt-community/proxy-module)

✓ Auto retry requests with [axios-retry](https://github.com/softonic/axios-retry)

📖 [**Read Documentation**](https://axios.nuxtjs.org)

## Development

1. Clone this repository
2. Install dependencies using `yarn install` or `npm install`
3. Start development server using `npm run dev`

## 📑 License

[MIT License](./LICENSE)

Copyright (c) Nuxt Community

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/dt/@nuxtjs/axios.svg?style=flat-square
[npm-version-href]: https://npmjs.com/package/@nuxtjs/axios
[npm-downloads-src]: https://img.shields.io/npm/v/@nuxtjs/axios/latest.svg?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/axios
[circle-ci-src]: https://img.shields.io/circleci/project/github/nuxt-community/axios-module.svg?style=flat-square
[circle-ci-href]: https://circleci.com/gh/nuxt-community/axios-module
[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/axios-module.svg?style=flat-square
[codecov-href]: https://codecov.io/gh/nuxt-community/axios-module
[david-dm-src]: https://david-dm.org/nuxt-community/axios-module/status.svg?style=flat-square
[david-dm-href]: https://david-dm.org/nuxt-community/axios-module
[standard-js-src]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square
[standard-js-href]: https://standardjs.com
npm package: @hokify/axios-rate-limit
Description: Rate limit for axios.
Author: Alexandr Borisov
Latest version: 2.0.5

# Fork
this is a fork of https://github.com/aishek/axios-rate-limit which has following changes in it:
* rewrite in Typescript
* allows passing in a custom store, to share the state between instances/servers.
  
Note: this module does not share state with other processes/servers by default. Use a redis or Memcached Store for shared states.

### Stores
this fork uses the stores avaialble from express rate limiting. Therefore easy extendable :)

- Memory Store _(default, built-in)_ - stores hits in-memory in the Node.js process. Does not share state with other servers or processes.
- [Redis Store](https://npmjs.com/package/rate-limit-redis)
- [Memcached Store](https://npmjs.org/package/rate-limit-memcached)

# axios-rate-limit

[![npm version](https://img.shields.io/npm/v/axios-rate-limit.svg?style=flat-square)](https://www.npmjs.com/package/axios-rate-limit)
[![npm downloads](https://img.shields.io/npm/dt/axios-rate-limit.svg?style=flat-square)](https://www.npmjs.com/package/axios-rate-limit)
[![Build Status](https://img.shields.io/travis/aishek/axios-rate-limit.svg?style=flat-square)](https://travis-ci.org/aishek/axios-rate-limit)

A rate limit for axios: set how many requests per interval should perform immediately, other will be delayed automatically.

## Installing

```bash
yarn add axios-rate-limit
```

## Usage

```javascript
import axios from 'axios';
import rateLimit from 'axios-rate-limit';

// sets max 2 requests per 1 second, other will be delayed
// note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence
// if specified both with maxRequests and perMilliseconds
const http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 })
http.getMaxRPS() // 2
http.get('https://example.com/api/v1/users.json?page=1') // will perform immediately
http.get('https://example.com/api/v1/users.json?page=2') // will perform immediately
http.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one

// options hot-reloading also available
http.setMaxRPS(3)
http.getMaxRPS() // 3
http.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor
```