New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-countup

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-countup - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0

.babelrc

61

package.json
{
"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
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