nexxtway/react-rainbow

View on GitHub
src/components/CurrencyInput/hooks/useDecimalSeparator.js

Summary

Maintainability
A
1 hr
Test Coverage
import { useMemo } from 'react';
import { getSeparator } from '../helpers';

export default function useDecimalSeparator({ locale, style, currency }) {
    return useMemo(() => getSeparator({ locale, type: 'decimal', style, currency }), [
        currency,
        locale,
        style,
    ]);
}