@just-web/formatjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@just-web/formatjs

NPM version NPM downloads

@just-web/formatjs provides Format.JS support for @just-web applications.

It re-exports @formatjs/intl so that you can access all functionality of @formatjs/intl directly.

Install

# npm
npm install @just-web/formatjs

# yarn
yarn add @just-web/formatjs

# pnpm
pnpm install @just-web/formatjs

#rush
rush add -p @just-web/formatjs

Usage

The formatJSGizmoFn() accepts the same parameters as createIntl() in object from:

import { justApp } from '@just-web/app'
import { formatJSGizmoFn, createIntlCache } from '@just-web/formatjs'

const cache = createIntlCache()

const app = await justApp({ name: 'your-awesome-app' })
  .with(formatJSGizmoFn({
    config: { locale: 'en', messages: {} },
    cache
  }))
  .create()

app.formatjs.intl.formatMessage({ defaultMessage: 'hello world' })

Readme

Keywords

Package Sidebar

Install

npm i @just-web/formatjs

Weekly Downloads

60

Version

1.0.5

License

MIT

Unpacked Size

14.6 kB

Total Files

32

Last publish

Collaborators

  • unional