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.22 to 0.0.23

19

index.js

@@ -272,2 +272,8 @@ /**

ve = ev[i];
if (vs === undefined || vs === null) {
if (typeof ve === 'function' || (ve && ve.update)) {
s[i] = ve;
}
continue
}
rv[i] = typeof ve === 'string' && ve.indexOf('=') === 1 ? ve : null;

@@ -354,9 +360,12 @@ s[i] = ve.nodeType || ve.update ? ve.update : vs === ve ? null : isArray(ve) ? isArray(vs) && ve.length ===

for (var i in ev) {
if (sv[i] === undefined || sv[i] === null) {
continue;
}
s[i] = sv && sv[i];
var vs = s[i],
ve = ev[i],
propDesc = _getProp(sv, i);
ve = ev[i];
if (vs === undefined || vs === null) {
if (typeof ve === 'function' || (ve && ve.update)) {
s[i] = ve;
}
continue
}
var propDesc = _getProp(sv, i);
rv[i] = typeof ve === 'string' && ve.indexOf('=') === 1 ? ve : null;

@@ -363,0 +372,0 @@ if ((!!propDesc && propDesc.writable === false)) {

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

!function(n,e){"function"==typeof define&&define.amd?define([],e):"undefined"!=typeof module&&module.exports?module.exports=e():n.InterTween=e()}("undefined"!=typeof window?window:this,function(){function n(n){var e=parseFloat(n);return"number"!=typeof e||isNaN(e)?n:e}function e(n,e){var t,r,o;3===e.length&&(e=(t=e[0])+t+(r=e[1])+r+(o=e[2])+o);var f=parseInt(e,16);return t=f>>16&m,r=f>>8&m,o=f&m,"rgb("+t+","+r+","+o+")"}function t(n){return"string"==typeof n?n.replace(s,"").replace(h,","):n}function r(n,e){if("number"==typeof e)return e;var t=A[e.substr(0,2)],r=e.substr(2);if(1===t){var o=e[0]+r;return n+parseFloat(o)}return 2===t?n*+r:3===t?n/+r:4===t?n*(+r/100):e}function o(e){var t=T(e);return"string"==typeof t?t.match(y).map(n):e}function f(n,e,t,f){if(t=null!==t&&void 0!==t?t:1e4,!y.test(e))return e;var u=o(n),i=o(e),l=a(u,i,t,f);if(l)return l;l=null;for(var p=null,c=null,g=[],s=0,h=i.length;s<h;s++){var m=i[s],b=u[s];g[s]="string"==typeof m&&1===m.indexOf("=")?e:null,v.test(m)?(p=s+2,c=s+11):d.test(m)&&(p=s,c=s+9),i[s]=b===m?null:null!==g[s]?r(b,m):m}return function(n,e,o){o||(o=f),e=void 0!==e?e:n;var l="";for(s=0;s<h;s++){var a=u[s],d=i[s],v=g[s],y="function"==typeof o?o(n):n;l+="number"==typeof d?null!==p&&s>p&&s<c?a+(d-a)*y|0:((a+(d-a)*y)*t|0)/t:a,1===e&&null!==v&&(u[s]=d,i[s]=r(d,v))}return l}}function u(n,e,t,r){for(var o=[],u=0,i=n.length;u<i;u++){var a=n[u];o[u]=b(a)?l(a,e,t,r&&r[u]||r):"object"==typeof a?p(a,e,t,r&&r[u]||r):"string"==typeof a?f(a,e,t,r&&r[u]||r):a}return function(t,f,u){f=void 0!==f?f:t,u||(u=r);for(var i=0,l=o.length;i<l;i++){var a=a="function"==typeof u?u:u&&"function"==typeof u[i]?u[i]:null,p=a(t);n[i]="function"==typeof o[i]?o[i](a?t:p,f,u):"number"==typeof o[i]?o[i]+(e-o[i])*p:o[i]}return n}}function i(n,e,t,r){for(var o=[],f=0,u=e.length;f<u;f++){var i=e[f];o[f]=c(0===f?n:e[f-1],i,t,r&&r[f]||r)}var l=e[e.length-1];o.push(c(l,l,t,r[e.length-1]||r));var a=o.length-1;return function(n){var e=n*a,t=Math.max(0,Math.floor(e)),r=e-t,f=o[t];return"function"==typeof f?f(r):f}}function l(n,e,t,o){t=null!==t&&void 0!==t?t:1e4,w(e),w(n);for(var a=n.slice(),c=[],d=Math.min(n.length,e.length),v=0;v<d;v++){var y=a[v],g=e[v];c[v]="string"==typeof g&&1===g.indexOf("=")?g:null,a[v]=g.nodeType||g.update?g.update:y===g?null:b(g)?b(y)&&g.length===y.length?l(y,g,t,o&&o[v]||o):i(y,g,t,o&&o[v]||o):b(y)?u(y,g,t,o&&o[v]||o):"object"==typeof y?p(y,g,t,o&&o[v]||o):"string"==typeof y?f(y,g,t,o&&o[v]||o):void 0!==y?y:g,e[v]=null!==c[v]?r(y,g):g}return function(f,u,i){i||(i=o);for(var l=0;l<d;l++){var p=a[l],v=e[l],y=c[l];if(null!==p&&void 0!==p){var g=g="function"==typeof i?i:i&&"function"==typeof i[l]?i[l]:null,s=g?g(f):f;n[l]="number"==typeof p?((p+(v-p)*s)*t|0)/t:"function"==typeof p?p(g?f:s,u,g):p.update?p.update(g?f:s,u,g):v&&v.update?v.update(g?f:s,u,g):v,y&&1===u&&(a[l]=v,e[l]=r(a[l],y))}}return n}}function a(n,e,t,o){if(t=null!==t&&void 0!==t?t:1e4,2===e.length&&2===n.length&&-1!==M.indexOf(e[1])){var f=+n[0],u=+e[0],i=e[1],l="string"==typeof e[0]&&1===e[0].indexOf("=")?e[0]:null;return l&&(u=r(f,u)),f===u&&e[0]===i?e:function(n,e,a){a||(a=o);var p="function"==typeof a?a(n):n,c=((f+(u-f)*p)*t|0)/t+i;return l&&1===e&&(u=r(f=u,l)),c}}return!1}function p(n,e,t,o){t=null!==t&&void 0!==t?t:1e4;var a,c={},d={};w(e),w(n),w(o);for(var v in e)if(void 0!==n[v]&&null!==n[v]){d[v]=n&&n[v];var y=d[v],g=e[v],s=I(n,v);c[v]="string"==typeof g&&1===g.indexOf("=")?g:null,s&&!1===s.writable&&(a||(a={}),a[v]=!0),d[v]=g.nodeType?g:g.update?g:y===g?null:b(g)?b(y)&&g.length===y.length?l(y,g,t,o&&o[v]||o):i(y,g,t,o&&o[v]||o):b(y)?u(y,g,t,o&&o[v]||o):"object"==typeof y?p(y,g,t,o&&o[v]||o):"string"==typeof y?f(y,g,t,o&&o[v]||o):void 0!==y?y:g,e[v]=null!==c[v]?r(y,g):g}return function(f,u,i){i||(i=o),u=void 0!==u?u:f;for(var l in d){var p=d[l],v=e[l],y=c[l],g="function"==typeof i?i:i&&"function"==typeof i[l]?i[l]:null,s=g?g(f):f,h="number"==typeof p?((p+(v-p)*s)*t|0)/t:"function"==typeof p?p(g?f:s,u,g):p&&p.update?p.update(g?f:s,u,g):v&&v.update?v.update(g?f:s,u,g):v;a&&a[l]||(n[l]=h),y&&1===u&&(d[l]=v,e[l]=r(d[l],y))}return n}}function c(n,e,t,o){w(o),t=null!==t&&void 0!==t?t:1e4;var a="string"==typeof e&&"number"==typeof n&&1===e.indexOf("=")?e:null;return a&&(e=r(n,a)),e.nodeType?e:n.nodeType?n:b(e)?b(n)&&n.length===e.length?l(n,e,t,o):i(n,e,t,o):b(n)?u(n,e,t,o):"object"==typeof e?p(n,e,t,o):"string"==typeof e?f(n,e,t,o):"function"==typeof e?e:function(f,u,i){u=void 0!==u?u:f,i||(i=o);var l="function"==typeof i?i(f):f,p="number"==typeof e?((n+(e-n)*l)*t|0)/t:n;return a&&1===u&&(e=r(n+=e,a)),p}}var d=/rgb/g,v=/argb/g,y=/\s+|([A-Za-z?().,{}:""[\]#\%]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,g=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,s=/\n|\r|\t/g,h=/, | ,| , /g,m=255,b=Array.isArray||function(n){return n instanceof Array},x=/([.\[])/g,O=/\]/g,j=function(n,e){var t=n[e],r=e.replace(O,"").split(x),o=r.length-1,f=Array.isArray(n),u="object"==typeof n&&!f;return u?(n[e]=null,delete n[e]):f&&n.splice(e,1),r.reduce(function(n,e,i){f&&"."!==e&&"["!==e&&(e*=1);var l="["===r[i+1];if("."===e||"["===e)return"."===e?(u=!0,f=!1):"["===e&&(u=!1,f=!0),n;if(void 0===n[e]){if(f||u)return n[e]=i===o?t:f||l?[]:u?{}:null,u=f=!1,n[e]}else if(void 0!==n[e])return i===o&&(n[e]=t),n[e];return n},n)},w=function(n){if("object"==typeof n&&n)for(var e in n)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))j(n,e);else if("object"==typeof n[e]&&n[e]){var t=n[e];for(var r in t)if(-1!==r.indexOf(".")||-1!==r.indexOf("["))j(t,r);else if("object"==typeof t[r]&&t[r]){var o=t[r];for(var f in o)-1===f.indexOf(".")&&-1===f.indexOf("[")||j(o,f)}}return n},A={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},T=function(n){return"string"!=typeof n?n:t(n).replace(g,e)},M=["px","pt","pc","deg","rad","turn","em","ex","cm","mm","dm","inch","in","rem","vw","vh","vmin","vmax","%"],F=Object.getOwnPropertyDescriptor,I=F||function(){};return c});
!function(n,e){"function"==typeof define&&define.amd?define([],e):"undefined"!=typeof module&&module.exports?module.exports=e():n.InterTween=e()}("undefined"!=typeof window?window:this,function(){function n(n){var e=parseFloat(n);return"number"!=typeof e||isNaN(e)?n:e}function e(n,e){var t,r,o;3===e.length&&(e=(t=e[0])+t+(r=e[1])+r+(o=e[2])+o);var f=parseInt(e,16);return t=f>>16&m,r=f>>8&m,o=f&m,"rgb("+t+","+r+","+o+")"}function t(n){return"string"==typeof n?n.replace(s,"").replace(h,","):n}function r(n,e){if("number"==typeof e)return e;var t=A[e.substr(0,2)],r=e.substr(2);if(1===t){var o=e[0]+r;return n+parseFloat(o)}return 2===t?n*+r:3===t?n/+r:4===t?n*(+r/100):e}function o(e){var t=T(e);return"string"==typeof t?t.match(y).map(n):e}function f(n,e,t,f){if(t=null!==t&&void 0!==t?t:1e4,!y.test(e))return e;var u=o(n),i=o(e),l=a(u,i,t,f);if(l)return l;l=null;for(var p=null,d=null,g=[],s=0,h=i.length;s<h;s++){var m=i[s],b=u[s];g[s]="string"==typeof m&&1===m.indexOf("=")?e:null,v.test(m)?(p=s+2,d=s+11):c.test(m)&&(p=s,d=s+9),i[s]=b===m?null:null!==g[s]?r(b,m):m}return function(n,e,o){o||(o=f),e=void 0!==e?e:n;var l="";for(s=0;s<h;s++){var a=u[s],c=i[s],v=g[s],y="function"==typeof o?o(n):n;l+="number"==typeof c?null!==p&&s>p&&s<d?a+(c-a)*y|0:((a+(c-a)*y)*t|0)/t:a,1===e&&null!==v&&(u[s]=c,i[s]=r(c,v))}return l}}function u(n,e,t,r){for(var o=[],u=0,i=n.length;u<i;u++){var a=n[u];o[u]=b(a)?l(a,e,t,r&&r[u]||r):"object"==typeof a?p(a,e,t,r&&r[u]||r):"string"==typeof a?f(a,e,t,r&&r[u]||r):a}return function(t,f,u){f=void 0!==f?f:t,u||(u=r);for(var i=0,l=o.length;i<l;i++){var a=a="function"==typeof u?u:u&&"function"==typeof u[i]?u[i]:null,p=a(t);n[i]="function"==typeof o[i]?o[i](a?t:p,f,u):"number"==typeof o[i]?o[i]+(e-o[i])*p:o[i]}return n}}function i(n,e,t,r){for(var o=[],f=0,u=e.length;f<u;f++){var i=e[f];o[f]=d(0===f?n:e[f-1],i,t,r&&r[f]||r)}var l=e[e.length-1];o.push(d(l,l,t,r[e.length-1]||r));var a=o.length-1;return function(n){var e=n*a,t=Math.max(0,Math.floor(e)),r=e-t,f=o[t];return"function"==typeof f?f(r):f}}function l(n,e,t,o){t=null!==t&&void 0!==t?t:1e4,w(e),w(n);for(var a=n.slice(),d=[],c=Math.min(n.length,e.length),v=0;v<c;v++){var y=a[v],g=e[v];void 0!==y&&null!==y?(d[v]="string"==typeof g&&1===g.indexOf("=")?g:null,a[v]=g.nodeType||g.update?g.update:y===g?null:b(g)?b(y)&&g.length===y.length?l(y,g,t,o&&o[v]||o):i(y,g,t,o&&o[v]||o):b(y)?u(y,g,t,o&&o[v]||o):"object"==typeof y?p(y,g,t,o&&o[v]||o):"string"==typeof y?f(y,g,t,o&&o[v]||o):void 0!==y?y:g,e[v]=null!==d[v]?r(y,g):g):("function"==typeof g||g&&g.update)&&(a[v]=g)}return function(f,u,i){i||(i=o);for(var l=0;l<c;l++){var p=a[l],v=e[l],y=d[l];if(null!==p&&void 0!==p){var g=g="function"==typeof i?i:i&&"function"==typeof i[l]?i[l]:null,s=g?g(f):f;n[l]="number"==typeof p?((p+(v-p)*s)*t|0)/t:"function"==typeof p?p(g?f:s,u,g):p.update?p.update(g?f:s,u,g):v&&v.update?v.update(g?f:s,u,g):v,y&&1===u&&(a[l]=v,e[l]=r(a[l],y))}}return n}}function a(n,e,t,o){if(t=null!==t&&void 0!==t?t:1e4,2===e.length&&2===n.length&&-1!==M.indexOf(e[1])){var f=+n[0],u=+e[0],i=e[1],l="string"==typeof e[0]&&1===e[0].indexOf("=")?e[0]:null;return l&&(u=r(f,u)),f===u&&e[0]===i?e:function(n,e,a){a||(a=o);var p="function"==typeof a?a(n):n,d=((f+(u-f)*p)*t|0)/t+i;return l&&1===e&&(u=r(f=u,l)),d}}return!1}function p(n,e,t,o){t=null!==t&&void 0!==t?t:1e4;var a,d={},c={};w(e),w(n),w(o);for(var v in e){c[v]=n&&n[v];var y=c[v],g=e[v];if(void 0!==y&&null!==y){var s=I(n,v);d[v]="string"==typeof g&&1===g.indexOf("=")?g:null,s&&!1===s.writable&&(a||(a={}),a[v]=!0),c[v]=g.nodeType?g:g.update?g:y===g?null:b(g)?b(y)&&g.length===y.length?l(y,g,t,o&&o[v]||o):i(y,g,t,o&&o[v]||o):b(y)?u(y,g,t,o&&o[v]||o):"object"==typeof y?p(y,g,t,o&&o[v]||o):"string"==typeof y?f(y,g,t,o&&o[v]||o):void 0!==y?y:g,e[v]=null!==d[v]?r(y,g):g}else("function"==typeof g||g&&g.update)&&(c[v]=g)}return function(f,u,i){i||(i=o),u=void 0!==u?u:f;for(var l in c){var p=c[l],v=e[l],y=d[l],g="function"==typeof i?i:i&&"function"==typeof i[l]?i[l]:null,s=g?g(f):f,h="number"==typeof p?((p+(v-p)*s)*t|0)/t:"function"==typeof p?p(g?f:s,u,g):p&&p.update?p.update(g?f:s,u,g):v&&v.update?v.update(g?f:s,u,g):v;a&&a[l]||(n[l]=h),y&&1===u&&(c[l]=v,e[l]=r(c[l],y))}return n}}function d(n,e,t,o){w(o),t=null!==t&&void 0!==t?t:1e4;var a="string"==typeof e&&"number"==typeof n&&1===e.indexOf("=")?e:null;return a&&(e=r(n,a)),e.nodeType?e:n.nodeType?n:b(e)?b(n)&&n.length===e.length?l(n,e,t,o):i(n,e,t,o):b(n)?u(n,e,t,o):"object"==typeof e?p(n,e,t,o):"string"==typeof e?f(n,e,t,o):"function"==typeof e?e:function(f,u,i){u=void 0!==u?u:f,i||(i=o);var l="function"==typeof i?i(f):f,p="number"==typeof e?((n+(e-n)*l)*t|0)/t:n;return a&&1===u&&(e=r(n+=e,a)),p}}var c=/rgb/g,v=/argb/g,y=/\s+|([A-Za-z?().,{}:""[\]#\%]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,g=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,s=/\n|\r|\t/g,h=/, | ,| , /g,m=255,b=Array.isArray||function(n){return n instanceof Array},x=/([.\[])/g,O=/\]/g,j=function(n,e){var t=n[e],r=e.replace(O,"").split(x),o=r.length-1,f=Array.isArray(n),u="object"==typeof n&&!f;return u?(n[e]=null,delete n[e]):f&&n.splice(e,1),r.reduce(function(n,e,i){f&&"."!==e&&"["!==e&&(e*=1);var l="["===r[i+1];if("."===e||"["===e)return"."===e?(u=!0,f=!1):"["===e&&(u=!1,f=!0),n;if(void 0===n[e]){if(f||u)return n[e]=i===o?t:f||l?[]:u?{}:null,u=f=!1,n[e]}else if(void 0!==n[e])return i===o&&(n[e]=t),n[e];return n},n)},w=function(n){if("object"==typeof n&&n)for(var e in n)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))j(n,e);else if("object"==typeof n[e]&&n[e]){var t=n[e];for(var r in t)if(-1!==r.indexOf(".")||-1!==r.indexOf("["))j(t,r);else if("object"==typeof t[r]&&t[r]){var o=t[r];for(var f in o)-1===f.indexOf(".")&&-1===f.indexOf("[")||j(o,f)}}return n},A={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},T=function(n){return"string"!=typeof n?n:t(n).replace(g,e)},M=["px","pt","pc","deg","rad","turn","em","ex","cm","mm","dm","inch","in","rem","vw","vh","vmin","vmax","%"],F=Object.getOwnPropertyDescriptor,I=F||function(){};return d});
{
"name": "intertween",
"version": "0.0.22",
"version": "0.0.23",
"description": "The lightweight, fastest, smartest, effecient value interpolator with no-dependecy, zero-configuration and relative interpolation",

@@ -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