Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

to-words

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-words - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [2.2.3](https://github.com/mastermunj/to-words/compare/v2.2.2...v2.2.3) (2020-09-25)
### [2.2.2](https://github.com/mastermunj/to-words/compare/v2.2.1...v2.2.2) (2020-09-22)

@@ -7,0 +9,0 @@

2

package.json
{
"name": "to-words",
"version": "2.2.2",
"version": "2.2.3",
"description": "Converts numbers (including decimal points) into words & currency.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -39,4 +39,13 @@ import { LocaleInterface } from './locales/locale.interface';

private getLocaleClass(): ConstructorOf<LocaleInterface> {
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require(`./locales/${this.options.localeCode}`).Locale;
/* eslint-disable @typescript-eslint/no-var-requires */
switch (this.options.localeCode) {
case 'en-IN':
return require('./locales/en-IN').Locale;
case 'en-MU':
return require('./locales/en-MU').Locale;
case 'en-US':
return require('./locales/en-US').Locale;
}
/* eslint-enable @typescript-eslint/no-var-requires */
throw new Error(`Unknown Locale "${this.options.localeCode}"`);
}

@@ -46,8 +55,4 @@

if (this.locale === undefined) {
try {
const LocaleClass = this.getLocaleClass();
this.locale = new LocaleClass();
} catch (e) {
throw new Error(`Unknown Locale "${this.options.localeCode}"`);
}
const LocaleClass = this.getLocaleClass();
this.locale = new LocaleClass();
}

@@ -54,0 +59,0 @@ return this.locale as LocaleInterface;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc