react-countup
Advanced tools
Comparing version 0.0.0 to 1.0.0
{ | ||
"name": "react-countup", | ||
"version": "0.0.0", | ||
"version": "1.0.0", | ||
"description": "A React component wrapper around CountUp.js", | ||
"main": "index.js", | ||
"author": "Glenn Reyes", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/glennreyes/react-countup.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/glennreyes/react-countup/issues" | ||
}, | ||
"homepage": "https://github.com/glennreyes/react-countup#readme", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "jest" | ||
"prebuild": "npm t && npm run clean", | ||
"build": "NODE_ENV=production babel --out-dir=lib --ignore=test src", | ||
"coverage": "cat ./coverage/lcov/lcov.info | coveralls", | ||
"clean": "rimraf lib", | ||
"prepublish": "npm run build", | ||
"lint": "eslint .", | ||
"pretest": "npm run lint", | ||
"test": "cross-env NODE_ENV=test mocha --compilers js:babel-core/register", | ||
"test:watch": "npm t -- --watch" | ||
}, | ||
@@ -15,14 +33,33 @@ "keywords": [ | ||
"counter", | ||
"animated" | ||
"animation" | ||
], | ||
"author": "Glenn Reyes", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/glennreyes/react-countup.git" | ||
"peerDependencies": { | ||
"react": "^0.14.0 || ^15.0.0", | ||
"react-dom": "^0.14.0 || ^15.0.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/glennreyes/react-countup/issues" | ||
"dependencies": { | ||
"countup.js": "^1.7.1", | ||
"react": "^15.1.0", | ||
"react-dom": "^15.1.0" | ||
}, | ||
"homepage": "https://github.com/glennreyes/react-countup#readme" | ||
"devDependencies": { | ||
"babel-cli": "^6.9.0", | ||
"babel-core": "^6.9.0", | ||
"babel-polyfill": "^6.9.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"cross-env": "^1.0.8", | ||
"enzyme": "^2.3.0", | ||
"eslint": "^2.10.2", | ||
"eslint-config-airbnb": "^9.0.1", | ||
"eslint-plugin-import": "^1.8.0", | ||
"eslint-plugin-jsx-a11y": "^1.2.2", | ||
"eslint-plugin-react": "^5.1.1", | ||
"expect": "^1.20.1", | ||
"express": "^4.13.4", | ||
"mocha": "^2.5.3", | ||
"react-addons-test-utils": "^15.1.0", | ||
"rimraf": "^2.5.2" | ||
} | ||
} |
# React CountUp | ||
A React component wrapper around [CountUp.js](https://inorganik.github.io/countUp.js/) | ||
[![Build Status](https://travis-ci.org/glennreyes/react-countup.svg?branch=master)](https://travis-ci.org/glennreyes/react-countup) | ||
[![Coverage Status](https://coveralls.io/repos/github/glennreyes/react-countup/badge.svg?branch=master)](https://coveralls.io/github/glennreyes/react-countup?branch=master) | ||
[![Dependency Status](https://david-dm.org/glennreyes/react-countup/dev-status.svg)](https://david-dm.org/glennreyes/name-this-color#info=devDependencies) | ||
[![npm version](https://badge.fury.io/js/react-countup.svg)](https://badge.fury.io/js/react-countup) | ||
A React component wrapper around [CountUp.js](https://inorganik.github.io/countUp.js/). | ||
This component counts up a number in an animated way. | ||
## Installation | ||
Make sure you have a compatible version of `React 0.14.x` and `15.x.x` installed in your project. | ||
```bash | ||
npm install react-countup --save-dev | ||
``` | ||
## Usage | ||
#### Basic | ||
```js | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import CountUp from 'react-countup'; | ||
tbd | ||
render( | ||
<CountUp start={0} end={160526} />, | ||
document.getElementById('root') | ||
); | ||
``` | ||
#### Advanced | ||
```js | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import CountUp from 'react-countup'; | ||
const onComplete = () => { | ||
// Do something on completion | ||
}; | ||
render( | ||
<CountUp | ||
start={160527.0127} | ||
end={-875} | ||
duration={2.75} | ||
useEasing={true} | ||
separator=" " | ||
decimal="," | ||
prefix="EUR " | ||
suffix=" left" | ||
callback={onComplete} | ||
/>, | ||
document.getElementById('root') | ||
); | ||
``` | ||
### Attributes | ||
##### `start` *{number}* | ||
The start number from which the should start from | ||
##### `end` *{number}* | ||
Target number to count up | ||
##### `duration` *{number}* | ||
Duration of count up animation | ||
##### `useEasing` *{boolean}* | ||
use "easeOutExpo" if `true` | ||
##### `useGrouping` *{boolean}* | ||
group thousands by separator character | ||
##### `separator` *{string}* | ||
Specifies character of thousands separator | ||
##### `decimal` *{string}* | ||
Specifies decimal character | ||
##### `prefix` *{string}* | ||
Static text before the animating value | ||
##### `suffix` *{string}* | ||
Static text after the animating value | ||
##### `callback` *{function}* | ||
Callback function to be triggered after completed count up | ||
animation | ||
## License | ||
MIT |
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11672
19
190
0
92
5
18
+ Addedcountup.js@^1.7.1
+ Addedreact@^15.1.0
+ Addedreact-dom@^15.1.0
+ Addedasap@2.0.6(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedcountup.js@1.9.3(transitive)
+ Addedcreate-react-class@15.7.0(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addedfbjs@0.8.18(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@15.7.0(transitive)
+ Addedreact-dom@15.7.0(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedua-parser-js@0.7.40(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)