feat: add low level API to get access to the formatters (#31)

* Add test
* Change approach, export functions to access the formatters instead
This commit is contained in:
Miguel Camba 2020-01-07 02:00:58 +01:00 committed by Christian Kaisermann
parent 490fdd9492
commit 86cca99251
2 changed files with 8 additions and 3 deletions

View File

@ -21,6 +21,11 @@ export {
} from './stores/dictionary'
export { $isLoading as isLoading } from './stores/loading'
export { $format as format, $format as _, $format as t } from './stores/format'
export {
getDateFormatter,
getNumberFormatter,
getTimeFormatter,
getMessageFormatter,
} from './includes/formatters'
// utilities
export { registerLocaleLoader as register } from './includes/loaderQueue'

View File

@ -3,8 +3,8 @@ import {
getDateFormatter,
getTimeFormatter,
getMessageFormatter,
} from '../../../src/client/includes/formatters'
import { init } from '../../../src/client/configs'
init
} from '../../../src/client'
beforeEach(() => {
init({ fallbackLocale: undefined })