@vendure/core
Version:
A modern, headless ecommerce framework
14 lines • 518 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.couponCodesMatch = couponCodesMatch;
/**
* @description
* Performs a case-insensitive comparison of two coupon codes.
* Centralizes the normalization logic so that if it ever needs to change
* (e.g. trimming whitespace, using `toLocaleLowerCase()`), only this
* single function needs updating.
*/
function couponCodesMatch(a, b) {
return a.toLowerCase() === b.toLowerCase();
}
//# sourceMappingURL=coupon-codes-match.js.map