https://github.com/paypal/paypal-risk-data-collector
https://github.com/paypal/paypal-risk-data-collector
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/paypal/paypal-risk-data-collector
- Owner: paypal
- License: apache-2.0
- Created: 2020-02-19T02:15:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T19:39:29.000Z (over 2 years ago)
- Last Synced: 2024-10-16T00:10:38.193Z (almost 2 years ago)
- Language: JavaScript
- Size: 132 KB
- Stars: 4
- Watchers: 10
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
PayPal Risk Data Collector
--------------------------
Risk Data Collector for PayPal
Usage
-----
```javascript
import { collectRiskData } from '@paypal/risk-data-collector';
const riskData = collectRiskData();
// Send `riskData` to server attached to http request
```
Quick Start
-----------
#### Getting Started
- Fork the module
- Run setup: `npm run setup`
- Start editing code in `./src` and writing tests in `./tests`
- `npm run build`
#### Building
```bash
npm run build
```
#### Tests
- Edit tests in `./test/tests`
- Run the tests:
```bash
npm run test
```
#### Testing with different/multiple browsers
```bash
npm run karma -- --browser=PhantomJS
npm run karma -- --browser=Chrome
npm run karma -- --browser=Safari
npm run karma -- --browser=Firefox
npm run karma -- --browser=PhantomJS,Chrome,Safari,Firefox
```
#### Keeping the browser open after tests
```bash
npm run karma -- --browser=Chrome --keep-open
```
#### Publishing
##### Before you publish for the first time:
- Delete the example code in `./src`, `./test/tests` and `./demo`
- Edit the module name in `package.json`
- Edit `README.md` and `CONTRIBUTING.md`
##### Then:
- Publish your code: `npm run release` to add a patch
- Or `npm run release:path`, `npm run release:minor`, `npm run release:major`