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

airtight

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtight - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

9

out/main/job.js

@@ -137,8 +137,9 @@ "use strict";

defaultValue(schema) {
var _a;
return (_a = schema.default) !== null && _a !== void 0 ? _a : (schema.optional ? undefined :
schema.nullable ? null :
defaults_1.defaults[schema.type]);
const schemaDefault = schema.default;
if (typeof schemaDefault === 'function') {
return schemaDefault();
}
return schemaDefault !== null && schemaDefault !== void 0 ? schemaDefault : (schema.optional ? undefined : schema.nullable ? null : defaults_1.defaults[schema.type]);
}
}
exports.DecodeJob = DecodeJob;

@@ -15,3 +15,3 @@ export declare type Schema<T> = unknown extends T ? UnknownSchema : ((StrictTypeSchema<T> | AnySchema | RefSchema) & (undefined extends T ? {

};
export declare type BaseSchema = {
export declare type BaseSchema<T> = {
id?: string;

@@ -21,7 +21,7 @@ title?: string;

metadata?: any;
default?: T | (() => T);
};
export declare type AnySchema = {
type: 'any';
default?: any;
} & BaseSchema;
} & BaseSchema<any>;
export declare type RefSchema = {

@@ -33,30 +33,25 @@ type: 'ref';

type: 'boolean';
default?: boolean;
} & BaseSchema;
} & BaseSchema<boolean>;
export declare type NumberSchema = {
type: 'number' | 'integer';
default?: number;
minimum?: number;
maximum?: number;
} & BaseSchema;
} & BaseSchema<number>;
export declare type StringSchema = {
type: 'string';
default?: string;
regex?: string;
regexFlags?: string;
enum?: string[];
} & BaseSchema;
} & BaseSchema<string>;
export declare type ObjectSchema<T> = {
type: 'object';
default?: object;
properties: PropertiesSpec<T>;
additionalProperties?: Schema<any>;
} & BaseSchema;
} & BaseSchema<T>;
export declare type ArraySchema<T> = {
type: 'array';
default?: Array<any>;
items: Schema<T>;
} & BaseSchema;
} & BaseSchema<T[]>;
export declare type PropertiesSpec<T> = {
[K in keyof T]-?: Schema<T[K]>;
};
{
"name": "airtight",
"version": "0.6.1",
"version": "0.7.0",
"description": "Tight subset of JSON schema",

@@ -5,0 +5,0 @@ "main": "out/main/index.js",

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