Giter VIP home page Giter VIP logo

saythisnumber's People

Contributors

caesaraugustus avatar cheio avatar dependabot-preview[bot] avatar dependabot[bot] avatar harrisongill avatar leonardiwagner avatar shadensmith avatar sleeplesslord avatar solatrix avatar tristaaan avatar vishanand avatar wozzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

saythisnumber's Issues

ESLint

Or some equivalent linter.

Numbers are innaccurate in human readable language around 10 quadrillion mark

Numbers become innaccurate in human readable language (confirmed in English), around the ten quadrillion mark:

Correct:
http://www.saythisnumber.in/english/1000000000000099
Expected result: One quadrillion and ninety nine
Actual result: One quadrillion and ninety nine

Incorrect:
http://www.saythisnumber.in/english/10000000000000099
Expected result: ten quadrillion and ninety nine
Actual result: ten quadrillion and one hundred

Issues with Spanish

Numbers 16 - 19 (and 26 - 29, 36 - 39, etc.) have wrong the spacing. Instead of 'diezyseis' it should be 'diez y seis', and the same thing for all the others. Starting from 200, it becomes 'cientos' instead of 'ciento', so from there it should be 'doscientos', 'doscientos uno', and so on, later 'trescientos', 'cuatrocientos' until 'quinientos' (where the bug is fixed). Then again 600 is broken (should be 'seiscientos', 'setecientos', 'ochocientos' and finally 'novecientos'.

say in emoji

maybe it's a bit silly.

1024 => 1️⃣0️⃣2️⃣4️⃣

Spanish Support

There is a different word for 500, it's not 'cinco cincuenta'

Different outputs

Would be nice to not only have a normal page output but also in json, csv, text.

Example:

2-5

text/plain

two(newline)
three(newline)
four(newline)
five(newline)

csv

two,three,four,five;

json

{[
"2" : "two",
"3" : "three",
"4" : "four",
"5" : "five",
]}

'Failed to decode' - message after putting a '%' in the title bar

Calling http://www.saythisnumber.in/english/4 everything goes well.

http://www.saythisnumber.in/english/4[a-z] will always get a header that it cannot GET this output.

But http://www.saythisnumber.in/english/4% will get the following error:

Error: Failed to decode param '4%' at Route.match (/app/node_modules/express/lib/router/route.js:65:17) at Router.matchRequest (/app/node_modules/express/lib/router/index.js:244:17) at pass (/app/node_modules/express/lib/router/index.js:104:30) at Router._dispatch (/app/node_modules/express/lib/router/index.js:173:5) at Object.router (/app/node_modules/express/lib/router/index.js:33:10) at next (/app/node_modules/express/node_modules/connect/lib/proto.js:194:15) at Object.expressInit as handle at next (/app/node_modules/express/node_modules/connect/lib/proto.js:194:15) at Object.query as handle at next (/app/node_modules/express/node_modules/connect/lib/proto.js:194:15)

Tests

To prevent or uncover bugs when when adding new languages or features. Build into package.json so npm test

French numbers issues

  • French numbers from 1000-1999 should not have 'un' prefix: 1024 => mille vingt-quatre
  • 200 is "deux cents"
  • 80 is "quatre-vingts", even though 82 is indeed "quatre-vingt-deux"
  • 81 is "quatre-vingt-un"

Separate out numeral/alternate word systems

Right now this is specific for Chinese (Pinyin, Simplified, Traditional) and Japanese (Hiragana, Kanji, Romaji)

Perhaps choose a default and allow user to specify a different one?

say.thisNumber(32).in('chinese'); // => defaults to simplified(?)
say.thisNumber(32).in('chinese', 'pinyin'); 

This could be used to specify numeral systems of the language too?

Add some styling

  • Keep the font as Times New Roman because it has perfect international support.
  • Keep it minimal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.