2019-11-21 21:51:52 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { partial } from 'lodash';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* WooCommerce dependencies
|
|
|
|
*/
|
|
|
|
import { CURRENCY } from '@woocommerce/wc-admin-settings';
|
|
|
|
import { numberFormat, formatValue, calculateDelta } from '@woocommerce/number';
|
|
|
|
|
|
|
|
// Compose the site currency settings with the format functions.
|
|
|
|
const storeNumberFormat = partial( numberFormat, CURRENCY );
|
|
|
|
const storeFormatValue = partial( formatValue, CURRENCY );
|
|
|
|
|
|
|
|
// Export the expected API for the consuming app.
|
2020-02-14 02:23:21 +00:00
|
|
|
export {
|
|
|
|
storeNumberFormat as numberFormat,
|
|
|
|
storeFormatValue as formatValue,
|
|
|
|
calculateDelta,
|
|
|
|
};
|