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

react-currency-input-field

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-currency-input-field - npm Package Compare versions

Comparing version 3.7.0 to 3.7.1

3

dist/index.esm.js

@@ -192,2 +192,5 @@ import React, { forwardRef, useMemo, useState, useRef, useImperativeHandle, useEffect } from 'react';

: _value;
if (decimalSeparator && decimalSeparator !== '-' && value.startsWith(decimalSeparator)) {
value = '0' + value;
}
var defaultNumberFormatOptions = {

@@ -194,0 +197,0 @@ minimumFractionDigits: decimalScale || 0,

@@ -200,2 +200,5 @@ (function (global, factory) {

: _value;
if (decimalSeparator && decimalSeparator !== '-' && value.startsWith(decimalSeparator)) {
value = '0' + value;
}
var defaultNumberFormatOptions = {

@@ -202,0 +205,0 @@ minimumFractionDigits: decimalScale || 0,

2

package.json
{
"name": "react-currency-input-field",
"version": "3.7.0",
"version": "3.7.1",
"description": "React <input/> component for formatting currency and numbers.",

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

@@ -287,2 +287,2 @@ # React Currency Input Field Component

If you want to contribute to this repository, please refer to the [contributing doc](https://github.com/cchanxzy/react-currency-input-field/blob/main/docs/CONTRIBUTING.md)
If you want to contribute to this repository, please refer to the [contributing doc](https://github.com/cchanxzy/react-currency-input-field/blob/main/docs/CONTRIBUTING.md).

@@ -206,2 +206,14 @@ import { formatValue } from '../formatValue';

it('should prefix decimal values correctly with zero', () => {
expect(
formatValue({
decimalSeparator: '.',
groupSeparator: ',',
decimalScale: 2,
prefix: '$',
value: '.02',
})
).toEqual('$0.02');
});
describe('negative values', () => {

@@ -208,0 +220,0 @@ it('should handle negative values', () => {

@@ -82,3 +82,3 @@ import { IntlConfig } from '../CurrencyInputProps';

const value =
let value =
decimalSeparator !== '.'

@@ -88,2 +88,6 @@ ? replaceDecimalSeparator(_value, decimalSeparator, isNegative)

if (decimalSeparator && decimalSeparator !== '-' && value.startsWith(decimalSeparator)) {
value = '0' + value;
}
const defaultNumberFormatOptions = {

@@ -90,0 +94,0 @@ minimumFractionDigits: decimalScale || 0,

Sorry, the diff of this file is not supported yet

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