The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { isNonEmptyString } from '@sniptt/guards';
import { isDefined } from 'twenty-shared/utils';
import { parseMediaQueryNumericValueParts } from '@/polyfills/media-query/utils/parseMediaQueryNumericValueParts';
export const parseMediaQueryDevicePixelRatioValue = (
featureValue: string,
): number | null => {
const valueParts = parseMediaQueryNumericValueParts(featureValue);
if (!isDefined(valueParts) || isNonEmptyString(valueParts.unit)) {
return null;
}
return valueParts.numericValue;
};