Commit Graph

6 Commits

Author SHA1 Message Date
Christian Kaisermann
31b556bc3f feat: 🎸 make getClientLocale tree-shakeable
BREAKING CHANGE: It's now needed to explicitly import the `getClientLocale` method to use
its heuristics when setting the initial locale. This makes the method
and its helpers to be tree-shakeable.

```js
import { init, getClientLocale } from 'svelte-i18n'

init({
  initialLocale: getClientLocale({ ... })
})
```
2020-02-03 11:24:50 -03:00
Christian Kaisermann
0822841140 refactor: 💡 split single utils file into multiple files 2020-02-03 11:24:50 -03:00
Christian Kaisermann
6526245bf9 feat: 🎸 make date,time and number formatters tree-shakeable
BREAKING CHANGE: Changes completely the API. Now, to format a number, date or time, the
developer must explicitly import the formatter store:

`import { time, date, number } from 'svelte-i18n'`
2020-02-03 11:24:50 -03:00
Ramiro Rikkert
27871f9775
fix: memoizing of formatters when no locale is given. (#47) 2020-01-29 11:29:32 -03:00
Christian Kaisermann
bb6dd01558 chore: 🤖 oops, fix actual build-time types being git ignored 2020-01-23 10:32:56 -03:00
Christian Kaisermann
dadeaa2e7f feat: 🎸 add runtime typings
 Closes: Closes #43
2020-01-23 10:11:04 -03:00