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

@vueuse/math

Package Overview
Dependencies
Maintainers
0
Versions
70
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 12.2.0 to 12.3.0

38

index.iife.js

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

(function (exports, shared, vue) {
(function (exports, vue, shared) {
'use strict';

@@ -6,3 +6,3 @@

return (input) => {
return vue.computed(() => projector(shared.toValue(input), shared.toValue(fromDomain), shared.toValue(toDomain)));
return vue.computed(() => projector(vue.toValue(input), vue.toValue(fromDomain), vue.toValue(toDomain)));
};

@@ -19,15 +19,15 @@ }

function logicAnd(...args) {
return vue.computed(() => args.every((i) => shared.toValue(i)));
return vue.computed(() => args.every((i) => vue.toValue(i)));
}
function logicNot(v) {
return vue.computed(() => !shared.toValue(v));
return vue.computed(() => !vue.toValue(v));
}
function logicOr(...args) {
return vue.computed(() => args.some((i) => shared.toValue(i)));
return vue.computed(() => args.some((i) => vue.toValue(i)));
}
function useAbs(value) {
return vue.computed(() => Math.abs(shared.toValue(value)));
return vue.computed(() => Math.abs(vue.toValue(value)));
}

@@ -37,5 +37,5 @@

return args.flatMap((i) => {
const v = shared.toValue(i);
const v = vue.toValue(i);
if (Array.isArray(v))
return v.map((i2) => shared.toValue(i2));
return v.map((i2) => vue.toValue(i2));
return [v];

@@ -53,3 +53,3 @@ });

function useCeil(value) {
return vue.computed(() => Math.ceil(shared.toValue(value)));
return vue.computed(() => Math.ceil(vue.toValue(value)));
}

@@ -59,10 +59,10 @@

if (typeof value === "function" || vue.isReadonly(value))
return vue.computed(() => shared.clamp(shared.toValue(value), shared.toValue(min), shared.toValue(max)));
return vue.computed(() => shared.clamp(vue.toValue(value), vue.toValue(min), vue.toValue(max)));
const _value = vue.ref(value);
return vue.computed({
get() {
return _value.value = shared.clamp(_value.value, shared.toValue(min), shared.toValue(max));
return _value.value = shared.clamp(_value.value, vue.toValue(min), vue.toValue(max));
},
set(value2) {
_value.value = shared.clamp(value2, shared.toValue(min), shared.toValue(max));
_value.value = shared.clamp(value2, vue.toValue(min), vue.toValue(max));
}

@@ -73,3 +73,3 @@ });

function useFloor(value) {
return vue.computed(() => Math.floor(shared.toValue(value)));
return vue.computed(() => Math.floor(vue.toValue(value)));
}

@@ -108,6 +108,6 @@

var _a;
const _value = shared.toValue(value);
const _digits = shared.toValue(digits);
const _value = vue.toValue(value);
const _digits = vue.toValue(digits);
const power = 10 ** _digits;
return Math[((_a = shared.toValue(options)) == null ? void 0 : _a.math) || "round"](accurateMultiply(_value, power)) / power;
return Math[((_a = vue.toValue(options)) == null ? void 0 : _a.math) || "round"](accurateMultiply(_value, power)) / power;
});

@@ -121,3 +121,3 @@ }

function useRound(value) {
return vue.computed(() => Math.round(shared.toValue(value)));
return vue.computed(() => Math.round(vue.toValue(value)));
}

@@ -130,3 +130,3 @@

function useTrunc(value) {
return vue.computed(() => Math.trunc(shared.toValue(value)));
return vue.computed(() => Math.trunc(vue.toValue(value)));
}

@@ -156,2 +156,2 @@

})(this.VueUse = this.VueUse || {}, VueUse, Vue);
})(this.VueUse = this.VueUse || {}, Vue, VueUse);

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

