svelte-i18n/src/utils.js

5 lines
255 B
JavaScript
Raw Normal View History

export const capital = str => str.replace(/(^|\s)\S/, l => l.toUpperCase())
export const title = str => str.replace(/(^|\s)\S/g, l => l.toUpperCase())
export const upper = str => str.toLocaleUpperCase()
2019-06-06 23:05:30 +02:00
export const lower = str => str.toLocaleLowerCase()