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

@finnair/v-validation-luxon

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-luxon - npm Package Compare versions

Comparing version 1.1.0-alpha.8 to 1.1.0-alpha.9

8

CHANGELOG.md

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

# [1.1.0-alpha.9](https://github.com/finnair/v-validation/compare/v1.1.0-alpha.8...v1.1.0-alpha.9) (2022-08-19)
**Note:** Version bump only for package @finnair/v-validation-luxon
# [1.1.0-alpha.8](https://github.com/finnair/v-validation/compare/v1.1.0-alpha.7...v1.1.0-alpha.8) (2022-08-19)

@@ -8,0 +16,0 @@

2

dist/test-luxon.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const luxon_1 = require("luxon");
console.log(luxon_1.DateTime.fromFormat('20220819095432+0', 'yyyyMMddHHmmssZ').toJSON());
console.log(luxon_1.DateTime.fromFormat('2022-08-19+0', 'yyyy-MM-ddZ').toJSON());

@@ -13,3 +13,3 @@ import { ValidationContext, Validator, ValidationResult } from '@finnair/v-validation';

pattern: RegExp;
parser: (value: string) => DateTime;
parser: (value: string, match: RegExpExecArray) => DateTime;
}

@@ -16,0 +16,0 @@ export declare function validateLuxon({ value, path, ctx, type, proto, pattern, parser }: ValidateLuxonParams): Promise<ValidationResult>;

@@ -30,4 +30,5 @@ "use strict";

else if ((0, v_validation_1.isString)(value)) {
if (pattern.test(value)) {
const dateTime = parser(value);
const match = pattern.exec(value);
if (match) {
const dateTime = parser(value, match);
if (dateTime.isValid) {

@@ -34,0 +35,0 @@ return ctx.success(new proto(dateTime));

{
"name": "@finnair/v-validation-luxon",
"version": "1.1.0-alpha.8",
"version": "1.1.0-alpha.9",
"private": false,

@@ -35,3 +35,3 @@ "description": "Luxon validators",

},
"gitHead": "883052983f33664439c1baae629ed5f6d53cbdcb"
"gitHead": "dcae3dd01e676de15d600898de5188c8384cb360"
}
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