<commit_before>import { currentStoreView } from '@vue-storefront/core/lib/multistore'
import CurrencyFormatter from 'currencyformatter.js'

/**
 * Converts number to price string
 * @param {Number} value
 */
export function price (value, storeView) {
  if (isNaN(value)) {
    return value
  }
  const _storeView = storeView || currentStoreView();
  if (!_storeView.i18n) {
    return value;
  }

  let { defaultLocale, currencyCode, currencySign, currencyPattern, currencyDecimal, currencyGroup } = _storeView.i18n;

  const separatorIndex = defaultLocale.indexOf('-');
  const languageCode = (separatorIndex > -1) ? defaultLocale.substr(0, separatorIndex) : defaultLocale;

  return CurrencyFormatter.format(value, {
    currencyCode: currencyCode,
    symbol: currencySign,
    locale: languageCode,
    decimal: currencyDecimal,
    group: currencyGroup,
    pattern: currencyPattern
  });
}<commit_msg>Change let to const in price formatting<commit_after>import { currentStoreView } from '@vue-storefront/core/lib/multistore'
import CurrencyFormatter from 'currencyformatter.js'

/**
 * Converts number to price string
 * @param {Number} value
 */
export function price (value, storeView) {
  if (isNaN(value)) {
    return value
  }
  const _storeView = storeView || currentStoreView();
  if (!_storeView.i18n) {
    return value;
  }

  const { defaultLocale, currencyCode, currencySign, currencyPattern, currencyDecimal, currencyGroup } = _storeView.i18n;

  const separatorIndex = defaultLocale.indexOf('-');
  const languageCode = (separatorIndex > -1) ? defaultLocale.substr(0, separatorIndex) : defaultLocale;

  return CurrencyFormatter.format(value, {
    currencyCode: currencyCode,
    symbol: currencySign,
    locale: languageCode,
    decimal: currencyDecimal,
    group: currencyGroup,
    pattern: currencyPattern
  });
}
{'fraction_non_alphanumeric': 0.10532030401737243, 'fraction_numerical': 0.006514657980456026, 'mean_word_length': 4.601823708206687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '880367', 'n_tokens_mistral': 538, 'n_tokens_neox': 519, 'n_words': 136}