@polkadot/util
Version:
A collection of useful utilities for @polkadot
16 lines (15 loc) • 453 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSeparator = void 0;
/**
* Get the decimal and thousand separator of a locale
* @param locale
* @returns {decimal: string, thousand: string}
*/
function getSeparator(locale) {
return {
decimal: (0.1).toLocaleString(locale).substring(1, 2),
thousand: (1000).toLocaleString(locale).substring(1, 2)
};
}
exports.getSeparator = getSeparator;
;