(function(o,n,c){"use strict";function a(t,u,e){return i=>c.computed(()=>e(n.toValue(i),n.toValue(t),n.toValue(u)))}function s(t,u,e){return(t-u[0])/(u[1]-u[0])*(e[1]-e[0])+e[0]}function f(t,u,e=s){return a(t,u,e)}function V(...t){return c.computed(()=>t.every(u=>n.toValue(u)))}function m(t){return c.computed(()=>!n.toValue(t))}function M(...t){return c.computed(()=>t.some(u=>n.toValue(u)))}function P(t){return c.computed(()=>Math.abs(n.toValue(t)))}function l(t){return t.flatMap(u=>{const e=n.toValue(u);return Array.isArray(e)?e.map(i=>n.toValue(i)):[e]})}function y(...t){return c.computed(()=>{const u=l(t);return u.reduce((e,i)=>e+=i,0)/u.length})}function A(t){return c.computed(()=>Math.ceil(n.toValue(t)))}function d(t,u,e){if(typeof t=="function"||c.isReadonly(t))return c.computed(()=>n.clamp(n.toValue(t),n.toValue(u),n.toValue(e)));const i=c.ref(t);return c.computed({get(){return i.value=n.clamp(i.value,n.toValue(u),n.toValue(e))},set(r){i.value=n.clamp(r,n.toValue(u),n.toValue(e))}})}function j(t){return c.computed(()=>Math.floor(n.toValue(t)))}function p(t,...u){return n.reactify(Math[t])(...u)}function _(...t){return c.computed(()=>{const u=l(t);return Math.max(...u)})}function C(...t){return c.computed(()=>{const u=l(t);return Math.min(...u)})}function S(t,u){const e=t.toString();if(t>0&&e.includes(".")){const r=10**e.split(".")[1].length;return t*r*u/r}else return t*u}function b(t,u,e){return c.computed(()=>{var i;const r=n.toValue(t),g=10**n.toValue(u);return Math[((i=n.toValue(e))==null?void 0:i.math)||"round"](S(r,g))/g})}function F(t,u,e,i){return f(u,e,i)(t)}function N(t){return c.computed(()=>Math.round(n.toValue(t)))}function R(...t){return c.computed(()=>l(t).reduce((u,e)=>u+=e,0))}function U(t){return c.computed(()=>Math.trunc(n.toValue(t)))}o.and=V,o.createGenericProjection=a,o.createProjection=f,o.logicAnd=V,o.logicNot=m,o.logicOr=M,o.not=m,o.or=M,o.useAbs=P,o.useAverage=y,o.useCeil=A,o.useClamp=d,o.useFloor=j,o.useMath=p,o.useMax=_,o.useMin=C,o.usePrecision=b,o.useProjection=F,o.useRound=N,o.useSum=R,o.useTrunc=U})(this.VueUse=this.VueUse||{},VueUse,Vue);
(function(o,n,a){"use strict";function l(t,u,e){return c=>n.computed(()=>e(n.toValue(c),n.toValue(t),n.toValue(u)))}function M(t,u,e){return(t-u[0])/(u[1]-u[0])*(e[1]-e[0])+e[0]}function s(t,u,e=M){return l(t,u,e)}function d(...t){return n.computed(()=>t.every(u=>n.toValue(u)))}function f(t){return n.computed(()=>!n.toValue(t))}function V(...t){return n.computed(()=>t.some(u=>n.toValue(u)))}function g(t){return n.computed(()=>Math.abs(n.toValue(t)))}function i(t){return t.flatMap(u=>{const e=n.toValue(u);return Array.isArray(e)?e.map(c=>n.toValue(c)):[e]})}function h(...t){return n.computed(()=>{const u=i(t);return u.reduce((e,c)=>e+=c,0)/u.length})}function P(t){return n.computed(()=>Math.ceil(n.toValue(t)))}function y(t,u,e){if(typeof t=="function"||n.isReadonly(t))return n.computed(()=>a.clamp(n.toValue(t),n.toValue(u),n.toValue(e)));const c=n.ref(t);return n.computed({get(){return c.value=a.clamp(c.value,n.toValue(u),n.toValue(e))},set(r){c.value=a.clamp(r,n.toValue(u),n.toValue(e))}})}function A(t){return n.computed(()=>Math.floor(n.toValue(t)))}function j(t,...u){return a.reactify(Math[t])(...u)}function p(...t){return n.computed(()=>{const u=i(t);return Math.max(...u)})}function _(...t){return n.computed(()=>{const u=i(t);return Math.min(...u)})}function C(t,u){const e=t.toString();if(t>0&&e.includes(".")){const r=10**e.split(".")[1].length;return t*r*u/r}else return t*u}function S(t,u,e){return n.computed(()=>{var c;const r=n.toValue(t),m=10**n.toValue(u);return Math[((c=n.toValue(e))==null?void 0:c.math)||"round"](C(r,m))/m})}function b(t,u,e,c){return s(u,e,c)(t)}function F(t){return n.computed(()=>Math.round(n.toValue(t)))}function N(...t){return n.computed(()=>i(t).reduce((u,e)=>u+=e,0))}function R(t){return n.computed(()=>Math.trunc(n.toValue(t)))}o.and=d,o.createGenericProjection=l,o.createProjection=s,o.logicAnd=d,o.logicNot=f,o.logicOr=V,o.not=f,o.or=V,o.useAbs=g,o.useAverage=h,o.useCeil=P,o.useClamp=y,o.useFloor=A,o.useMath=j,o.useMax=p,o.useMin=_,o.usePrecision=S,o.useProjection=b,o.useRound=F,o.useSum=N,o.useTrunc=R})(this.VueUse=this.VueUse||{},Vue,VueUse);
{
"name": "@vueuse/math",
"type": "module",
"version": "12.2.0",
"version": "12.3.0",
"description": "Math functions for VueUse",

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

"vue": "^3.5.13",
"@vueuse/shared": "12.2.0"
"@vueuse/shared": "12.3.0"
},

@@ -50,0 +50,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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