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

@vueuse/math

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/math - npm Package Compare versions

Comparing version 11.0.0-beta.2 to 11.0.0-beta.3

13

index.iife.js

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

var _VueDemiGlobal = typeof globalThis !== 'undefined'
? globalThis
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: this
var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {

@@ -116,5 +123,5 @@ if (VueDemi.install) {

})(
((globalThis || self).VueDemi = (globalThis || self).VueDemi || (typeof VueDemi !== 'undefined' ? VueDemi : {})),
(globalThis || self).Vue || (typeof Vue !== 'undefined' ? Vue : undefined),
(globalThis || self).VueCompositionAPI || (typeof VueCompositionAPI !== 'undefined' ? VueCompositionAPI : undefined)
(_VueDemiGlobal.VueDemi = _VueDemiGlobal.VueDemi || (typeof VueDemi !== 'undefined' ? VueDemi : {})),
_VueDemiGlobal.Vue || (typeof Vue !== 'undefined' ? Vue : undefined),
_VueDemiGlobal.VueCompositionAPI || (typeof VueCompositionAPI !== 'undefined' ? VueCompositionAPI : undefined)
);

@@ -121,0 +128,0 @@ ;

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

var VueDemi=function(n,t,u){if(n.install)return n;if(!t)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(t.version.slice(0,4)==="2.7."){let i=function(l,a){var f,M={},g={config:t.config,use:t.use.bind(t),mixin:t.mixin.bind(t),component:t.component.bind(t),provide:function(d,p){return M[d]=p,this},directive:function(d,p){return p?(t.directive(d,p),g):t.directive(d)},mount:function(d,p){return f||(f=new t(Object.assign({propsData:a},l,{provide:Object.assign(M,l.provide)})),f.$mount(d,p),f)},unmount:function(){f&&(f.$destroy(),f=void 0)}};return g};var b=i;for(var s in t)n[s]=t[s];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=t,n.Vue2=t,n.version=t.version,n.warn=t.util.warn,n.hasInjectionContext=function(){return!!n.getCurrentInstance()},n.createApp=i}else if(t.version.slice(0,2)==="2.")if(u){for(var s in u)n[s]=u[s];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=t,n.Vue2=t,n.version=t.version,n.hasInjectionContext=function(){return!!n.getCurrentInstance()}}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(t.version.slice(0,2)==="3."){for(var s in t)n[s]=t[s];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=t,n.Vue2=void 0,n.version=t.version,n.set=function(i,l,a){return Array.isArray(i)?(i.length=Math.max(i.length,l),i.splice(l,1,a),a):(i[l]=a,a)},n.del=function(i,l){if(Array.isArray(i)){i.splice(l,1);return}delete i[l]}}else console.error("[vue-demi] Vue version "+t.version+" is unsupported.");return n}((globalThis||self).VueDemi=(globalThis||self).VueDemi||(typeof VueDemi<"u"?VueDemi:{}),(globalThis||self).Vue||(typeof Vue<"u"?Vue:void 0),(globalThis||self).VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,t,u){"use strict";function s(o,r,e){return c=>t.computed(()=>e(u.toValue(c),u.toValue(o),u.toValue(r)))}function b(o,r,e){return(o-r[0])/(r[1]-r[0])*(e[1]-e[0])+e[0]}function i(o,r,e=b){return s(o,r,e)}function l(...o){return t.computed(()=>o.every(r=>u.toValue(r)))}function a(o){return t.computed(()=>!u.toValue(o))}function f(...o){return t.computed(()=>o.some(r=>u.toValue(r)))}function M(o){return t.computed(()=>Math.abs(u.toValue(o)))}function g(o){return o.flatMap(r=>{const e=u.toValue(r);return Array.isArray(e)?e.map(c=>u.toValue(c)):[e]})}function d(...o){return t.computed(()=>{const r=g(o);return r.reduce((e,c)=>e+=c,0)/r.length})}function p(o){return t.computed(()=>Math.ceil(u.toValue(o)))}function A(o,r,e){if(typeof o=="function"||t.isReadonly(o))return t.computed(()=>u.clamp(u.toValue(o),u.toValue(r),u.toValue(e)));const c=t.ref(o);return t.computed({get(){return c.value=u.clamp(c.value,u.toValue(r),u.toValue(e))},set(v){c.value=u.clamp(v,u.toValue(r),u.toValue(e))}})}function P(o){return t.computed(()=>Math.floor(u.toValue(o)))}function j(o,...r){return u.reactify(Math[o])(...r)}function C(...o){return t.computed(()=>{const r=g(o);return Math.max(...r)})}function I(...o){return t.computed(()=>{const r=g(o);return Math.min(...r)})}function T(o,r){const e=o.toString();if(o>0&&e.includes(".")){const v=10**e.split(".")[1].length;return o*v*r/v}else return o*r}function _(o,r,e){return t.computed(()=>{var c;const v=u.toValue(o),y=10**u.toValue(r);return Math[((c=u.toValue(e))==null?void 0:c.math)||"round"](T(v,y))/y})}function O(o,r,e,c){return i(r,e,c)(o)}function S(o){return t.computed(()=>Math.round(u.toValue(o)))}function w(...o){return t.computed(()=>g(o).reduce((r,e)=>r+=e,0))}function F(o){return t.computed(()=>Math.trunc(u.toValue(o)))}n.and=l,n.createGenericProjection=s,n.createProjection=i,n.logicAnd=l,n.logicNot=a,n.logicOr=f,n.not=a,n.or=f,n.useAbs=M,n.useAverage=d,n.useCeil=p,n.useClamp=A,n.useFloor=P,n.useMath=j,n.useMax=C,n.useMin=I,n.usePrecision=_,n.useProjection=O,n.useRound=S,n.useSum=w,n.useTrunc=F})(this.VueUse=this.VueUse||{},VueDemi,VueUse);
var _VueDemiGlobal=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this,VueDemi=function(n,t,u){if(n.install)return n;if(!t)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(t.version.slice(0,4)==="2.7."){let i=function(l,a){var f,y={},g={config:t.config,use:t.use.bind(t),mixin:t.mixin.bind(t),component:t.component.bind(t),provide:function(d,p){return y[d]=p,this},directive:function(d,p){return p?(t.directive(d,p),g):t.directive(d)},mount:function(d,p){return f||(f=new t(Object.assign({propsData:a},l,{provide:Object.assign(y,l.provide)})),f.$mount(d,p),f)},unmount:function(){f&&(f.$destroy(),f=void 0)}};return g};var M=i;for(var s in t)n[s]=t[s];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=t,n.Vue2=t,n.version=t.version,n.warn=t.util.warn,n.hasInjectionContext=function(){return!!n.getCurrentInstance()},n.createApp=i}else if(t.version.slice(0,2)==="2.")if(u){for(var s in u)n[s]=u[s];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=t,n.Vue2=t,n.version=t.version,n.hasInjectionContext=function(){return!!n.getCurrentInstance()}}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(t.version.slice(0,2)==="3."){for(var s in t)n[s]=t[s];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=t,n.Vue2=void 0,n.version=t.version,n.set=function(i,l,a){return Array.isArray(i)?(i.length=Math.max(i.length,l),i.splice(l,1,a),a):(i[l]=a,a)},n.del=function(i,l){if(Array.isArray(i)){i.splice(l,1);return}delete i[l]}}else console.error("[vue-demi] Vue version "+t.version+" is unsupported.");return n}(_VueDemiGlobal.VueDemi=_VueDemiGlobal.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),_VueDemiGlobal.Vue||(typeof Vue<"u"?Vue:void 0),_VueDemiGlobal.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,t,u){"use strict";function s(o,r,e){return c=>t.computed(()=>e(u.toValue(c),u.toValue(o),u.toValue(r)))}function M(o,r,e){return(o-r[0])/(r[1]-r[0])*(e[1]-e[0])+e[0]}function i(o,r,e=M){return s(o,r,e)}function l(...o){return t.computed(()=>o.every(r=>u.toValue(r)))}function a(o){return t.computed(()=>!u.toValue(o))}function f(...o){return t.computed(()=>o.some(r=>u.toValue(r)))}function y(o){return t.computed(()=>Math.abs(u.toValue(o)))}function g(o){return o.flatMap(r=>{const e=u.toValue(r);return Array.isArray(e)?e.map(c=>u.toValue(c)):[e]})}function d(...o){return t.computed(()=>{const r=g(o);return r.reduce((e,c)=>e+=c,0)/r.length})}function p(o){return t.computed(()=>Math.ceil(u.toValue(o)))}function A(o,r,e){if(typeof o=="function"||t.isReadonly(o))return t.computed(()=>u.clamp(u.toValue(o),u.toValue(r),u.toValue(e)));const c=t.ref(o);return t.computed({get(){return c.value=u.clamp(c.value,u.toValue(r),u.toValue(e))},set(v){c.value=u.clamp(v,u.toValue(r),u.toValue(e))}})}function P(o){return t.computed(()=>Math.floor(u.toValue(o)))}function j(o,...r){return u.reactify(Math[o])(...r)}function C(...o){return t.computed(()=>{const r=g(o);return Math.max(...r)})}function I(...o){return t.computed(()=>{const r=g(o);return Math.min(...r)})}function _(o,r){const e=o.toString();if(o>0&&e.includes(".")){const v=10**e.split(".")[1].length;return o*v*r/v}else return o*r}function O(o,r,e){return t.computed(()=>{var c;const v=u.toValue(o),b=10**u.toValue(r);return Math[((c=u.toValue(e))==null?void 0:c.math)||"round"](_(v,b))/b})}function S(o,r,e,c){return i(r,e,c)(o)}function T(o){return t.computed(()=>Math.round(u.toValue(o)))}function w(...o){return t.computed(()=>g(o).reduce((r,e)=>r+=e,0))}function F(o){return t.computed(()=>Math.trunc(u.toValue(o)))}n.and=l,n.createGenericProjection=s,n.createProjection=i,n.logicAnd=l,n.logicNot=a,n.logicOr=f,n.not=a,n.or=f,n.useAbs=y,n.useAverage=d,n.useCeil=p,n.useClamp=A,n.useFloor=P,n.useMath=j,n.useMax=C,n.useMin=I,n.usePrecision=O,n.useProjection=S,n.useRound=T,n.useSum=w,n.useTrunc=F})(this.VueUse=this.VueUse||{},VueDemi,VueUse);
{
"name": "@vueuse/math",
"version": "11.0.0-beta.2",
"version": "11.0.0-beta.3",
"description": "Math functions for VueUse",

@@ -37,5 +37,5 @@ "author": "Anthony Fu <https://github.com/antfu>",

"dependencies": {
"@vueuse/shared": "11.0.0-beta.2",
"vue-demi": ">=0.14.8"
"@vueuse/shared": "11.0.0-beta.3",
"vue-demi": ">=0.14.10"
}
}
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