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

unitlib

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unitlib - npm Package Compare versions

Comparing version 0.8.7 to 0.8.8

dist/UnitSystem-DpVXzKaI.js

10

dist/index.js

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

import { T as h, Q as c, f as o } from "./UnitSystem-DLksjyUA.js";
import { c as f, a as w, b, U as d, d as y, i as T, r as U } from "./UnitSystem-DLksjyUA.js";
import { T as h, Q as p, f as o } from "./UnitSystem-DpVXzKaI.js";
import { c as f, a as w, b, U as d, d as y, i as T, r as U } from "./UnitSystem-DpVXzKaI.js";
class e {
constructor(t, i) {
this.value = t, this.unit = i, this[h] = c, Object.freeze(this);
this.value = t, this.unit = i, this[h] = p, Object.freeze(this);
}

@@ -92,4 +92,2 @@ get isUnitless() {

});
if (this.value === 1)
return this.unit.toParts(t);
if (this.unit.isUnitless) {

@@ -117,3 +115,3 @@ const s = this.unit.multiplyValueByFactor(this.value);

export {
c as QUANTITY_TYPE,
p as QUANTITY_TYPE,
e as Quantity,

@@ -120,0 +118,0 @@ h as TYPE_TAG,

6

dist/Quantity.d.ts

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

import { default as Fraction } from 'fraction.js';
import { Unit } from './Unit.ts';
import { BaseUnitDefinition, DerivedUnitDefinition, FactorDefinition, QuantityFormatOptions, UnitFormatPart } from './types';
import { ApproximateEqualityThreshold } from './float.ts';
import { BaseUnitDefinition, DerivedUnitDefinition, FactorDefinition, QuantityFormatOptions, UnitFormatPart } from './types';
import { Unit } from './Unit.ts';
import { default as Fraction } from 'fraction.js';

@@ -6,0 +6,0 @@ export declare class Quantity<U extends Record<string, BaseUnitDefinition>, F extends Record<string, FactorDefinition>, D extends Record<string, DerivedUnitDefinition>> {

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

import { UnitSystem } from './UnitSystem.ts';
import { BaseUnitDefinition, FactorDefinition } from './types.ts';
import { UnitSystem } from './UnitSystem.ts';

@@ -4,0 +4,0 @@ type TDict<Keys extends string, T> = Record<Keys, T>;

import e from "fraction.js";
import { b as s } from "./UnitSystem-DLksjyUA.js";
import { b as s } from "./UnitSystem-DpVXzKaI.js";
const n = {

@@ -4,0 +4,0 @@ s: {},

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

import { default as Fraction } from 'fraction.js';
import { Unit } from './Unit';
import { Quantity } from './Quantity';
import { Unit } from './Unit';
import { default as Fraction } from 'fraction.js';

@@ -5,0 +5,0 @@ export declare const TYPE_TAG = "__unitlib_type";

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

import { default as Fraction } from 'fraction.js';
import { UnitSystem } from './UnitSystem.ts';
import { BaseUnitDefinition, DerivedUnitDefinition, FactorDefinition, UnitFormatOptions, UnitFormatPart } from './types.ts';
import { ApproximateEqualityThreshold } from './float.ts';
import { BaseUnitDefinition, DerivedUnitDefinition, FactorDefinition, UnitFormatOptions, UnitFormatPart } from './types.ts';
import { UnitSystem } from './UnitSystem.ts';
import { default as Fraction } from 'fraction.js';

@@ -6,0 +6,0 @@ export declare const UnityFactor: FactorDefinition;

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

import { Unit } from './Unit.ts';
import { BaseUnitDefinition, DerivedUnitDefinition, FactorDefinition } from './types';
import { Unit } from './Unit.ts';

@@ -4,0 +4,0 @@ export type BaseUnitsOf<S> = S extends UnitSystem<infer U, infer F, infer D> ? U : never;

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

import { default as Fraction } from 'fraction.js';
import { FactorDefinition } from './types.ts';
import { default as Fraction } from 'fraction.js';

@@ -4,0 +4,0 @@ export declare const divideFactors: (a: Readonly<FactorDefinition>, b: Readonly<FactorDefinition>) => number;

{
"name": "unitlib",
"version": "0.8.7",
"version": "0.8.8",
"description": "A unit library",

@@ -42,6 +42,6 @@ "type": "module",

"http-server": "^14.1.1",
"prettier": "^3.2.5",
"prettier": "^3.3.2",
"typescript": "^5.4.5",
"vite": "^5.2.10",
"vite-plugin-dts": "^3.8.3"
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1"
},

@@ -53,3 +53,4 @@ "dependencies": {

"fraction.js": "^4.2.1"
}
},
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
}
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