@@ -1 +1,2 @@ | |||||
.idea/ | |||||
.idea/ | |||||
scripts/*.out.* |
@@ -6,6 +6,6 @@ | |||||
- [ ] Exponential syntax support | - [ ] Exponential syntax support | ||||
- [ ] Optimizations for fractions | - [ ] Optimizations for fractions | ||||
- [ ] Check invalid string inputs | - [ ] Check invalid string inputs | ||||
- [ ] Ordinals (e.g. `twentieth`, `first`, `two millionth`) | |||||
- [X] Ordinals (e.g. `twentieth`, `first`, `two millionth`) | |||||
- [ ] Implement other `fractionType`s, implement `lazy` fractions, e.g. `0.05` => `zero point zero five`, | - [ ] Implement other `fractionType`s, implement `lazy` fractions, e.g. `0.05` => `zero point zero five`, | ||||
will implement `ratio` (`zero and five over one hundred`) and `part` (`zero and five hundredths`) | will implement `ratio` (`zero and five over one hundred`) and `part` (`zero and five hundredths`) |
@@ -0,0 +1,17 @@ | |||||
const { default: getNumberName } = require('../packages/core') | |||||
const fs = require('fs') | |||||
const path = require('path') | |||||
const main = async () => { | |||||
const ws = fs.createWriteStream(path.resolve(__dirname, 'count-to-one-milliatillion.out.csv')) | |||||
ws.write('number,name\n') | |||||
for (let i = 0; i <= 3000003; i++) { | |||||
if (i % 1000 === 0) { | |||||
console.log(i) | |||||
} | |||||
ws.write(`1e+${i}` + ',' + getNumberName(`1e+${i}`) + '\n') | |||||
} | |||||
ws.close() | |||||
} | |||||
void main() |
@@ -0,0 +1,17 @@ | |||||
const { default: getNumberName } = require('../packages/core') | |||||
const fs = require('fs') | |||||
const path = require('path') | |||||
const main = async () => { | |||||
const ws = fs.createWriteStream(path.resolve(__dirname, 'count-to-one-million.out.csv')) | |||||
ws.write('number,name\n') | |||||
for (let i = 0; i <= 1000000; i++) { | |||||
if (i % 1000 === 0) { | |||||
console.log(i) | |||||
} | |||||
ws.write(i + ',' + getNumberName(i) + '\n') | |||||
} | |||||
ws.close() | |||||
} | |||||
void main() |