A Node package to convert digits to swahili words based on Standard commonjs
npm i digits-to-swahili
Importing
const { toSwahili } = require('digits-to-swahili');
toSwahili(500) // Mia tano
OR
import { toSwahili } from 'digits-to-swahili';
toSwahili(200) // Mia mbili
Tests are done using mocha.js. You can directly test via the following steps:
- In the root directory open test/converter.js
- Edit the const's of Test Parameters to your own digits
- Edit the Expected output to the same digits in expected swahili language
- Now run
npm run test
In case you notice a bug, please open an issue mentioning the input that has caused an incorrect conversion.
The MIT License (MIT)