Need private packages and team management tools?Check out npm Teams »

nymus

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

Install

npm i nymus

DownloadsWeekly Downloads

40

Version

0.2.0

License

MIT

Unpacked Size

72.2 kB

Total Files

28

Last publish

Collaborators

  • avatar