Skip to content

Instantly share code, notes, and snippets.

View ashleyrudland's full-sized avatar

@ashleyrudland ashleyrudland

View GitHub Profile
@ashleyrudland
ashleyrudland / exportSubscriptionData.js
Last active August 21, 2023 05:40
Find churn reasons by sucking out all Stripe subscriptions (includes all subscriptions)
const fs = require('fs');
const moment = require('moment');
const stripe = require('../stripe');
const hashCode = (str) => {
let hash = 0;
if (typeof str !== 'string' || str.length === 0) {
return String(hash);
}
for (let i = 0; i < str.length; i++) {