1.0.1 • Published 9 years ago
donate-to-aclu v1.0.1
donate-to-aclu 
Takes an object to submit an automated ACLU donation form.
Security
- no database at all
- open source
- as many validation checks as I can make before submitting to ACLU
Required Fields
| Field | Format | Example | 
|---|---|---|
| firstname | string | Casey | 
| lastname | string | Doe | 
| address | string | 123 Rainbow Lane | 
| zipcode | string | 12345 | 
| cc_number | str/num | no spaces, just numbers | 
| cc_exp | xx/xx | Month/Year | 
| cc_code | xxx | number or string | 
| amount | xx.xx | ACLU only takes donations of $5 or more. Code strips all but numbers, period, comma; parseFloat; round down to 2 cent digits | 
Optional Fields
| Field | Format | Default | 
|---|---|---|
| fullname | string | Casey Doe (can be used in place of firstname and lastname) | 
| string | crhallberg+acluapi@gmail.com | |
| city | string | (determined by zipcode if absent) | 
| state | string | (determined by zipcode if absent) | 
| country_code | str/num | 840 (US) - ISO_3166-1 country code | 
| get_updates | boolean | false | 
| share_info | boolean | false | 
Example
const aclu = require('donate-to-aclu');
const fields = { /* ... */ };
if (aclu.validate(fields)) {
  aclu.submit(fields);
}Powered By
- Zombie.js
- Inspired by ACLU Dash Button Hack