@automattic/calypso-products
Version:
This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.
8 lines (6 loc) • 317 B
text/typescript
import { camelOrSnakeSlug } from './camel-or-snake-slug';
import { PRODUCT_NO_ADS } from './constants';
import type { WithCamelCaseSlug, WithSnakeCaseSlug } from './types';
export function isNoAds( product: WithCamelCaseSlug | WithSnakeCaseSlug ): boolean {
return PRODUCT_NO_ADS === camelOrSnakeSlug( product );
}