#Test credit card numbers to use when developing with Stripe
4242424242424242 Visa
4012888888881881 Visa
4000056655665556 Visa (debit)
| export default [ | |
| "Reticulating splines...", | |
| "Generating witty dialog...", | |
| "Swapping time and space...", | |
| "Spinning violently around the y-axis...", | |
| "Tokenizing real life...", | |
| "Bending the spoon...", | |
| "Filtering morale...", | |
| "Don't think of purple hippos...", | |
| "We need a new fuse...", |
#Test credit card numbers to use when developing with Stripe
4242424242424242 Visa
4012888888881881 Visa
4000056655665556 Visa (debit)
| [ | |
| { | |
| "id": "a2bab180-17da-11e8-8d5b-2936574e8713", | |
| "first": "Michael", | |
| "last": "Oakley", | |
| "address": "123 Maple St. Anytown, CO" | |
| }, | |
| { | |
| "id": "aabab190-11e9-18da-8d5b-1136474f7711", | |
| "first": "John", |
| chartNum = Highcharts.charts.length - 1 // grab the last (current) chart | |
| data = Highcharts.charts[chartNum].series[0].yData.filter(d => d > 0) // remove the nulls/zero values | |
| avg = Math.round(data.reduce((a, b) => a + b) / data.length) // calc the average | |
| Highcharts.charts[chartNum].yAxis[0].addPlotLine({ // draw the plotline | |
| color: avg > 2000 ? '#FF00FF' : 'green', | |
| dashStyle: 'longdashdot', | |
| value: avg, | |
| width: '2', | |
| zIndex: 2 // To not get stuck below the regular plot lines | |
| }); |
| // runs on load | |
| export function* main() { | |
| const pollingInstance = yield fork(pollingWatcher); | |
| // fork other watchers ... | |
| // if location changes, kill the watcher(s) | |
| yield take(LOCATION_CHANGE); | |
| yield cancel(pollingInstance); | |
| // cancel other watchers ... | |
| } |
| let groupBy = 'date'; | |
| let apiData = [{date: 3, count: 5},{date: 2, count: 3},{date: 1, count: 1},{date: 1, count: 2},{date: 2, count: 4},{date: 3, count: 6}]; | |
| let sortedApiData = apiData.sort((a, b) => (a[groupBy] > b[groupBy]) ? 1 : ((b[groupBy] > a[groupBy]) ? -1 : 0 )) | |
| let dateArray = sortedApiData.map((el, idx) => el[groupBy]).filter((el, i, a) => el !== a[i-1]); | |
| result = dateArray | |
| .map((dayNumber, idx) => | |
| sortedApiData | |
| .filter((apiDataPoint, i) => |
| export function* main() { | |
| const { payload } = yield take(SOME_START_SIGNAL); | |
| const watcherInstance = yield fork(updateResource, payload); | |
| // cancel task instance on location change | |
| yield take(LOCATION_CHANGE); | |
| yield cancel(watcherInstance); | |
| } | |
| function* updateResource(id) { |
| function* main() { | |
| // create variable for watcher | |
| const watcherInstance = yield fork(watcher); | |
| // if location changes, continuation | |
| yield take(LOCATION_CHANGE); | |
| yield cancel(watcherInstance); // cancel task instance | |
| } |
| { | |
| "itemPool": ["Item pool 1 from server", "Item pool 2 from server"] | |
| } |