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

@finnair/v-validation

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finnair/v-validation - npm Package Compare versions

Comparing version 4.1.0 to 4.3.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [4.3.0](https://github.com/finnair/v-validation/compare/v4.2.0...v4.3.0) (2023-10-03)
### Bug Fixes
* ESM compatible export of V ([#94](https://github.com/finnair/v-validation/issues/94)) ([4dfe9d4](https://github.com/finnair/v-validation/commit/4dfe9d4087a625b04c844b0e6f9fda94d3ca9fb7))
# [4.1.0](https://github.com/finnair/v-validation/compare/v4.0.0...v4.1.0) (2022-11-22)

@@ -8,0 +19,0 @@

2

dist/index.d.ts

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

export { default as V } from './V';
export * from './V';
export * from './validators';

@@ -16,9 +16,4 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.V = void 0;
var V_1 = require("./V");
Object.defineProperty(exports, "V", { enumerable: true, get: function () { return __importDefault(V_1).default; } });
__exportStar(require("./V"), exports);
__exportStar(require("./validators"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("@finnair/path");
let array = [1, 2, 3, 4]; // [1, undefined]
// $[1] = undefined
// $[2] = undefined
path_1.Path.of(1).set(array, undefined);
//import { validate as validateUuid, v4 } from 'uuid';
console.log(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test('36b6dabd-875e-486d-e6bc-30033bee147e'));
/*
const value = '36b6dabd-875e-486d-e6bc-30033bee147e';
console.log(value);
console.log(validateUuid(value));
console.log(uuidVersion(value));
*/
import { SchemaValidator, SchemaModel } from './schema';
import { Path } from '@finnair/path';
import { IgnoreValidator, ArrayNormalizer, AnyValidator, StringValidator, StringNormalizer, NotNullOrUndefinedValidator, IsNullOrUndefinedValidator, NotEmptyValidator, NotBlankValidator, ValueMapper, BooleanValidator, NumberValidator, NumberNormalizer, DateValidator, ValidatorFn, ValidatorFnWrapper, MappingFn, Validator, CheckValidator, OptionalValidator, AssertTrue, IfValidator, GroupOrName, WhenGroupValidator, AssertTrueValidator, PatternValidator, PatternNormalizer, BooleanNormalizer, MinValidator, MaxValidator, ObjectModel, ObjectValidator, ObjectNormalizer, MapValidator, MapNormalizer, ArrayValidator, SizeValidator, AllOfValidator, AnyOfValidator, OneOfValidator, CompositionValidator, EnumValidator, HasValueValidator, JsonValidator, RequiredValidator } from './validators';
declare const V: {
export declare const V: {
fn: (fn: ValidatorFn, type?: string) => ValidatorFnWrapper;

@@ -59,2 +59,1 @@ map: (fn: MappingFn, error?: any) => ValueMapper;

};
export default V;

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.V = void 0;
const uuid_validate_1 = __importDefault(require("uuid-validate"));

@@ -11,3 +12,3 @@ const schema_1 = require("./schema");

const ignoreValidator = new validators_1.IgnoreValidator(), anyValidator = new validators_1.AnyValidator(), stringValidator = new validators_1.StringValidator(), toStringValidator = new validators_1.StringNormalizer(), notNullValidator = new validators_1.NotNullOrUndefinedValidator(), nullOrUndefinedValidator = new validators_1.IsNullOrUndefinedValidator(), notEmptyValidator = new validators_1.NotEmptyValidator(), notBlankValidator = new validators_1.NotBlankValidator(), emptyToNullValidator = new validators_1.ValueMapper(val => ((0, validators_1.isNullOrUndefined)(val) || val === '' ? null : val)), emptyToUndefinedValidator = new validators_1.ValueMapper(val => ((0, validators_1.isNullOrUndefined)(val) || val === '' ? undefined : val)), undefinedToNullValidator = new validators_1.ValueMapper(val => (val === undefined ? null : val)), booleanValidator = new validators_1.BooleanValidator(), numberValidator = new validators_1.NumberValidator(validators_1.NumberFormat.number), toNumberValidator = new validators_1.NumberNormalizer(validators_1.NumberFormat.number), integerValidator = new validators_1.NumberValidator(validators_1.NumberFormat.integer), toIntegerValidator = new validators_1.NumberNormalizer(validators_1.NumberFormat.integer), dateValidator = new validators_1.DateValidator(validators_1.ValidatorType.Date);
const V = {
exports.V = {
fn: (fn, type) => new validators_1.ValidatorFnWrapper(fn, type),

@@ -67,3 +68,2 @@ map: (fn, error) => new validators_1.ValueMapper(fn, error),

};
Object.freeze(V);
exports.default = V;
Object.freeze(exports.V);
{
"name": "@finnair/v-validation",
"version": "4.1.0",
"version": "4.3.0",
"private": false,

@@ -33,3 +33,3 @@ "description": "V-validation core package",

},
"gitHead": "7fa7827e86f5c6da14d89bf80a6b58408a84bf4d"
"gitHead": "2ba982bbf4e3457e2b2a1433d319e2fde89a413c"
}
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