@automattic/calypso-products
Version:
This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.
13 lines • 514 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isMonthlyProduct = isMonthlyProduct;
exports.isMonthly = isMonthly;
const constants_1 = require("./constants");
function isMonthlyProduct(product) {
return parseInt(String(product.bill_period), 10) === constants_1.PLAN_MONTHLY_PERIOD;
}
function isMonthly(plan) {
return (constants_1.WPCOM_MONTHLY_PLANS.includes(plan) ||
constants_1.JETPACK_MONTHLY_PLANS.includes(plan));
}
//# sourceMappingURL=is-monthly.js.map