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

typographic-currency

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typographic-currency - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

4

index.es5.js

@@ -20,6 +20,6 @@ 'use strict';

// use global and ignore letter case
var pattern = new RegExp(key, 'gi');
var pattern = new RegExp('([^a-z]|\\b)(' + key + ')\\b', 'gi');
var textInput = text ? text : input;
text = textInput.replace(pattern, currentKey);
text = textInput.replace(pattern, '$1' + currentKey);
}

@@ -26,0 +26,0 @@

@@ -10,9 +10,9 @@ import currencyDB from 'typographic-currency-db';

// use global and ignore letter case
const pattern = new RegExp(key, 'gi');
const pattern = new RegExp(`([^a-z]|\\b)(${key})\\b`, 'gi');
let textInput = (text) ? text : input;
text = textInput.replace(pattern, currentKey);
text = textInput.replace(pattern, `$1${currentKey}`);
}
return text;
};
};
{
"name": "typographic-currency",
"version": "0.1.6",
"version": "0.1.7",
"description": "Use the correct symbol of currency",

@@ -24,3 +24,4 @@ "main": "index.es5.js",

"typography",
"currency"
"currency",
"textr"
],

@@ -27,0 +28,0 @@ "author": "talgautb <gtalk.kz@gmail.com> (http://gtalk.kz)",

@@ -7,2 +7,3 @@ import { equal } from 'assert';

equal(typographicCurrency('My Tesla costs about 80usd'), 'My Tesla costs about 80$');
equal(typographicCurrency('Natural rubber'), 'Natural rubber');
});
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