🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

utftu

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utftu - npm Package Compare versions

Comparing version
1.0.26
to
1.0.27
+1
-0
dist/types/packages/float/float.d.ts
export declare class Float {
static getMaxFloatLength(float1: number, float2: number): number;
static getCommon(float1: number, float2: number): number;

@@ -3,0 +4,0 @@ static add(float1: number, float2: number): number;

+16
-12

@@ -1,11 +0,15 @@

function l() {
function u() {
let i, t;
return [new Promise((e, o) => {
i = e, t = o;
return [new Promise((e, r) => {
i = e, t = r;
}), { resolve: i, reject: t }];
}
class n {
static getMaxFloatLength(t, s) {
const e = String(t), r = String(s), o = e.includes(".") ? e.split(".")[1].length : 0, c = r.includes(".") ? r.split(".")[1].length : 0;
return Math.max(o, c);
}
static getCommon(t, s) {
const e = String(t), o = String(s), r = e.includes(".") ? e.split(".")[1].length : 0, c = o.includes(".") ? o.split(".")[1].length : 0, h = Math.max(r, c);
return Math.pow(10, h);
const e = n.getMaxFloatLength(t, s);
return Math.pow(10, e);
}

@@ -29,3 +33,3 @@ static add(t, s) {

}
class u {
class h {
events = /* @__PURE__ */ new Map();

@@ -45,4 +49,4 @@ on(t, s) {

}
function m() {
return new u();
function l() {
return new h();
}

@@ -54,3 +58,3 @@ function g(i = 0) {

}
function v(i, t, s = "_createOptimizedValue") {
function m(i, t, s = "_createOptimizedValue") {
let e;

@@ -61,6 +65,6 @@ return t === !1 ? (s in globalThis || (globalThis[s] = i()), e = globalThis[s]) : e = i(), e;

n as Float,
l as createControlledPromise,
m as createEventEmitter,
v as createOptimizedValue,
u as createControlledPromise,
l as createEventEmitter,
m as createOptimizedValue,
g as waitTime
};
{
"name": "utftu",
"version": "1.0.26",
"version": "1.0.27",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

function l() {
let i, t;
return [new Promise((e, o) => {
i = e, t = o;
}), { resolve: i, reject: t }];
}
class n {
static getCommon(t, s) {
const e = String(t), o = String(s), r = e.includes(".") ? e.split(".")[1].length : 0, c = o.includes(".") ? o.split(".")[1].length : 0, h = Math.max(r, c);
return Math.pow(10, h);
}
static add(t, s) {
const e = n.getCommon(t, s);
return (t * e + s * e) / e;
}
static mul(t, s) {
const e = n.getCommon(t, s);
return t * e * (s * e) / e / e;
}
static sub(t, s) {
const e = n.getCommon(t, s);
return (t * e - s * e) / e;
}
static div(t, s) {
const e = n.getCommon(t, s);
return t * e / (s * e);
}
}
class u {
events = /* @__PURE__ */ new Map();
on(t, s) {
return this.events.has(t) ? this.events.get(t).push(s) : this.events.set(t, [s]), () => this.off(t, s);
}
off(t, s) {
this.events.has(t) && this.events.set(
t,
this.events.get(t).filter((e) => e !== s)
);
}
emit(t, s) {
this.events.has(t) && (this.events.get(t), this.events.get(t).forEach((e) => e(s))), t !== "*" && this.events.has("*") && this.events.get("*").forEach((e) => e({ name: t, value: s }));
}
}
function m() {
return new u();
}
function g(i = 0) {
return new Promise((t) => {
setTimeout(t, i);
});
}
function v(i, t, s = "_createOptimizedValue") {
let e;
return t === !1 ? (s in globalThis || (globalThis[s] = i()), e = globalThis[s]) : e = i(), e;
}
export {
n as Float,
l as createControlledPromise,
m as createEventEmitter,
v as createOptimizedValue,
g as waitTime
};