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

@jam3/gsap-promise

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jam3/gsap-promise - npm Package Compare versions

Comparing version 3.1.1 to 4.0.0

26

base.js

@@ -10,4 +10,4 @@ var TweenMax = require('gsap')

resolve = once(resolve)
wrapCompletion(opts, resolve)
wrapTween(func(element, duration, opts), resolve)
wrapCompletion(opts, resolve, opts)
wrapTween(func(element, duration, opts), resolve, opts)
})

@@ -26,4 +26,4 @@ }

resolve = once(resolve)
wrapCompletion(opts, resolve)
wrapTween(TweenMax.set(element, opts), resolve)
wrapCompletion(opts, resolve, opts)
wrapTween(TweenMax.set(element, opts), resolve, opts)
})

@@ -36,4 +36,4 @@ }

resolve = once(resolve)
wrapCompletion(to, resolve)
wrapTween(TweenMax.fromTo(element, duration, from, to), resolve)
wrapCompletion(to, resolve, from)
wrapTween(TweenMax.fromTo(element, duration, from, to), resolve, from)
})

@@ -47,3 +47,3 @@ }

resolve = once(resolve)
wrapTween(tweenFunc(element, duration, from, stagger, resolve), resolve)
wrapTween(tweenFunc(element, duration, from, stagger, resolve), resolve, from)
})

@@ -56,3 +56,3 @@ }

resolve = once(resolve)
wrapTween(TweenMax.staggerFromTo(element, duration, from, to, stagger, resolve), resolve)
wrapTween(TweenMax.staggerFromTo(element, duration, from, to, stagger, resolve), resolve, from)
})

@@ -77,9 +77,13 @@ }

function wrapCompletion (p, done) {
// handle both completion events
function wrapCompletion (p, done, opts = {}) {
p.onComplete = done
if (!opts || !opts.callThenOnKill) return;
delete opts.callThenOnKill
p.onOverwrite = done
}
function wrapTween (tween, resolve) {
function wrapTween (tween, resolve, opts = {}) {
if (!opts || !opts.callThenOnKill) return;
delete opts.callThenOnKill
// GSAP won't call onComplete or onOverwrite with { override: 'all' }

@@ -86,0 +90,0 @@ if (typeof tween._kill === 'function' && !tween._isGSAPPromiseWrapped) {

{
"name": "@jam3/gsap-promise",
"version": "3.1.1",
"version": "4.0.0",
"description": "a Promise wrapper around gsap / twenelite",

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

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