"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatKoreaCurrency = exports.extractNumber = exports.numberAccept = void 0;
exports.numberAccept = /[\d]+/g;
const extractNumber = (val) => (val.match(exports.numberAccept) || []).join('');
exports.extractNumber = extractNumber;
const formatKoreaCurrency = (val) => {
    if (!val) {
        return val;
    }
    const parsed = (0, exports.extractNumber)(val);
    const number = Number.parseFloat(parsed);
    return number.toLocaleString('kr-KO');
};
exports.formatKoreaCurrency = formatKoreaCurrency;
