|
1234567891011121314151617 |
- 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()
|