react-countup
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -35,3 +35,3 @@ 'use strict'; | ||
if (options.useGrouping && options.separator) { | ||
if (options.separator) { | ||
while (rgx.test(x1)) { | ||
@@ -62,4 +62,3 @@ x1 = x1.replace(rgx, '$1' + options.separator + '$2'); | ||
suffix = _component$props.suffix, | ||
useEasing = _component$props.useEasing, | ||
useGrouping = _component$props.useGrouping; | ||
useEasing = _component$props.useEasing; | ||
@@ -75,3 +74,3 @@ | ||
useEasing: useEasing, | ||
useGrouping: useGrouping | ||
useGrouping: !!separator | ||
}); | ||
@@ -130,3 +129,2 @@ | ||
decimals = _props.decimals, | ||
useGrouping = _props.useGrouping, | ||
separator = _props.separator, | ||
@@ -144,3 +142,2 @@ prefix = _props.prefix, | ||
decimals: decimals, | ||
useGrouping: useGrouping, | ||
separator: separator, | ||
@@ -168,3 +165,3 @@ prefix: prefix, | ||
prefix: '', | ||
separator: ',', | ||
separator: '', | ||
start: 0, | ||
@@ -174,5 +171,4 @@ suffix: '', | ||
style: undefined, | ||
useEasing: true, | ||
useGrouping: false | ||
useEasing: true | ||
}; | ||
exports.default = CountUp; | ||
exports.default = CountUp; |
{ | ||
"name": "react-countup", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "A React component wrapper around CountUp.js", | ||
@@ -30,3 +30,3 @@ "author": "Glenn Reyes <glenn@glennreyes.com> (https://twitter.com/glnnrys)", | ||
"scripts": { | ||
"build": "babel src/index.js -o build/index.js", | ||
"build": "babel src -d build --ignore __tests__", | ||
"flow": "flow check", | ||
@@ -37,3 +37,3 @@ "lint": "eslint src", | ||
"prettier": "prettier --write src/**/*.js", | ||
"test": "jest --coverage" | ||
"test": "jest" | ||
}, | ||
@@ -50,8 +50,8 @@ "peerDependencies": { | ||
"babel-plugin-transform-flow-strip-types": "6.22.0", | ||
"babel-preset-env": "^1.6.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-2": "6.24.1", | ||
"eslint": "^4.4.1", | ||
"eslint": "^4.10.0", | ||
"eslint-config-airbnb": "^15.1.0", | ||
"eslint-plugin-flowtype": "^2.35.0", | ||
"eslint-plugin-flowtype": "^2.39.1", | ||
"eslint-plugin-import": "^2.7.0", | ||
@@ -63,5 +63,5 @@ "eslint-plugin-jsx-a11y": "^5.0.3", | ||
"jest": "^20.0.4", | ||
"lint-staged": "^4.0.3", | ||
"prettier": "^1.5.3", | ||
"raf": "^3.3.2", | ||
"lint-staged": "^4.3.0", | ||
"prettier": "^1.7.4", | ||
"raf": "^3.4.0", | ||
"react": "^16.0.0", | ||
@@ -68,0 +68,0 @@ "react-dom": "^16.0.0", |
@@ -58,3 +58,2 @@ import React from 'react'; | ||
decimals: 2, | ||
useGrouping: true, | ||
separator: '.', | ||
@@ -71,3 +70,2 @@ prefix: 'a ', | ||
decimals: 2, | ||
useGrouping: true, | ||
separator: '', | ||
@@ -74,0 +72,0 @@ prefix: 'a ', |
@@ -24,3 +24,2 @@ // @flow | ||
useEasing: boolean, | ||
useGrouping: boolean, | ||
}; | ||
@@ -33,3 +32,2 @@ | ||
decimals: number, | ||
useGrouping: boolean, | ||
separator: string, | ||
@@ -50,3 +48,3 @@ prefix: string, | ||
if (options.useGrouping && options.separator) { | ||
if (options.separator) { | ||
while (rgx.test(x1)) { | ||
@@ -80,3 +78,2 @@ x1 = x1.replace(rgx, `$1${options.separator}$2`); | ||
useEasing, | ||
useGrouping, | ||
}: Props = component.props; | ||
@@ -98,3 +95,3 @@ | ||
useEasing, | ||
useGrouping, | ||
useGrouping: !!separator, | ||
}, | ||
@@ -122,3 +119,3 @@ ); | ||
prefix: '', | ||
separator: ',', | ||
separator: '', | ||
start: 0, | ||
@@ -129,3 +126,2 @@ suffix: '', | ||
useEasing: true, | ||
useGrouping: false, | ||
}; | ||
@@ -166,3 +162,2 @@ | ||
decimals, | ||
useGrouping, | ||
separator, | ||
@@ -179,3 +174,2 @@ prefix, | ||
decimals, | ||
useGrouping, | ||
separator, | ||
@@ -182,0 +176,0 @@ prefix, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
18682
7
356