charity-base
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "charity-base", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A javascript client library for using charity-base-api", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
@@ -23,2 +23,29 @@ # CharityBase Client Library (JavaScript) | ||
This package makes use of the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) so be aware of the following: | ||
### Client Side | ||
Modern browsers have `fetch` in the window scope so you don't need to do anything however we recommend installing the [fetch polyfill](https://github.com/github/fetch) to support older browsers: | ||
```bash | ||
yarn add whatwg-fetch | ||
``` | ||
### Server Side | ||
If you're using `charity-base` from the backend you'll need to install [node-fetch](https://www.npmjs.com/package/node-fetch): | ||
```bash | ||
yarn add node-fetch | ||
``` | ||
And import it like so: | ||
```js | ||
// server_code.js | ||
const fetch = require('node-fetch') | ||
const CharityBaseClient = require('charity-base') | ||
... | ||
``` | ||
## Example | ||
@@ -25,0 +52,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15724
79