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

use-elapsed-time

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-elapsed-time - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "use-elapsed-time",
"version": "1.0.3",
"version": "1.0.4",
"description": "React hook to get the elapsed time in an animation using requestAnimationFrame",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -29,2 +29,3 @@ # useElapsedTime React hook

```
[Basic usage demo](https://codesandbox.io/s/epic-dream-hn62k)

@@ -63,2 +64,3 @@ ## Function signature

```
[Countdown timer demo](https://codesandbox.io/s/priceless-hill-2tbiq)

@@ -86,4 +88,5 @@ ### Count Up

```
[Count up demo](https://codesandbox.io/s/hungry-cray-hl6wn)
### None-liner path animation
### Non-liner path animation
```

@@ -105,4 +108,4 @@ import { useElapsedTime } from 'use-elapsed-time';

const elapsedTime = useElapsedTime(isPlaying, config);
const currentPoint = easing(elapsedTime, 0, pointsLength, durationMilliseconds) | 0;
const colorValue = easing(elapsedTime, 0, 255, durationMilliseconds) | 0;
const currentPoint = easing(elapsedTime, 0, pointsLength, durationMilliseconds);
const colorValue = easing(elapsedTime, 0, 255, durationMilliseconds);

@@ -126,2 +129,4 @@ const pointStyle = {

};
```
```
[Demo non-linear animation](https://codesandbox.io/s/inspiring-austin-d6ol6)
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