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

js-number-to-word-processor

v3.0.4

Published

The Goal Of JSnumberToWordProcessor Is A Well Formatted Human Readable Number, With It's Corresponding Words.

Downloads

11

Readme

// Navigate To https://repl.it/languages/Nodejs#index.js
// On repl.it Call...

const JSnumberToWordProcessor = require("js-number-to-word-processor");

// Pass In A Single Number-String (with or without a decimal number argument)
JSnumberToWordProcessor("-4783484773.7634656549", 9);

// OR An Array Of Numbers
JSnumberToWordProcessor(["6677", "-7674.969", "0.00"]);
<script src="curStrLengthFunc_2.min.js"></script>
<script src="JSnumberToWordProcessor.js"></script>
npm i js-number-to-word-processor
const JSnumberToWordProcessor = require("js-number-to-word-processor");
import JSnumberToWordProcessor from "js-number-to-word-processor";
require(["js-number-to-word-processor"], function (num) {
  // Use JSnumberToWordProcessor here in local scope.
});

Call JSnumberToWordProcessor & PASS In Either A Positive Whole Number, BigInteger, OR Number-String

JSnumberToWordProcessor("987"); // 987: Nine Hundred and Eighty-Seven
JSnumberToWordProcessor(8476787747); // 8,476,787,747: Eight Billion, Four Hundred and Seventy-Six Million, Seven Hundred and Eighty-Seven Thousand, Seven Hundred and Forty-Seven
JSnumberToWordProcessor(5876985876950n); // 5,876,985,876,950: Five Trillion, Eight Hundred and Seventy-Six Billion, Nine Hundred and Eighty-Five Million, Eight Hundred and Seventy-Six Thousand, Nine Hundred and Fifty
JSnumberToWordProcessor(BigInt(6856767875879601367476468) % BigInt(8)); // 0: Zero
JSnumberToWordProcessor([
  "6478", // 6,478: Six Thousand, Four Hundred and Seventy-Eight
  579n, // 579: Five Hundred and Seventy-Nine
  "57682587695780", // 57,682,587,695,780: Fifty-Seven Trillion, Six Hundred and Eighty-Two Billion, Five Hundred and Eighty-Seven Million, Six Hundred and Ninety-Five Thousand, Seven Hundred and Eighty
]);
JSnumberToWordProcessor([
  6478 * (55.999865 * -8), // -2,902,137.38: (negative) Two Million, Nine Hundred and Two Thousand, One Hundred and Thirty-Seven (dot) Thirty-Eight hundredths
  579n / ((55n / 11n) * 10n), // 11: Eleven
  579 / ((55 / 11) * 10), // 11.58: Eleven (dot) Fifty-Eight
]);
JSnumberToWordProcessor(5876.98587695); // 5,876.99: Five Thousand, Eight Hundred and Seventy-Six (dot) Ninety-Nine hundredths
JSnumberToWordProcessor("5876.985876950", 5); // 5,876.98,588: Five Thousand, Eight Hundred and Seventy-Six (dot) Ninety-Eight Thousand, Five Hundred and Eighty-Eight hundred-thousandths
JSnumberToWordProcessor("-876950"); // -876,950: (negative) Eight Hundred and Seventy-Six Thousand, Nine Hundred and Fifty
JSnumberToWordProcessor("-8769.5", 1); // -8,769.50: (negative) Eight Thousand, Seven Hundred and Sixty-Nine (dot) Five tenths
JSnumberToWordProcessor(55 / 11); // 5: Five
JSnumberToWordProcessor(55 * 11); // 605: Six Hundred and Five
JSnumberToWordProcessor(555n * 111n); // 61,605: Sixty-One Thousand, Six Hundred and Five
JSnumberToWordProcessor(55 - 11); // 44: Forty-Four
JSnumberToWordProcessor(55 + 11); // 66: Sixty-Six
JSnumberToWordProcessor("55" ** "3"); // 166,375: One Hundred and Sixty-Six Thousand, Three Hundred and Seventy-Five
JSnumberToWordProcessor(55 % 3); // 1: One
JSnumberToWordProcessor(55 + -8); // 47: Forty-Seven
JSnumberToWordProcessor(55.1 / 3 - 8.2); // 10.17: Ten (dot) Seventeen hundredths
JSnumberToWordProcessor(55 * 0.8); // 44: Forty-Four
JSnumberToWordProcessor(5876 / 985876950); // 0.60: Zero (dot) Sixty
JSnumberToWordProcessor(55n ** 18n); // 21,209,401,372,879,911,350,250,244,140,625: Twenty-One Nonillion, Two Hundred and Nine Octillion, Four Hundred and One Septillion, Three Hundred and Seventy-Two Sextillion, Eight Hundred and Seventy-Nine Quintillion, Nine Hundred and Eleven Quadrillion, Three Hundred and Fifty Trillion, Two Hundred and Fifty Billion, Two Hundred and Forty-Four Million, One Hundred and Forty Thousand, Six Hundred and Twenty-Five
JSnumberToWordProcessor([(BigInt(55) / BigInt(11)) * BigInt(10)]); // 50: Fifty
JSnumberToWordProcessor(55.999865 * -8.5, 6); // -475.99,885: (negative) Four Hundred and Seventy-Five (dot) Nine Hundred and Ninety-Eight Thousand, Eight Hundred and Fifty-Three millionths
JSnumberToWordProcessor(
  [
    "55.999858659554367" * "-8.79", // -475.99,885: (negative) Four Hundred and Ninety-Two (dot) Twenty-Three Trillion, Eight Hundred and Seventy-Five Billion, Seven Hundred and Sixty-One Million, Seven Hundred and Forty-Eight Thousand, Two Hundred and Eighty-Six hundred-trillionths
    55.999999 + 8, // 64.00: Sixty-Four
  ],
  14
);
JSnumberToWordProcessor(55.888888 + 8, 5); // 63.88,889: Sixty-Three (dot) Eighty-Eight Thousand, Eight Hundred and Eighty-Nine hundred-thousandths
JSnumberToWordProcessor(55.999999 / 8, 5); // 7.00: Seven
JSnumberToWordProcessor(55.1 - 8.2, 3); // 46.900: Forty-Six (dot) Nine Hundred thousandths
JSnumberToWordProcessor(55.9979865 * -(-8.5), 7); // 475.9,828,853: Four Hundred and Seventy-Five (dot) Nine Million, Eight Hundred and Twenty-Eight Thousand, Eight Hundred and Fifty-Three ten-millionths
JSnumberToWordProcessor(
  [
    -55.999865 * -8.5, // 475.9,988,525: Four Hundred and Seventy-Five (dot) Nine Million, Nine Hundred and Eighty-Eight Thousand, Five Hundred and Twenty-Five ten-millionths
    5 ** 4, // 625: Six Hundred and Twenty-Five
  ],
  7
);
JSnumberToWordProcessor(55 > 26); // 1: One
JSnumberToWordProcessor(55 < 26); // 0: Zero
JSnumberToWordProcessor(55 <= 26); // 0: Zero
JSnumberToWordProcessor(55 == "55"); // 1:
JSnumberToWordProcessor(55 === "55"); // 0: Zero
JSnumberToWordProcessor(55 !== "55"); // 1: One

JavaScript Number To Word Processor Is Developed By Saheed Odulaja. Feel Free To Fork This Repository. Also Be Kind Enough To Leave A STAR 🌟 As A Mark Of Encouragement 😃.