Package Exports
- stripe-coupon-to-string
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stripe-coupon-to-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stripe-coupon-to-string
Converts a Stripe Coupon to a string that describes the discount.
Install
npm install --save stripe-coupon-to-string
Usage
const stripeCouponToString = require('stripe-coupon-to-string')
const coupon = {
"id": "25_5OFF",
"object": "coupon",
"amount_off": null,
"created": 1595185912,
"currency": "usd",
"duration": "repeating",
"duration_in_months": 3,
"livemode": false,
"max_redemptions": null,
"metadata": {},
"name": "25.5% off",
"percent_off": 25.5,
"redeem_by": null,
"times_redeemed": 0,
"valid": true
}
stripeCouponToString(coupon) // '25.5% off for the first 3 months'
License
MIT © Travis Fischer
Support my OSS work by following me on twitter