
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
Make every GSAP Tween a promise
Once loaded, every GSAP tween (TweenLite, TimelineLite, TweenMax, TimelineMax) will automatically be a promise. See the usage examples to see what this enables.
Since v3.0.0 it supports await!
npm install --save gsap-then
import 'gsap';
import 'gsap-then';
Or include the file dist/gsap-then.browser.js after loading GreenSock.
TweenLite.to('.title', 1, {opacity: 0}).then(function () {
console.log('Done animating title');
})
Promise.all([
TweenLite.to('.title', 1, {opacity: 0}),
loadImage('img.jpg') // http://npm.im/image-promise
]).then(function () {
console.log('Animation done and image loaded');
});
var tl = new TimelineLite();
tl.then(function () {
console.log('Timeline completed:', tl);
})
tl.to('.title', 1, {opacity: 0});
await TweenLite.to('.title', 1, {opacity: 0});
console.log('Done animating title');
.then() generates a new Promise.onCompleteonComplete callback, it will be replaced by the Promise, but it will still work.onComplete callback after calling .then() because this will override the Promise (i.e. it will never be resolved)gsap or simply TweenLite before gsap-then.window.Promise is available in Edge 12+ and all the other browsers.MIT © Federico Brigante
gsap-then is NOT affiliated with, endorsed, or sponsored by GreenSock, Inc.
FAQs
Make every GSAP Tween a promise. tl.then(doSomething)
We found that gsap-then 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.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.