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

0.1.3 • Public • Published

Node.js CI codecov

Numerals

Convert numbers to their form in a numeral system.

Currently only implements the roman numerals system converter.

See also: https://en.wikipedia.org/wiki/List_of_numeral_systems

Try the converter!

How-to?

  • Install the package
npm i numerals
  • Use the package
import { Language, NumeralForm, convertNumberToNumeralForm } from 'numerals';
 
let x = convertNumberToNumeralForm(8, NumeralForm.Roman, Language.English);
 
// Outputs VIII
console.log(x);
  • Get the web component
wget https://neig.es/numerals/script/numerals-ui.js
  • Use the web component
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Numerals converter</title>
</head>
<body>
    <numerals-ui></numerals-ui>
    <script src="./script/numerals-ui.js"></script> 
</body>
</html>

Package Sidebar

Install

npm i numerals

Weekly Downloads

151

Version

0.1.3

License

MIT

Unpacked Size

17.2 kB

Total Files

13

Last publish

Collaborators

  • matthieubosquet