Giter Club home page Giter Club logo

to-words's People

Contributors

actav-n avatar akoso avatar blue-predator avatar dalirnet avatar deepsourcebot avatar dependabot-preview[bot] avatar dependabot[bot] avatar dueka avatar eta1993 avatar fijinapdt avatar florianchappaz avatar hardiksondagar avatar masihjahangiri avatar mastermunj avatar rhyso avatar rittme avatar rubek-joshi avatar saifergit avatar sylvebois avatar wocodes avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

to-words's Issues

Arabic Support

Hello Guys ๐Ÿ˜.
I'm wondering if can I add the arabic support to the package ?
If yes, Please confirm so I can open my PR.

Thanks!

Locale Support

Hi Tean,

We are using this package for currency conversion. we are facing challenge regarding locale. As per my requirements, we need to support below locales

  1. ar-DZ
  2. en-UK
  3. ja-JP
  4. th-TH
  5. zh-CN

this package is not supporting above locales. Please guide us how to implement this locale support using this package.

Types files are missing from Typescript compilation

I tried using this module in Angular project. When I build my project its throwing error for types files.

WARNING in ./node_modules/to-words/dist/locales/en-US.d.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /var/lib/name/node_modules/to-words/dist/locales/en-US.d.ts is missing from the TypeScript compilation. Please make sure it is
in your tsconfig via the 'files' or 'include' property.

Tried adding the files in tsconfig but still the error is same.

image

Procedure to Replicate Issue

  1. Create new angular project and install to-words library

  2. Chnage app.component.ts like this

import { Component, OnInit } from '@angular/core';
import { ToWords } from "to-words";

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
  title = 'to-words-test';

  ngOnInit() {
    const toWords = new ToWords({
      localeCode: 'en-IN', converterOptions: {
        currency: true
      }
    });
    const word = toWords.convert(1234, { currency: true });
    console.log(word);
  }
}
  1. Do ng build or ng serve which will show the error

name in currencyOptions not working

I tried below code, it works well but name config is not working. It always considers plural

{
    "localeCode": "en-IN",
    "converterOptions": {
        "currency": true,
        "currencyOptions": {
            "name": "Rupee",
            "plural": "Rupees",
            "symbol": "",
            "fractionalUnit": {
                "name": "Paisa",
                "plural": "Paise",
                "symbol": ""
            }
        }
    }
}

Test#1: 1.01 outputs One Rupees And One Paise Only but should be One Rupee And One Paisa Only
Test#2: 1.00 outputs One Rupees Only but should be One Rupee Only

Can you please check this or am I missing anything ?

Pound and Euro currency required

hi am sagar, am updating changes and committing code, but code not committed through git

subject and type missing like error showing

Add Support for Ghana Locale

Hi, I'm super happy there is support for the Nigerian currency as I'm Nigerian but in my project I currently support users in Ghana and as such I'd love to have this support. I code in Javascript and have little to no knowledge of Typescript else, I'd love to contribute this

Getting NaN Error

image

i keep getting this error on Edge browser
But i dont get it on chrome

import { LocaleInterface } from './locale.interface'; > export declare class Locale implements LocaleInterface { | currency: { | name: string;

import { LocaleInterface } from './locale.interface';

export declare class Locale implements LocaleInterface {
| currency: {
| name: string;
import { LocaleInterface } from './locale.interface';
export declare class Locale implements LocaleInterface {
| currency: {
| name: string;

your library is awesome it solved my issue and lot of custom code but am getting this console message am using it part of the CRA create react app in my project

MMK does n't support Crore (number in words)

Hi @mastermunj mmk does not support crore pls replace crore with million

ex: public numberwordsMapping = [

                  {number:1000000, value: 'Million'},
                 {number: 100000,value:'Lakh'},
                 {number: 1000, value: 'Thousand'},
                {number:100,value:'hundred'},
                {number :10,value:'Ten'}

];

Add support for Spanish

It would be useful to have support for Spanish.

Currently we are using numero-palabra for this, but it would be good to have support as part of this package.

Currency Grammar

When currency flag is enabled and Math.floor(number) === 1. The plural currency is used instead of the singular form

1= 1 dollars
1.5 = 1 dollars and 5 cents

Myanmar Kyats(MMK) not supporting

I have tired MMK , but this to-words package is not supporting MMK, pls add this MMK currency also for this package

ex: when we giving amount as 887.00 in digit

 it should convert like : -  eight hundred eighty seven Kyats only

Currency Name/Symbol's position in words

It would be nice if you could add in 'converterOptions' an option to display currency name/symbol Infront of words instead of in-between. Plural can be ignored here.
eg: INR Three Million Only, USD One Hundred And Sixty Cents Only etc...

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.