Skip to content

Commit

Permalink
feat: add low level API to get access to the formatters (#31)
Browse files Browse the repository at this point in the history
* Add test
* Change approach, export functions to access the formatters instead
  • Loading branch information
cibernox authored and kaisermann committed Jan 7, 2020
1 parent 490fdd9 commit 86cca99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/client/index.ts
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions test/client/includes/formatters.test.ts
Expand Up @@ -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 })
Expand Down

0 comments on commit 86cca99

Please sign in to comment.