New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cheprasov/web-animation

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cheprasov/web-animation - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

dist/web-animation.js

@@ -1,1 +0,1 @@

!function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(t,n,e){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,n){if(1&n&&(t=i(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(i.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)i.d(e,o,function(n){return t[n]}.bind(null,o));return e},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=0)}([function(t,n,i){"use strict";function e(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function o(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}i.r(n),i.d(n,"default",function(){return r});var r=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,"_duration",void 0),o(this,"_startTime",0),o(this,"_isStopped",!0),o(this,"_easing",void 0),o(this,"_rAF",void 0),o(this,"_onStop",void 0),o(this,"_onStep",void 0),o(this,"_onFinish",void 0),this._duration=n&&n.duration||1e3,this._rAF=n&&n.rAF||window.requestAnimationFrame.bind(window),this._easing=n&&n.easing||function(t){return t},this._onStep=n&&n.onStep||null,this._onStop=n&&n.onStop||null,this._onFinish=n&&n.onFinish||null,this._onTick=this._onTick.bind(this)}var n,i,r;return n=t,(i=[{key:"setOnStop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._onStop=t}},{key:"setOnStep",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._onStep=t}},{key:"setOnFinish",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._onFinish=t}},{key:"stop",value:function(){if(!this._isStopped&&(this._isStopped=!0,this._onStop)){var t=this.getProgress();this._onStop(t,this)}}},{key:"run",value:function(){this._isStopped=!1,this._startTime=Date.now(),this._rAF(this._onTick)}},{key:"getProgress",value:function(){var t=Date.now()-this._startTime,n=t>=this._duration,i=Math.min(1,t/this._duration);return{elapsedTime:t,ratio:i,tween:this._easing(i),isFinished:n}}},{key:"_onTick",value:function(){if(!this._isStopped){var t=this.getProgress();if(this._onStep&&this._onStep(t,this),t.isFinished)return this._isStopped=!0,void(this._onFinish&&this._onFinish(t,this));this._rAF(this._onTick)}}}])&&e(n.prototype,i),r&&e(n,r),t}()}]);
module.exports=function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=n,i.d=function(t,n,e){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,n){if(1&n&&(t=i(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(i.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)i.d(e,o,function(n){return t[n]}.bind(null,o));return e},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=0)}([function(t,n,i){"use strict";function e(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function o(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}i.r(n),i.d(n,"default",function(){return r});var r=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,"_duration",void 0),o(this,"_startTime",0),o(this,"_isStopped",!0),o(this,"_easing",void 0),o(this,"_rAF",void 0),o(this,"_onStop",void 0),o(this,"_onStep",void 0),o(this,"_onFinish",void 0),this._duration=n&&n.duration||1e3,this._rAF=n&&n.rAF||window.requestAnimationFrame.bind(window),this._easing=n&&n.easing||function(t){return t},this._onStep=n&&n.onStep||null,this._onStop=n&&n.onStop||null,this._onFinish=n&&n.onFinish||null,this._onTick=this._onTick.bind(this)}var n,i,r;return n=t,(i=[{key:"setOnStop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._onStop=t}},{key:"setOnStep",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._onStep=t}},{key:"setOnFinish",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._onFinish=t}},{key:"stop",value:function(){if(!this._isStopped&&(this._isStopped=!0,this._onStop)){var t=this.getProgress();this._onStop(t,this)}}},{key:"run",value:function(){this._isStopped=!1,this._startTime=Date.now(),this._rAF(this._onTick)}},{key:"getProgress",value:function(){var t=Date.now()-this._startTime,n=t>=this._duration,i=Math.min(1,t/this._duration);return{elapsedTime:t,ratio:i,tween:this._easing(i),isFinished:n}}},{key:"_onTick",value:function(){if(!this._isStopped){var t=this.getProgress();if(this._onStep&&this._onStep(t,this),t.isFinished)return this._isStopped=!0,void(this._onFinish&&this._onFinish(t,this));this._rAF(this._onTick)}}}])&&e(n.prototype,i),r&&e(n,r),t}()}]);
{
"name": "@cheprasov/web-animation",
"version": "0.1.1",
"version": "0.1.2",
"author": "Alexander Cheprasov",

@@ -5,0 +5,0 @@ "description": "A Class for driving animated content on the web is based on requestAnimationFrame for performance.",

@@ -10,2 +10,3 @@ const path = require('path');

filename: '[name]',
libraryTarget: 'commonjs2',
},

@@ -12,0 +13,0 @@ resolve: {

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