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

@bunt/input

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bunt/input - npm Package Compare versions

Comparing version 0.26.3 to 0.27.0

3

dist/cjs/Assertion/AssertionTypeError.d.ts

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

import { ILogable, IReadableError, ValidationError } from "@bunt/util";
import { IReadableError, ValidationError } from "@bunt/assert";
import { ILogable } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +4,0 @@ export interface IReadableTypeError {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AssertionTypeError = void 0;
const util_1 = require("@bunt/util");
class AssertionTypeError extends util_1.ValidationError {
const assert_1 = require("@bunt/assert");
class AssertionTypeError extends assert_1.ValidationError {
#payload;

@@ -7,0 +7,0 @@ #type;

import { FieldSelectType } from "./interfaces.js";
export declare function validate<T>(type: FieldSelectType<T>, value: unknown): Promise<T>;
export declare const entriesReverse: <V>(entries?: [string | number | symbol, V][]) => Record<any, any>;
//# sourceMappingURL=functions.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validate = void 0;
const util_1 = require("@bunt/util");
exports.entriesReverse = exports.validate = void 0;
const is_1 = require("@bunt/is");
async function validate(type, value) {
if ((0, util_1.isFunction)(type)) {
if ((0, is_1.isFunction)(type)) {
return type().validate(value);

@@ -12,2 +12,6 @@ }

exports.validate = validate;
const entriesReverse = (entries = []) => {
return Object.assign({}, ...entries.map(([key, value]) => ({ [key]: value })));
};
exports.entriesReverse = entriesReverse;
//# sourceMappingURL=functions.js.map

@@ -1,2 +0,2 @@

import { KeyOf } from "@bunt/util";
import { KeyOf } from "@bunt/type";
import { TypeAbstract } from "./TypeAbstract.js";

@@ -3,0 +3,0 @@ export type FieldMayFn<T> = T | (() => T);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bool = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.Bool = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isBoolean)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isBoolean)(payload), `Wrong payload: ${this.name} expected`, payload);
return payload;

@@ -12,0 +12,0 @@ },

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateTime = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.DateTime = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isNumber)(payload) || (0, util_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isNumber)(payload) || (0, is_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert(validateDateValue(payload), "Wrong date format", payload);

@@ -12,0 +12,0 @@ return new Date(payload);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailAddress = exports.RE_EMAIL_RFC5222 = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -11,3 +11,3 @@ // eslint-disable-next-line

validate(payload) {
this.assert((0, util_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert(exports.RE_EMAIL_RFC5222.test(payload), `Wrong payload: ${this.name} expected`, payload);

@@ -14,0 +14,0 @@ return payload;

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export declare class Enum<T extends string | number> extends TypeAbstract<T> {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Enum = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const TypeAbstract_js_1 = require("../TypeAbstract.js");

@@ -13,3 +13,3 @@ class Enum extends TypeAbstract_js_1.TypeAbstract {

validate(input) {
this.assert((0, util_1.isString)(input), "Wrong type", input);
this.assert((0, is_1.isString)(input), "Wrong type", input);
this.assert(!/^\d+$/.test(input), "Wrong value", input);

@@ -16,0 +16,0 @@ this.assert(input in this.#value, "Wrong value", input);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Fields = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const assert_1 = require("@bunt/assert");
const index_js_1 = require("../Assertion/index.js");
const TypeAbstract_js_1 = require("../TypeAbstract.js");
const functions_js_1 = require("../functions.js");
class Fields extends TypeAbstract_js_1.TypeAbstract {

@@ -22,3 +24,3 @@ #fields;

merge(from) {
if ((0, util_1.isInstanceOf)(from, Fields)) {
if ((0, is_1.isInstanceOf)(from, Fields)) {
return new Fields(Object.assign({}, this.fields, from.fields));

@@ -29,3 +31,3 @@ }

async validate(payload) {
this.assert((0, util_1.isObject)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isObject)(payload), `Wrong payload: ${this.name} expected`, payload);
const errorFields = [];

@@ -36,4 +38,4 @@ const entries = [];

try {
const validationType = (0, util_1.isFunction)(type) ? type() : type;
this.assert((0, util_1.isInstanceOf)(validationType, TypeAbstract_js_1.TypeAbstract), `Wrong field: ${field}`, payload[field]);
const validationType = (0, is_1.isFunction)(type) ? type() : type;
this.assert((0, is_1.isInstanceOf)(validationType, TypeAbstract_js_1.TypeAbstract), `Wrong field: ${field}`, payload[field]);
entries.push([field, await validationType.validate(payload[field])]);

@@ -43,3 +45,3 @@ }

errorFields.push(field);
if ((0, util_1.isInstanceOf)(error, index_js_1.AssertionTypeError)) {
if ((0, is_1.isInstanceOf)(error, index_js_1.AssertionTypeError)) {
validations.set(field, error.toSafeJSON());

@@ -50,3 +52,3 @@ continue;

payload: payload[field],
message: (0, util_1.toError)(error, "Unknown").message,
message: (0, assert_1.toError)(error, "Unknown").message,
type: "Unknown",

@@ -57,5 +59,5 @@ });

if (validations.size > 0) {
throw new index_js_1.AssertionObjectError(`Assertion failed: ${errorFields.join(", ")}`, this, payload, (0, util_1.entriesReverse)([...validations.entries()]));
throw new index_js_1.AssertionObjectError(`Assertion failed: ${errorFields.join(", ")}`, this, payload, (0, functions_js_1.entriesReverse)([...validations.entries()]));
}
return (0, util_1.entriesReverse)(entries);
return (0, functions_js_1.entriesReverse)(entries);
}

@@ -62,0 +64,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Float = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.Float = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isNumber)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isNumber)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert(payload <= Number.MAX_SAFE_INTEGER && payload >= Number.MIN_SAFE_INTEGER, "Wrong payload range", payload);

@@ -12,0 +12,0 @@ return payload;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Int = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.Int = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isNumber)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isNumber)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert(Number.isSafeInteger(payload), "Wrong payload value", payload);

@@ -12,0 +12,0 @@ return payload;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSONString = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.JSONString = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isString)(payload), "Wrong payload", payload);
this.assert((0, is_1.isString)(payload), "Wrong payload", payload);
try {

@@ -12,0 +12,0 @@ return JSON.parse(payload);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.List = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const assert_1 = require("@bunt/assert");
const index_js_1 = require("../Assertion/index.js");

@@ -9,3 +10,3 @@ const SuperType_js_1 = require("../SuperType.js");

async validate(payload) {
this.assert((0, util_1.isArray)(payload), `Wrong payload: ${this.type.name}[] expected`, payload);
this.assert((0, is_1.isArray)(payload), `Wrong payload: ${this.type.name}[] expected`, payload);
let index = 0;

@@ -19,3 +20,3 @@ const result = [];

catch (error) {
if ((0, util_1.isInstanceOf)(error, index_js_1.AssertionTypeError)) {
if ((0, is_1.isInstanceOf)(error, index_js_1.AssertionTypeError)) {
validations.add({ index, ...error.toSafeJSON() });

@@ -27,3 +28,3 @@ }

payload: item,
message: (0, util_1.toError)(error, "Unknown").message,
message: (0, assert_1.toError)(error, "Unknown").message,
type: this.type.name,

@@ -30,0 +31,0 @@ });

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ import { TypeAbstract } from "../TypeAbstract.js";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NonNull = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const SuperType_js_1 = require("../SuperType.js");

@@ -13,4 +13,4 @@ class NonNull extends SuperType_js_1.SuperType {

validate(payload) {
if ((0, util_1.isNull)(payload) || (0, util_1.isUndefined)(payload)) {
if ((0, util_1.isFunction)(this.#defaultValue)) {
if ((0, is_1.isNull)(payload) || (0, is_1.isUndefined)(payload)) {
if ((0, is_1.isFunction)(this.#defaultValue)) {
return this.#defaultValue();

@@ -17,0 +17,0 @@ }

@@ -1,2 +0,2 @@

import { MayNullable, Promisify } from "@bunt/util";
import { MayNullable, Promisify } from "@bunt/type";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export declare class Nullable<TValue> extends SuperType<MayNullable<TValue>, Exclude<TValue, undefined | null>> {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Nullable = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const SuperType_js_1 = require("../SuperType.js");

@@ -9,3 +9,3 @@ class Nullable extends SuperType_js_1.SuperType {

validate(payload) {
if ((0, util_1.isNull)(payload) || (0, util_1.isUndefined)(payload)) {
if ((0, is_1.isNull)(payload) || (0, is_1.isUndefined)(payload)) {
return undefined;

@@ -12,0 +12,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecordType = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.RecordType = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isObject)(payload), "Wrong payload", payload);
this.assert((0, is_1.isObject)(payload), "Wrong payload", payload);
return payload;

@@ -12,0 +12,0 @@ },

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export interface IScalarType<TValue> {

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export declare class StringAsNumber extends SuperType<string | number, number> {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringAsNumber = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const SuperType_js_1 = require("../SuperType.js");
class StringAsNumber extends SuperType_js_1.SuperType {
validate(payload) {
this.assert((0, util_1.isString)(payload) || (0, util_1.isNumber)(payload), "Wrong payload type", payload);
this.assert((0, is_1.isString)(payload) || (0, is_1.isNumber)(payload), "Wrong payload type", payload);
return this.type.validate(+payload);

@@ -10,0 +10,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Text = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -9,3 +9,3 @@ exports.Text = new ScalarType_js_1.ScalarType({

validate(payload) {
this.assert((0, util_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
return payload;

@@ -12,0 +12,0 @@ },

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToNumber = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const Int_js_1 = require("./Int.js");

@@ -10,3 +10,3 @@ const ScalarType_js_1 = require("./ScalarType.js");

validate(payload) {
this.assert((0, util_1.isNumber)(payload) || (0, util_1.isString)(payload), "Wrong payload type", payload);
this.assert((0, is_1.isNumber)(payload) || (0, is_1.isString)(payload), "Wrong payload type", payload);
return Int_js_1.Int.validate(+payload);

@@ -13,0 +13,0 @@ },

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ import { IScalarType } from "./ScalarType.js";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Union = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const TypeAbstract_js_1 = require("../TypeAbstract.js");

@@ -12,3 +12,3 @@ class Union extends TypeAbstract_js_1.TypeAbstract {

const [arg1, arg2] = args;
if ((0, util_1.isObject)(arg1)) {
if ((0, is_1.isObject)(arg1)) {
this.#selector = arg1.selector;

@@ -15,0 +15,0 @@ this.#name = arg1.name ?? "Union";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UUID = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const ScalarType_js_1 = require("./ScalarType.js");

@@ -10,3 +10,3 @@ const RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89AB][0-9a-f]{3}-[0-9a-f]{12}$/i;

validate(payload) {
this.assert((0, util_1.isString)(payload) && RE.test(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isString)(payload) && RE.test(payload), `Wrong payload: ${this.name} expected`, payload);
return payload;

@@ -13,0 +13,0 @@ },

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ interface IVarchar {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Varchar = void 0;
const util_1 = require("@bunt/util");
const is_1 = require("@bunt/is");
const TypeAbstract_js_1 = require("../TypeAbstract.js");

@@ -12,8 +12,8 @@ class Varchar extends TypeAbstract_js_1.TypeAbstract {

const { min, max } = options;
this.assert((0, util_1.isUndefined)(min) || min > -1, `Wrong ${this.name} min size`, min);
this.assert((0, util_1.isUndefined)(max) || max < Number.MAX_SAFE_INTEGER, `Wrong ${this.name} max size`, max);
this.assert((0, is_1.isUndefined)(min) || min > -1, `Wrong ${this.name} min size`, min);
this.assert((0, is_1.isUndefined)(max) || max < Number.MAX_SAFE_INTEGER, `Wrong ${this.name} max size`, max);
}
validate(payload) {
const { min, max } = this.#options;
this.assert((0, util_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert((0, is_1.isString)(payload), `Wrong payload: ${this.name} expected`, payload);
this.assert(!min || payload.length >= min, `Wrong payload: ${this.name} min ${min}`, payload);

@@ -20,0 +20,0 @@ this.assert(!max || payload.length <= max, `Wrong payload: ${this.name} min ${min}`, payload);

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
export declare abstract class TypeAbstract<TValue> {

@@ -3,0 +3,0 @@ get name(): string;

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

import { ILogable, IReadableError, ValidationError } from "@bunt/util";
import { IReadableError, ValidationError } from "@bunt/assert";
import { ILogable } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +4,0 @@ export interface IReadableTypeError {

@@ -1,2 +0,2 @@

import { ValidationError } from "@bunt/util";
import { ValidationError } from "@bunt/assert";
export class AssertionTypeError extends ValidationError {

@@ -3,0 +3,0 @@ #payload;

import { FieldSelectType } from "./interfaces.js";
export declare function validate<T>(type: FieldSelectType<T>, value: unknown): Promise<T>;
export declare const entriesReverse: <V>(entries?: [string | number | symbol, V][]) => Record<any, any>;
//# sourceMappingURL=functions.d.ts.map

@@ -1,2 +0,2 @@

import { isFunction } from "@bunt/util";
import { isFunction } from "@bunt/is";
export async function validate(type, value) {

@@ -8,2 +8,5 @@ if (isFunction(type)) {

}
export const entriesReverse = (entries = []) => {
return Object.assign({}, ...entries.map(([key, value]) => ({ [key]: value })));
};
//# sourceMappingURL=functions.js.map

@@ -1,2 +0,2 @@

import { KeyOf } from "@bunt/util";
import { KeyOf } from "@bunt/type";
import { TypeAbstract } from "./TypeAbstract.js";

@@ -3,0 +3,0 @@ export type FieldMayFn<T> = T | (() => T);

@@ -1,2 +0,2 @@

import { isBoolean } from "@bunt/util";
import { isBoolean } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const Bool = new ScalarType({

@@ -1,2 +0,2 @@

import { isNumber, isString } from "@bunt/util";
import { isNumber, isString } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const DateTime = new ScalarType({

@@ -1,2 +0,2 @@

import { isString } from "@bunt/util";
import { isString } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ // eslint-disable-next-line

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export declare class Enum<T extends string | number> extends TypeAbstract<T> {

@@ -1,2 +0,2 @@

import { isString } from "@bunt/util";
import { isString } from "@bunt/is";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export class Enum extends TypeAbstract {

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

import { entriesReverse, isFunction, isInstanceOf, isObject, toError } from "@bunt/util";
import { isFunction, isInstanceOf, isObject } from "@bunt/is";
import { toError } from "@bunt/assert";
import { AssertionObjectError, AssertionTypeError } from "../Assertion/index.js";
import { TypeAbstract } from "../TypeAbstract.js";
import { entriesReverse } from "../functions.js";
export class Fields extends TypeAbstract {

@@ -5,0 +7,0 @@ #fields;

@@ -1,2 +0,2 @@

import { isNumber } from "@bunt/util";
import { isNumber } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const Float = new ScalarType({

@@ -1,2 +0,2 @@

import { isNumber } from "@bunt/util";
import { isNumber } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const Int = new ScalarType({

@@ -1,2 +0,2 @@

import { isString } from "@bunt/util";
import { isString } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const JSONString = new ScalarType({

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

import { isArray, isInstanceOf, toError } from "@bunt/util";
import { isArray, isInstanceOf } from "@bunt/is";
import { toError } from "@bunt/assert";
import { AssertionListError, AssertionTypeError } from "../Assertion/index.js";

@@ -3,0 +4,0 @@ import { SuperType } from "../SuperType.js";

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ import { TypeAbstract } from "../TypeAbstract.js";

@@ -1,2 +0,2 @@

import { isFunction, isNull, isUndefined } from "@bunt/util";
import { isFunction, isNull, isUndefined } from "@bunt/is";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export class NonNull extends SuperType {

@@ -1,2 +0,2 @@

import { MayNullable, Promisify } from "@bunt/util";
import { MayNullable, Promisify } from "@bunt/type";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export declare class Nullable<TValue> extends SuperType<MayNullable<TValue>, Exclude<TValue, undefined | null>> {

@@ -1,2 +0,2 @@

import { isNull, isUndefined } from "@bunt/util";
import { isNull, isUndefined } from "@bunt/is";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export class Nullable extends SuperType {

@@ -1,2 +0,2 @@

import { isObject } from "@bunt/util";
import { isObject } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const RecordType = new ScalarType({

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export interface IScalarType<TValue> {

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export declare class StringAsNumber extends SuperType<string | number, number> {

@@ -1,2 +0,2 @@

import { isNumber, isString } from "@bunt/util";
import { isNumber, isString } from "@bunt/is";
import { SuperType } from "../SuperType.js";

@@ -3,0 +3,0 @@ export class StringAsNumber extends SuperType {

@@ -1,2 +0,2 @@

import { isString } from "@bunt/util";
import { isString } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ export const Text = new ScalarType({

@@ -1,2 +0,2 @@

import { isNumber, isString } from "@bunt/util";
import { isNumber, isString } from "@bunt/is";
import { Int } from "./Int.js";

@@ -3,0 +3,0 @@ import { ScalarType } from "./ScalarType.js";

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ import { IScalarType } from "./ScalarType.js";

@@ -1,2 +0,2 @@

import { isObject } from "@bunt/util";
import { isObject } from "@bunt/is";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export class Union extends TypeAbstract {

@@ -1,2 +0,2 @@

import { isString } from "@bunt/util";
import { isString } from "@bunt/is";
import { ScalarType } from "./ScalarType.js";

@@ -3,0 +3,0 @@ const RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89AB][0-9a-f]{3}-[0-9a-f]{12}$/i;

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ interface IVarchar {

@@ -1,2 +0,2 @@

import { isString, isUndefined } from "@bunt/util";
import { isString, isUndefined } from "@bunt/is";
import { TypeAbstract } from "../TypeAbstract.js";

@@ -3,0 +3,0 @@ export class Varchar extends TypeAbstract {

@@ -1,2 +0,2 @@

import { Promisify } from "@bunt/util";
import { Promisify } from "@bunt/type";
export declare abstract class TypeAbstract<TValue> {

@@ -3,0 +3,0 @@ get name(): string;

{
"name": "@bunt/input",
"version": "0.26.3",
"version": "0.27.0",
"keywords": [

@@ -35,7 +35,9 @@ "typescript"

},
"license": "MIT",
"dependencies": {
"@bunt/util": "^0.26.3"
"@bunt/assert": "^0.27.0",
"@bunt/is": "^0.27.0",
"@bunt/type": "^0.27.0"
},
"license": "MIT",
"gitHead": "07d3ee4d12a7ceec0cacec519425a2cfab1f70c4"
"gitHead": "ed8a1abf168ea3ed94209268406d2b8e9834a5a5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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