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

@augment-vir/common

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/common - npm Package Compare versions

Comparing version 21.3.6 to 21.4.0

8

dist/cjs/augments/number.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapNumber = exports.toEnsuredNumber = void 0;
exports.round = exports.wrapNumber = exports.toEnsuredNumber = void 0;
function toEnsuredNumber(input) {

@@ -24,1 +24,7 @@ const numeric = Number(input);

exports.wrapNumber = wrapNumber;
function round(inputs) {
const digitFactor = Math.pow(10, inputs.digits);
const multiplied = inputs.number * digitFactor;
return Number((Math.round(multiplied) / digitFactor).toFixed(inputs.digits));
}
exports.round = round;

3

dist/cjs/augments/object/matches-object-shape.js

@@ -82,3 +82,4 @@ "use strict";

testValue.constructor !== matchValue.constructor) {
throwKeyError(`constructor "${testValue?.constructor?.name}" did not match expected constructor "${matchValue.constructor}"`);
throwKeyError(`constructor "${testValue?.constructor
?.name}" did not match expected constructor "${matchValue.constructor}"`);
}

@@ -85,0 +86,0 @@ }

@@ -19,1 +19,6 @@ export function toEnsuredNumber(input) {

}
export function round(inputs) {
const digitFactor = Math.pow(10, inputs.digits);
const multiplied = inputs.number * digitFactor;
return Number((Math.round(multiplied) / digitFactor).toFixed(inputs.digits));
}

@@ -77,3 +77,4 @@ import { isTruthy } from '../boolean';

testValue.constructor !== matchValue.constructor) {
throwKeyError(`constructor "${testValue?.constructor?.name}" did not match expected constructor "${matchValue.constructor}"`);
throwKeyError(`constructor "${testValue?.constructor
?.name}" did not match expected constructor "${matchValue.constructor}"`);
}

@@ -80,0 +81,0 @@ }

@@ -7,1 +7,5 @@ export declare function toEnsuredNumber(input: any): number;

}): number;
export declare function round(inputs: {
number: number;
digits: number;
}): number;

@@ -12,2 +12,3 @@ export type Tuple<ArrayElementGeneric, LengthGeneric extends number> = LengthGeneric extends LengthGeneric ? number extends LengthGeneric ? ArrayElementGeneric[] : _TupleOf<ArrayElementGeneric, LengthGeneric, []> : never;

};
export type MaybeTuple<T> = T | AtLeastTuple<T, 1>;
export {};
{
"name": "@augment-vir/common",
"version": "21.3.6",
"version": "21.4.0",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -28,3 +28,3 @@ "bugs": {

"browser-or-node": "^2.1.1",
"type-fest": "^4.4.0"
"type-fest": "^4.6.0"
},

@@ -31,0 +31,0 @@ "devDependencies": {

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