UNPKG

@automattic/calypso-products

Version:

This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.

10 lines (8 loc) 425 B
import { camelOrSnakeSlug } from './camel-or-snake-slug'; import { PRODUCT_SENSEI_PRO_YEARLY, PRODUCT_SENSEI_PRO_MONTHLY } from './constants/sensei'; import type { WithSnakeCaseSlug, WithCamelCaseSlug } from './types'; export function isSenseiProduct( product: WithCamelCaseSlug | WithSnakeCaseSlug ): boolean { return [ PRODUCT_SENSEI_PRO_YEARLY, PRODUCT_SENSEI_PRO_MONTHLY ].includes( camelOrSnakeSlug( product ) ); }