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

intertween

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intertween - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

6

index.js

@@ -182,3 +182,3 @@ /**

rv[i] = typeof ve === 'string' && ve.indexOf('=') === 1 ? ve : null;
s[i] = vs.nodeType ? vs : vs === ve ? null : isArray(ve) ?
s[i] = ve.nodeType ? ve : ve.update ? ve : vs === ve ? null : isArray(ve) ?
isArray(vs) && ve.length === vs.length ? arrayTween(vs, ve, d) : parseInterpolatables(vs, ve) : isArray(vs) ? tweenThemTo(vs, ve) : typeof ve === 'object' ?

@@ -192,3 +192,3 @@ objectTween(vs, ve, d) : typeof ve === 'string' ?

return function (t) {
for (var i = 0; i < a && a.update ? a.update(t) : b && b.update ? b.update(t) : b; i++) {
for (var i = 0; i < minLength; i++) {
var a = s[i],

@@ -245,3 +245,3 @@ b = ev[i],

rv[i] = typeof ve === 'string' && ve.indexOf('=') === 1 ? ve : null;
s[i] = vs.nodeType ? vs : vs === ve ? null : isArray(ve) ?
s[i] = ve.nodeType ? ve : ve.update ? ve : vs === ve ? null : isArray(ve) ?
isArray(vs) && ve.length === vs.length ? arrayTween(vs, ve, d) : parseInterpolatables(vs, ve) : isArray(vs) ? tweenThemTo(vs, ve) : typeof ve === 'object' ?

@@ -248,0 +248,0 @@ objectTween(vs, ve, d) : typeof ve === 'string' ?

/*! InterTween - https://www.npmjs.com/package/intertween */
var u="undefined"!==typeof window?window:this;
function C(){function z(b){return"string"!==typeof b?b:("string"===typeof b?b.replace(D,""):b).replace(E,F)}function A(b){var a=parseFloat(b);return"number"!==typeof a||isNaN(a)?b:a}function F(b,a){if(3===a.length){var c=a[0];var d=a[1];var h=a[2];a=c+c+d+d+h+h}c=parseInt(a,16);return"rgb("+(c>>16&255)+","+(c>>8&255)+","+(c&255)+")"}function n(b,a){if("number"!==typeof a){var c=G[a.substr(0,2)],d=a.substr(2);if(1===c)return b+parseFloat(a[0]+d);if(2===c)return b*+d;if(3===c)return b/+d;if(4===c)return+d/100*b}return a}function q(b,a,c){c=void 0!==c?c:1E4;if(!v.test(a))return a;var d=z(b).match(v).map(A),h=z(a).match(v).map(A);if(b=H(d,h,c))return b;var e=b=null,k=null,g=[];b=0;for(var f=h.length;b<f;b++){var m=h[b],p=d[b];g[b]="string"===typeof m&&1===m.indexOf("=")?a:null;I.test(m)?(e=b+2,k=b+11):J.test(m)&&(e=b,k=b+9);h[b]=p===m?null:null!==g[b]?n(p,m):"number"===typeof m?m-p:m}return function(a){for(var b="",f=0,m=h.length;f<m;f++){var p=d[f],l=h[f],B=g[f];b+="number"===typeof l?null!==e&&f>e&&f<k?p+l*a|0:((p+l*a)*c|0)/c:p;1===a&&null!==B&&(d[f]+=l,h[f]=n(d[f],B))}return b}}function w(b,a){for(var c=[],d=0,h=b.length;d<h;d++){var e=b[d];c[d]=l(e)?r(e,a):"object"===typeof e?t(e,a):"string"===typeof e?q(e,a):e}return function(a){for(var d=0,f=c.length;d<f;d++)b[d]=c[d](a);return b}}function x(b,a){for(var c=[],d=0,h=a.length;d<h;d++)c[d]=y(0===d?b:a[d-1],a[d]);d=a[a.length-1];c.push(y(d,d));var e=c.length-1;return function(a){a*=e;var b=Math.floor(a);return(0,c[b])(a-b)}}function r(b,a,c){c=void 0!==c?c:1E4;for(var d=b.slice(),h=[],e=0,k=a.length;e<k;e++){var g=d[e],f=a[e];h[e]="string"===typeof f&&1===f.indexOf("=")?f:null;d[e]=g===f?null:l(f)?l(g)&&f.length===g.length?r(g,f,c):x(g,f):l(g)?w(g,f):"object"===typeof f?t(g,f,c):"string"===typeof f?q(g,f,c):g;a[e]=null!==h[e]?n(g,f):f}return function(f){for(var e=0,g=a.length;e<g;e++){var k=d[e],m=a[e],l=h[e];null!==k&&(b[e]="number"===typeof k?((k+(m-k)*f)*c|0)/c:"function"===typeof k?k(f):k.update?k.update(f):m,l&&1===f&&(d[e]=m,a[e]=n(d[e],l)))}return b}}function H(b,a,c){c=void 0!==c?c:1E4;if(2===a.length&&2===b.length&&-1!==K.indexOf(a[1])){var d=+b[0],h=+a[0],e=a[1],k="string"===typeof a[0]&&1===a[0].indexOf("=")?a[0]:null;k&&(h=n(d,h));return function(a){var b=((d+(h-d)*a)*c|0)/c+e;k&&1===a&&(d=h,h=n(d,k));return b}}return!1}function t(b,a,c){c=void 0!==c?c:1E4;var d={},h={},e;for(e in a){h[e]=b[e];var k=h[e],g=a[e];d[e]="string"===typeof g&&1===g.indexOf("=")?g:null;h[e]=k===g?null:l(g)?l(k)&&g.length===k.length?r(k,g,c):x(k,g):l(k)?w(k,g):"object"===typeof g?t(k,g,c):"string"===typeof g?q(k,g,c):k;a[e]=null!==d[e]?n(k,g):g}return function(e){for(var f in a){var g=h[f],k=a[f],l=d[f];null!==g&&(b[f]="number"===typeof g?((g+(k-g)*e)*c|0)/c:"function"===typeof g?g(e):g.update?g.update(e):k,l&&1===e&&(h[f]=k,a[f]=n(h[f],l)))}return b}}function y(b,a,c){c=void 0!==c?c:1E4;var d="string"===typeof a&&"number"===typeof b&&1===a.indexOf("=")?a:null;d&&(a=n(b,d));return l(a)?l(b)&&b.length===a.length?r(b,a,c):x(b,a):l(b)?w(b,a):"object"===typeof a?t(b,a,c):"string"===typeof a?q(b,a,c):"function"===typeof a?a:function(h){var e="number"===typeof a?((b+(a-b)*h)*c|0)/c:b;d&&1===h&&(b+=a,a=n(b,d));return e}}var J=/rgb/g,I=/argb/g,v=/\s+|([A-Za-z?().,{}:""[\]#]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,D=/\n|\r|\t/g,l=Array.isArray,G={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},K="px pt pc deg rad turn em ex cm mm dm inch in rem vw vh vmin vmax %".split(" ");return y}"function"===typeof define&&define.c?define([],C):"undefined"!==typeof module&&module.a?module.a=C():u.b=C();
var v="undefined"!==typeof window?window:this;function C(){function A(b){return"string"!==typeof b?b:("string"===typeof b?b.replace(D,""):b).replace(E,F)}function B(b){var a=parseFloat(b);return"number"!==typeof a||isNaN(a)?b:a}function F(b,a){if(3===a.length){var c=a[0];var d=a[1];var k=a[2];a=c+c+d+d+k+k}c=parseInt(a,16);return"rgb("+(c>>16&255)+","+(c>>8&255)+","+(c&255)+")"}function n(b,a){if("number"!==typeof a){var c=G[a.substr(0,2)],d=a.substr(2);if(1===c)return b+parseFloat(a[0]+d);if(2===c)return b*+d;if(3===c)return b/+d;if(4===c)return+d/100*b}return a}function q(b,a,c){c=void 0!==c?c:1E4;if(!w.test(a))return a;var d=A(b).match(w).map(B),k=A(a).match(w).map(B);if(b=H(d,k,c))return b;var e=b=null,h=null,f=[];b=0;for(var g=k.length;b<g;b++){var m=k[b],p=d[b];f[b]="string"===typeof m&&1===m.indexOf("=")?a:null;I.test(m)?(e=b+2,h=b+11):J.test(m)&&(e=b,h=b+9);k[b]=p===m?null:null!==f[b]?n(p,m):"number"===typeof m?m-p:m}return function(a){for(var b="",g=0,m=k.length;g<m;g++){var p=d[g],r=k[g],l=f[g];b+="number"===typeof r?null!==e&&g>e&&g<h?p+r*a|0:((p+r*a)*c|0)/c:p;1===a&&null!==l&&(d[g]+=r,k[g]=n(d[g],l))}return b}}function x(b,a){for(var c=[],d=0,k=b.length;d<k;d++){var e=b[d];c[d]=l(e)?t(e,a):"object"===typeof e?u(e,a):"string"===typeof e?q(e,a):e}return function(a){for(var d=0,g=c.length;d<g;d++)b[d]=c[d](a);return b}}function y(b,a){for(var c=[],d=0,k=a.length;d<k;d++)c[d]=z(0===d?b:a[d-1],a[d]);d=a[a.length-1];c.push(z(d,d));var e=c.length-1;return function(a){a*=e;var b=Math.floor(a);return(0,c[b])(a-b)}}function t(b,a,c){c=void 0!==c?c:1E4;for(var d=b.slice(),k=[],e=0,h=a.length;e<h;e++){var f=d&&d[e],g=a[e];k[e]="string"===typeof g&&1===g.indexOf("=")?g:null;d[e]=g.nodeType?g:g.update?g:f===g?null:l(g)?l(f)&&g.length===f.length?t(f,g,c):y(f,g):l(f)?x(f,g):"object"===typeof g?u(f,g,c):"string"===typeof g?q(f,g,c):f;a[e]=null!==k[e]?n(f,g):g}var m=Math.min(b.length,a.length);return function(g){for(var f=0;f<m;f++){var e=d[f],h=a[f],p=k[f];null!==e&&(b[f]="number"===typeof e?((e+(h-e)*g)*c|0)/c:"function"===typeof e?e(g):e&&e.update?e.update(g):h&&h.update?h.update(g):h,p&&1===g&&(d[f]=h,a[f]=n(d[f],p)))}return b}}function H(b,a,c){c=void 0!==c?c:1E4;if(2===a.length&&2===b.length&&-1!==K.indexOf(a[1])){var d=+b[0],k=+a[0],e=a[1],h="string"===typeof a[0]&&1===a[0].indexOf("=")?a[0]:null;h&&(k=n(d,k));return function(a){var b=((d+(k-d)*a)*c|0)/c+e;h&&1===a&&(d=k,k=n(d,h));return b}}return!1}function u(b,a,c){c=void 0!==c?c:1E4;var d={},k={},e;for(e in a){k[e]=b&&b[e];var h=k[e],f=a[e];d[e]="string"===typeof f&&1===f.indexOf("=")?f:null;k[e]=f.nodeType?f:f.update?f:h===f?null:l(f)?l(h)&&f.length===h.length?t(h,f,c):y(h,f):l(h)?x(h,f):"object"===typeof f?u(h,f,c):"string"===typeof f?q(h,f,c):h;a[e]=null!==d[e]?n(h,f):f}return function(e){for(var f in a){var g=k[f],h=a[f],l=d[f];null!==g&&(b[f]="number"===typeof g?((g+(h-g)*e)*c|0)/c:"function"===typeof g?g(e):g&&g.update?g.update(e):h&&h.update?h.update(e):h,l&&1===e&&(k[f]=h,a[f]=n(k[f],l)))}return b}}function z(b,a,c){c=void 0!==c?c:1E4;var d="string"===typeof a&&"number"===typeof b&&1===a.indexOf("=")?a:null;d&&(a=n(b,d));return a.nodeType?a:b.nodeType?b:l(a)?l(b)&&b.length===a.length?t(b,a,c):y(b,a):l(b)?x(b,a):"object"===typeof a?u(b,a,c):"string"===typeof a?q(b,a,c):"function"===typeof a?a:function(k){var e="number"===typeof a?((b+(a-b)*k)*c|0)/c:b;d&&1===k&&(b+=a,a=n(b,d));return e}}var J=/rgb/g,I=/argb/g,w=/\s+|([A-Za-z?().,{}:""[\]#]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,D=/\n|\r|\t/g,l=Array.isArray,G={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},K="px pt pc deg rad turn em ex cm mm dm inch in rem vw vh vmin vmax %".split(" ");return z}"function"===typeof define&&define.c?define([],C):"undefined"!==typeof module&&module.a?module.a=C():v.b=C();
{
"name": "intertween",
"version": "0.0.9",
"version": "0.0.10",
"description": "The lightweight, fastest, smartest, effecient value interpolator with no-dependecy, zero-configuration and relative interpolation",

@@ -13,12 +13,12 @@ "main": "index.js",

"interpolator",
"interpolation",
"value",
"relative",
"any",
"fast",
"memory",
"effecient",
"no catch",
"no-garbage",
"anywhere",
"interpolation",
"value",
"relative",
"any",
"fast",
"memory",
"effecient",
"no catch",
"no-garbage",
"anywhere",
"javascript",

@@ -25,0 +25,0 @@ "performance",

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