declastruct-stripe-sdk
Version:
declarative control of stripe constructs, via declastruct
18 lines • 744 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStripe = void 0;
const simple_in_memory_cache_1 = require("simple-in-memory-cache");
const stripe_1 = __importDefault(require("stripe"));
const with_simple_caching_1 = require("with-simple-caching");
exports.getStripe = (0, with_simple_caching_1.withSimpleCaching)(async (input) => {
const stripe = new stripe_1.default(input.stripe.api.secretKey, {
apiVersion: '2024-06-20',
});
return stripe;
}, {
cache: (0, simple_in_memory_cache_1.createCache)(),
});
//# sourceMappingURL=getStripe.js.map