Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
react-animated-number-2
Advanced tools
React component for animating numbers
react-animated-number is available via npm and can be used with browserify or webpack.
npm install --save react-animated-number
import AnimatedNumber from 'react-animated-number';
...
...
class Demo extends Component {
...
render () {
<AnimatedNumber component="text" value={bigValue}
style={{
transition: '0.8s ease-out',
fontSize: 48,
transitionProperty:
'background-color, color, opacity'
}}
frameStyle={perc => (
perc === 100 ? {} : {backgroundColor: '#ffeb3b'}
)}
duration={300}
formatValue={n => prettyBytes(n)}/>
}
}
required
Numeric value to which to tween to
default: 0
Initial numeric value for the tween start
default: "span"
This is similar to the react transition API. By default, renders text inside a <span>
. You can pass in any valid ReactElement
. Use "text"
for rendering into SVG.
A callback function that accepts a number and returns a formatted string
default: 300
Total duration of animation in milliseconds
A callback function that accepts the percentage of completion of current animation and returns the style object to applied to the current frame
The number of decimal places to render for intermediate values.
If set to 0
, rounds off the intermediate values using Math.round
A demo can be found here. Source code for the demo can be found here.
react-animated-number is licensed under MIT license.
FAQs
React component for animating numbers
We found that react-animated-number-2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.