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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sumo-rank

v1.0.5

Published

String method that re-formats Japanese sumo wrestler ranks

Readme

Documentation - How to use sumoRank

"<RANK>".sumoRank("<DESIRED FORMAT>")

Contents

Quick Brief on Sumo Ranks Rank Input Format Input Common Usage Examples Use Guide Format Input Rules Rank Input Rules Content Errors Input Errors for Rank Input Errors for Format

QUICK BRIEF ON SUMO RANKS

Each rank has a name, number and direction - typically in that order. Example 1: The highest rank in sumo Long, all caps version: "Yokozuna 1 East" Short, partial caps version: "Y1e" Example 2: The lowest possible rank in the top division Long, all caps version: "Maegashira 17 West" Short, partial caps version: "M17w"

RANK INPUT

Named ranks (high to low) --> Yokozuna, Ozeki, Sekiwake, Komusubi, Maegashira, Juryo, Makushita, Sandanme, Jonidan, Jonokuchi Number ranks (high to low) --> 1 - 100+ (100 is a typical maximum, but it is unlimited in some cases) Direction ranks (high to low) --> East, West

FORMAT INPUT

Nn --> Yokozuna, Maegashira, Jonokuchi, etc. nn --> yokozuna, maegashira, Jonokuchi, etc. N --> Y, M, Jk, etc. n --> y, m, jk, etc. Dd --> East, West dd --> east, west D --> E, W d --> e, w # --> 1, 15, 68, 104, etc.

COMMON USAGE EXAMPLES

Nn # Dd --> Yokozuna 1 East, Maegashira 12 West, Jonokuchi 68 East, etc. nn # dd --> yokozuna 1 east, maegashira 12 west, jonokuchi 68 east, etc. N#D --> Y1E, M12W, Jk68E, etc. N#d --> Y1e, M12w, Jk68e, etc. N --> Y, M, Jk, etc. #d --> 1e, 12w, 68e, etc.

USE GUIDE

FORMAT INPUT RULES

"<RANK>".sumoRank("<DESIRED FORMAT>")

  1. Format can be arranged in any combination "S1W".sumoRank("Nn") --> "Sekiwake" "S1W".sumoRank("N#d") --> "S1w"
  2. Spaces between rankings will be retained "S1W".sumoRank("nn # dd") --> "sekiwake 1 west"

RANK INPUT RULES

"<RANK>".sumoRank("<DESIRED FORMAT>")

  1. Input rank can be any arrangement "Komusubi 1 e".sumoRank("N#D") --> "K1E" "e 1 Komusubi".sumoRank("N#D") --> "K1E" "K1e".sumoRank("N#D") --> "K1E"
  2. Input rank IS caps sensitive "KomuSUBi 1 eASt".sumoRank("Nn") --> Error SR.304

CONTENT ERRORS

  • SR.101 Non-existent Name/Number rankings throw error "Maegashira 18 East".sumoRank("N#D") --> Error
  • SR.202 (INCOMPLETE) Lower division rankings throw error "Sandanme 82 East".sumoRank("N#D") --> Error

INPUT ERRORS FOR RANK

  • SR.301 Empty rank types throw error "".sumoRank("Dd") --> Error
  • SR.302 Blank rank types throw error " ".sumoRank("Nn#Dd") --> Error
  • SR.303 (ERROR DOES NOT EXIST)
  • SR.304 Non-rank item throw error "M two east".sumoRank("N#D") --> Error "i like turtles".sumoRank("N#D") --> Error
  • SR.305 Multiple instances of rank type throw error "Y Y".sumoRank("Nn#Dd) --> Error "Y y".sumoRank("Nn#Dd) --> Error "Y M".sumoRank("Nn#Dd) --> Error "Ozeki ozeki".sumoRank("Nn#Dd) --> Error "Ozeki Sekiwake".sumoRank("Nn#Dd) --> Error
  • SR.306 Rank Name not given, but requested "2 West".sumoRank("Nn") --> Error
  • SR.307 Rank Number not given, but requested "Ozeki West".sumoRank("#") --> Error
  • SR.308 Rank Direction not given, but requested "Ozeki 2".sumoRank("Dd") --> Error

INPUT ERRORS FOR FORMAT

  • SR.401 Empty format types throw error "K2E".sumoRank("") --> Error
  • SR.402 Blank format types throw error "K2E".sumoRank(" ") --> Error
  • SR.403 Incorrect format types throw error "Y1E".sumoRank(123) --> Error "Y1E".sumoRank(true) --> Error "Y1E".sumoRank([]) --> Error "Y1E".sumoRank({}) --> Error
  • SR.404 Duplicate format types throw error "M5W".sumoRank("Dd Dd") --> Error "M5W".sumoRank("Dd d") --> Error "M5W".sumoRank("# #") --> Error