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 6.1.1 to 6.1.2

2

dist/cjs/augments/object.d.ts

@@ -61,5 +61,5 @@ import { AtLeastOneEntryArray } from './array';

*/
export declare function assertMatchesObjectShape<MatchThisGeneric extends object = never>(testThisOne: unknown, compareToThisOne: NoInfer<ObjectWithAtLeastSingleEntryArrays<MatchThisGeneric>>, allowExtraProps?: boolean): asserts testThisOne is MatchThisGeneric;
export declare function assertMatchesObjectShape<MatchThisGeneric extends object = never>(testThisOne: unknown, compareToThisOne: NoInfer<ObjectWithAtLeastSingleEntryArrays<MatchThisGeneric>>, allowExtraProps?: boolean, noCheckInnerValueOfTheseKeys?: Partial<Record<keyof typeof compareToThisOne, boolean>>): asserts testThisOne is MatchThisGeneric;
export declare function typedObjectFromEntries<KeyType extends PropertyKey, ValueType>(entries: ReadonlyArray<Readonly<[KeyType, ValueType]>>): Record<KeyType, ValueType>;
export {};
//# sourceMappingURL=object.d.ts.map

@@ -202,3 +202,3 @@ "use strict";

*/
function assertMatchesObjectShape(testThisOne, compareToThisOne, allowExtraProps = false) {
function assertMatchesObjectShape(testThisOne, compareToThisOne, allowExtraProps = false, noCheckInnerValueOfTheseKeys = {}) {
const testKeys = getObjectTypedKeys(testThisOne);

@@ -221,7 +221,9 @@ const matchKeys = new Set(getObjectTypedKeys(compareToThisOne));

const shouldMatch = compareToThisOne[key];
compareInnerValue(testValue, shouldMatch, throwKeyError);
if (!noCheckInnerValueOfTheseKeys[key]) {
compareInnerValue(testValue, shouldMatch, throwKeyError, allowExtraProps);
}
});
}
exports.assertMatchesObjectShape = assertMatchesObjectShape;
function compareInnerValue(testValue, matchValue, throwKeyError) {
function compareInnerValue(testValue, matchValue, throwKeyError, allowExtraProps) {
var _a;

@@ -255,3 +257,3 @@ const testType = typeof testValue;

try {
compareInnerValue(testValueEntry, matchValue, throwKeyError);
compareInnerValue(testValueEntry, matchValue, throwKeyError, allowExtraProps);
return undefined;

@@ -270,3 +272,3 @@ }

else if (isObject(matchValue)) {
assertMatchesObjectShape(testValue, matchValue);
assertMatchesObjectShape(testValue, matchValue, allowExtraProps);
}

@@ -273,0 +275,0 @@ }

@@ -61,5 +61,5 @@ import { AtLeastOneEntryArray } from './array';

*/
export declare function assertMatchesObjectShape<MatchThisGeneric extends object = never>(testThisOne: unknown, compareToThisOne: NoInfer<ObjectWithAtLeastSingleEntryArrays<MatchThisGeneric>>, allowExtraProps?: boolean): asserts testThisOne is MatchThisGeneric;
export declare function assertMatchesObjectShape<MatchThisGeneric extends object = never>(testThisOne: unknown, compareToThisOne: NoInfer<ObjectWithAtLeastSingleEntryArrays<MatchThisGeneric>>, allowExtraProps?: boolean, noCheckInnerValueOfTheseKeys?: Partial<Record<keyof typeof compareToThisOne, boolean>>): asserts testThisOne is MatchThisGeneric;
export declare function typedObjectFromEntries<KeyType extends PropertyKey, ValueType>(entries: ReadonlyArray<Readonly<[KeyType, ValueType]>>): Record<KeyType, ValueType>;
export {};
//# sourceMappingURL=object.d.ts.map

@@ -183,3 +183,3 @@ import { extractErrorMessage } from './error';

*/
export function assertMatchesObjectShape(testThisOne, compareToThisOne, allowExtraProps = false) {
export function assertMatchesObjectShape(testThisOne, compareToThisOne, allowExtraProps = false, noCheckInnerValueOfTheseKeys = {}) {
const testKeys = getObjectTypedKeys(testThisOne);

@@ -202,6 +202,8 @@ const matchKeys = new Set(getObjectTypedKeys(compareToThisOne));

const shouldMatch = compareToThisOne[key];
compareInnerValue(testValue, shouldMatch, throwKeyError);
if (!noCheckInnerValueOfTheseKeys[key]) {
compareInnerValue(testValue, shouldMatch, throwKeyError, allowExtraProps);
}
});
}
function compareInnerValue(testValue, matchValue, throwKeyError) {
function compareInnerValue(testValue, matchValue, throwKeyError, allowExtraProps) {
var _a;

@@ -235,3 +237,3 @@ const testType = typeof testValue;

try {
compareInnerValue(testValueEntry, matchValue, throwKeyError);
compareInnerValue(testValueEntry, matchValue, throwKeyError, allowExtraProps);
return undefined;

@@ -250,3 +252,3 @@ }

else if (isObject(matchValue)) {
assertMatchesObjectShape(testValue, matchValue);
assertMatchesObjectShape(testValue, matchValue, allowExtraProps);
}

@@ -253,0 +255,0 @@ }

@@ -61,5 +61,5 @@ import { AtLeastOneEntryArray } from './array';

*/
export declare function assertMatchesObjectShape<MatchThisGeneric extends object = never>(testThisOne: unknown, compareToThisOne: NoInfer<ObjectWithAtLeastSingleEntryArrays<MatchThisGeneric>>, allowExtraProps?: boolean): asserts testThisOne is MatchThisGeneric;
export declare function assertMatchesObjectShape<MatchThisGeneric extends object = never>(testThisOne: unknown, compareToThisOne: NoInfer<ObjectWithAtLeastSingleEntryArrays<MatchThisGeneric>>, allowExtraProps?: boolean, noCheckInnerValueOfTheseKeys?: Partial<Record<keyof typeof compareToThisOne, boolean>>): asserts testThisOne is MatchThisGeneric;
export declare function typedObjectFromEntries<KeyType extends PropertyKey, ValueType>(entries: ReadonlyArray<Readonly<[KeyType, ValueType]>>): Record<KeyType, ValueType>;
export {};
//# sourceMappingURL=object.d.ts.map
{
"name": "@augment-vir/common",
"version": "6.1.1",
"version": "6.1.2",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -5,0 +5,0 @@ "bugs": {

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