open-index/open-npm huggingface dataset:
npm package: @spankchain-dev/spankpay-lib
Description: Library that provides general Spank react components
Author: SpankPay
Latest version: 0.0.125

# @spankchain-dev/spankpay-lib

> Library that provides general Spank react components

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

## Install

```bash
npm install --save @spankchain-dev/spankpay-lib
```

## Usage

In order to add this lib into the front end repositories
1- Add fonts into the project that will use the lib,
the one located in => /example/public/fonts/
2- Add font-face like /example/src/index.css

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

import MyComponent from '@spankchain-dev/spankpay-lib';

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

## Local development

Install all dependencies `lib` and `example`

```
in lib directory => yarn install
in example directory => yarn install
```

Build lib | Build lib in watch mode

```
in lib directory => yarn build | yarn start
```

Run the example

```
in example directory => yarn start
```

## Storybook

We use Storybook in example enviroment, to start it just run

```
yarn storybook
```

it will start Storybook at `localhost:6006` and keep watching the changes in the lib to reload it (it takes a time to rebuild the lib)
## How to Publish to NPM

- Each new PR should have an updated version on the `package.json` file. (i.e. go from 0.96 to 0.97).
- After approval the PR should be merged.
- Then go to <a href="https://github.com/SpankChain/spankpay-lib/actions"> Actions </a> click on Publish to NPM and then go to the workflows table and then Run the workflow for the `develop` branch.

## License

MIT © [SpankPay](https://github.com/SpankPay)
npm package: @spankchain-dev/spankpay-sdk
Description: Library that enable to use Spankpay payments
Author: SpankChain
Latest version: 0.0.10

# spankpay-sdk

> Made with create-react-library

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

## Install

```bash
npm install --save @spankchain-dev/spankpay-sdk
```

## Usage

1. Import the library

```tsx
import spankpay from 'spankpay-sdk';
```

2. Init the SDK

- it needs to pass the local window object

```tsx
spankpay.init(window);
```

3. We have two way to use

- As HTML Button

```html
<button>
  data-spankpay-key="test_quickstart_key" data-amount={amount} data-currency="USD"
  data-callback-url='<https://spankpay.com>' data-accepted-currencies="BTC,ETH,LTC,USDC" data-description="Test Invoice
  Button" data-metadata={metadata} data-premium-pct="0.05" data-on-payment="onSpankPayPayment"
  data-fiat-enabled={fiatEnabled} data-guest-only={guestOnly} disabled={+amount &lt;= 0} > I use HTML Button tag
  <span role="img" aria-label="smile">😄</span>
</button>
```

- As JS function

javascript code

```tsx
const showSpankPay = async (fiatEnabled: boolean, guestOnly: boolean) => {
    await spankpay.show({
      apiKey: 'test_quickstart_key',
      amount,
      acceptedCurrencies: ['BTC', 'ETH', 'LTC', 'USDC'],
      currency: 'USD',
      callbackUrl: '<https://spankpay.com'>,
      description: 'Test Invoice Show',
      metadata: {},
      onPayment: function(payment: any) {
        console.log(`Payment: ${payment.status}`, payment)
      },
      fiatEnabled: fiatEnabled || false,
      guestOnly: guestOnly || false,
      allowPartial: false,
      premiumPct: 0.04,
      redirectUrl: null as any as string,
    })
  }
```

HTML code

```html
<button onClick={() => showSpankPay(fiatEnabled, guestOnly)} >
  I use the JS show method <span role="img" aria-label="smile">❤️</span>
</button>
```

## License

MIT © [Mclovinn](https://github.com/Mclovinn), © [Cortesa](https://github.com/cortesa)
npm package: @spankchain/chai-subset
Description: Object properties matcher for Chai
Author: Andrii Shumada
Latest version: 1.7.0

chai-subset [![npm version](https://badge.fury.io/js/chai-subset.svg)](https://badge.fury.io/js/chai-subset) [![Build Status](https://travis-ci.org/debitoor/chai-subset.svg?branch=master)](https://travis-ci.org/debitoor/chai-subset) [![devDependency Status](https://david-dm.org/debitoor/chai-subset/dev-status.svg)](https://david-dm.org/debitoor/chai-subset#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/debitoor/chai-subset/badge.svg?service=github)](https://coveralls.io/github/debitoor/chai-subset) [![NSP Status](https://nodesecurity.io/orgs/debitoor/projects/eb6fec04-2b26-4462-b4ff-08d952da3065/badge)](https://nodesecurity.io/orgs/debitoor/projects/eb6fec04-2b26-4462-b4ff-08d952da3065)
===========

"containSubset" object properties matcher for [Chai](http://chaijs.com/) assertion library

Installation
===========

`npm install --save-dev chai-subset`

Usage
=====

common.js
```js
var chai = require('chai');
var chaiSubset = require('chai-subset');
chai.use(chaiSubset);
```

in your spec.js
```js
var obj = {
	a: 'b',
	c: 'd',
	e: {
		foo: 'bar',
		baz: {
			qux: 'quux'
		}
	}
};
	
expect(obj).to.containSubset({
	a: 'b',
	e: {
		baz: {
			qux: 'quux'
		}
	}
});

// or using a compare function
expect(obj).containSubset({
	a: (expectedValue) => expectedValue,
	c: (expectedValue) => expectedValue === 'd'
})

// or with 'not'
expect(obj).to.not.containSubset({
	g: 'whatever'
});
```

Also works good with arrays and `should` interface
```js
var list = [{a: 'a', b: 'b'}, {v: 'f', d: {z: 'g'}}];

list.should.containSubset([{a:'a'}]); //Assertion error is not thrown
list.should.containSubset([{a:'a',  b: 'b'}]); //Assertion error is not thrown

list.should.containSubset([{a:'a', b: 'bd'}]); 
/*throws
AssertionError: expected
[
    {
        "a": "a",
        "b": "b"
    },
    {
        "v": "f",
        "d": {
            "z": "g"
        }
    }
]
to contain subset 
[ { a: 'a', b: 'bd' } ]
*/
```

and with `assert` interface
```js
assert.containSubset({a: 1, b: 2}, {a: 1});
```