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

1.0.1 • Public • Published

int2roman

一个用于转换阿拉伯数字和罗马数字的工具包,进入 docs 文件下查看完整类型定义

安装

npm install int2roman

使用

commonjs 引入

const { intToRoman, romanToInt } = require('int2roman');

console.log(intToRoman(3));
// 'III'

console.log(romanToInt('IV'));
// 4

esModule 引入

import { intToRoman, romanToInt } from 'int2roman';

console.log(intToRoman(3));
// 'III'

console.log(romanToInt('IV'));
// 4

dist 文件夹结构

根据自身需求使用压缩版和未压缩版(默认使用未压缩版)

dist
├── index.cjs
├── index.d.ts
├── index.min.cjs
├── index.min.mjs
└── index.mjs

Package Sidebar

Install

npm i int2roman

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

13.5 kB

Total Files

14

Last publish

Collaborators

  • loners