Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bukinoshita/npm-donate
Support maintainers with a donation and help them continue with activities.
https://github.com/bukinoshita/npm-donate
donate donation maintainers npm open-source oss
Last synced: 10 days ago
JSON representation
Support maintainers with a donation and help them continue with activities.
- Host: GitHub
- URL: https://github.com/bukinoshita/npm-donate
- Owner: bukinoshita
- License: mit
- Created: 2017-07-15T21:20:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T09:52:40.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T16:08:00.261Z (27 days ago)
- Topics: donate, donation, maintainers, npm, open-source, oss
- Language: JavaScript
- Homepage:
- Size: 171 KB
- Stars: 40
- Watchers: 4
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# npm-donate [![Build Status](https://travis-ci.org/bukinoshita/npm-donate.svg?branch=master)](https://travis-ci.org/bukinoshita/npm-donate)
> Support maintainers with a donation and help them continue with activities
## Install
```bash
$ npm install --save npm-donate
```## Usage
```js
const npmDonate = require('npm-donate')npmDonate('https://npm-donate.now.sh', 100)
```## Demo
## API
### npmDonate(apiUrl, amount, [options])
Returns a `promise`
#### apiUrl
Type: `string`
RequiredYour API Url where it handles donations.
Check here: [npm-donate-server](https://github.com/bukinoshita/npm-donate-server)#### amount
Type: `number`
Default: `0.50` (cents — minimum)
OptionalDonation amount
#### options
Type: `object`
##### Google Maps Key
Type: `string`
If Google Maps API Key is set, it will lookup for user `state` and `city` using zip code.
##### currency
Type: `string`
Default: `usd`3-letter ISO code for currency.
Check supported currencies [here](https://stripe.com/docs/currencies).##### description
Type: `string`
Default: `Donation`An arbitrary string which you can attach to a Charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing.
## Related
- [npm-donate-server](https://github.com/bukinoshita/npm-donate-server) — npm donate server to handle donations
- [credit-card-prompt](https://github.com/bukinoshita/credit-card-prompt) — Credit card prompt with validation and address lookup## License
MIT © [Bu Kinoshita](https://bukinoshita.io)