Skip to content

Instantly share code, notes, and snippets.

View rebeccathedev's full-sized avatar

Rebecca Peck rebeccathedev

View GitHub Profile
Verifying that +peckrob is my blockchain ID. https://onename.com/peckrob
@rebeccathedev
rebeccathedev / keybase.md
Last active April 2, 2024 00:33
Keybase

Keybase proof

I hereby claim:

  • I am rebeccathedev on github.
  • I am rebeccathedev (https://keybase.io/rebeccathedev) on keybase.
  • I have a public key whose fingerprint is 0192 7408 F276 5037 5B22 090D 7B1E B53E 833A 586B

To claim this, I am signing this object:

@rebeccathedev
rebeccathedev / gist:1753343
Created February 6, 2012 17:04
Javascript function to convert a number to a long currency string
var ones = ['', ' one', ' two', ' three', ' four', ' five', ' six', ' seven', ' eight', ' nine', ' ten', ' eleven', ' twelve', ' thirteen', ' fourteen', ' fifteen', ' sixteen', ' seventeen', ' eighteen', ' nineteen'];
var tens = ['', '', ' twenty', ' thirty', ' forty', ' fifty', ' sixty', ' seventy', ' eighty', ' ninety'];
var triplets = ['', ' thousand', ' million', ' billion', ' trillion', ' quadrillion', ' quintillion', ' sextillion', ' septillion', ' octillion', ' nonillion'];
var currency = ["dollars", "cents"];
/**
* This is the main funciton you call to convert a currency string to a long description.
*
* Example:
* toWords(0.05) returns "five cents"