Socket
Socket
Sign inDemoInstall

mud-from-to

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mud-from-to

Simple promise requestAnimationFrame helper


Version published
Maintainers
1
Install size
3.24 kB
Created

Readme

Source

Simple requestAnimationFrame helper

Install

npm install mud-from-to or yarn add mud-from-to

Usage example

import 'fromTo' from 'mud-from-to'

fromTo({
    start: 0, 
    end: 100,
    duration: 1000, // default
    easing(t, b, c, d) {
      if((t /= d / 2) < 1) return c / 2 * t * t + b
      return -c / 2 * ((--t) * (t - 2) - 1) + b
    } // default
}, (v) => console.log(v)).then((v) => {
    console.log('done', v)
})

FAQs

Last updated on 11 Sep 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc