Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matthieubosquet/numerals

Numerals conversion
https://github.com/matthieubosquet/numerals

numerals roman

Last synced: about 2 months ago
JSON representation

Numerals conversion

Awesome Lists containing this project

README

        

![Node.js CI](https://github.com/matthieubosquet/numerals/workflows/Node.js%20CI/badge.svg?branch=master)
[![codecov](https://codecov.io/gh/matthieubosquet/numerals/branch/master/graph/badge.svg)](https://codecov.io/gh/matthieubosquet/numerals)

# Numerals

Convert numbers to their form in a numeral system.

Currently only implements the [roman numerals system](https://en.wikipedia.org/wiki/Roman_numerals) converter.

See also: [https://en.wikipedia.org/wiki/List_of_numeral_systems](https://en.wikipedia.org/wiki/List_of_numeral_systems)

[Try the converter!](https://neig.es/numerals/)

## How-to?

- Install the package

```bash
npm i numerals
```

- Use the package as an ECMAScript module

```javascript
import { convertNumberToNumeralForm, Language, NumeralForm } from 'numerals';

let x = convertNumberToNumeralForm(8, NumeralForm.Roman, Language.English);

// Outputs VIII
console.log(x);
```

- Use the package as a CommonJS module

```javascript
const { convertNumberToNumeralForm, Language, NumeralForm } = require('numerals')

let x = convertNumberToNumeralForm(8, NumeralForm.Roman, Language.English)

// Outputs VIII
console.log(x);
```

- Get the web component

```bash
wget https://neig.es/numerals/script/numerals-ui.js
```

- Use the web component

```html



Numerals converter


```