npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

romanize-deromanize

v2.0.2

Published

Convert roman numbers to arabic and vice versa with ease.

Downloads

16

Readme

romanize ↔ deromanize

GitHub release testing workflow GitHub license code style: prettier

About

Roman numerals are a numeral system that originated in ancient Rome and remained the usual way of writing numbers throughout Europe well into the Late Middle Ages.

This JavaScript module allows you to convert roman numbers to arabic and vice versa with ease. It's programmed in TypeScript so it can be used with both JS & TS projects.

Installation

Add module to your project dependencies:

$ npm install romanize-deromanize

Usage

Simply include the library

const {romanize, deromanize} = require('romanize-deromanize');

and use the following two methods:

romanize(214); // returns 'CCXIV'
deromanize('DCLXXI'); // returns 671

Development

Code formatting is done by Prettier. Simply format project files by following predefined rules in .prettierrc.json:

$ npm run pretty

which is an alias for:

$ npx prettier --write .

To exclude files from formatting, please refer to .prettierignore (corresponds to .gitignore).

Identifying problematic patterns is covered by static code analysis tool ESLint:

$ npm run lint

which is an alias for:

$ npx eslint .

Linting config can be found in .eslintrc.json.

If you want to run all "prod-ready" scripts successively: format, build, lint & test - simply run:

$ npm run all

which is short for:

$ npm run pretty && npm run build && npm run lint & npm run test

Testing

Unit tests are conducted using Jest. Run all tests from project root using the following command:

$ npm t

or just run a single test suite by specifying its name, e.g.:

$ npm t romanize.test.ts

Issues

If you experience any problems or you just need an extra feature - feel free to create new GitHub repo issue.

References