nymus
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

🦉 nymus

Version License: MIT nymus test status

Transform ICU messages into React components.

Usage

Example

npx nymus ./messages.json

given a ./messages.json file:

{
  "Welcome": "It's {name}, {gender, select, male {his} female {her} other {their}} birthday is {birthday, date, long}"
}

nymus will generate a module containing React components that can be readily imported in your project as follows:

import * as React from 'react';
import { Welcome } from './messages';
 
export function HomePage() {
  return <Welcome name="John" gender="male" birthday={new Date(1985, 11, 3)} />;
}

Documentation

Author

👤 Jan Potoms

Package Sidebar

Install

npm i nymus

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

72.2 kB

Total Files

28

Last publish

Collaborators

  • janpotoms