nnk-js
Version:
Converts written numbers into their numerical values.
38 lines (30 loc) • 933 B
Markdown
Convert textual representations of numbers into their numerical values with `nnk-js`, an easy-to-use JavaScript library.
Install `nnk-js` using npm:
```bash
npm install nnk-js
```
Or with yarn:
```bash
yarn add nnk-js
```
Once installed, you can import nnk-js into your project as follows:
```javascript
// Import the library
import { Ltn } from 'nnk-js';
// Create an instance of NoNumbersKeyboard
const ltn = new Ltn();
```
```javascript
// Examples of usage
console.log(ltn.one()); // Outputs: 1
console.log(ltn.twenty()); // Outputs: 20
console.log(ltn.oneHundredTwentyThree()); // Outputs: 123
console.log(ltn.oneThousandTwenty()); // Outputs: 1020
```
Convert written numbers from "zero" to "million" into integers.
Supports complex number names like oneThousandTwoHundredThirtyFour.
Simple API to integrate with any JavaScript project.