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

jsonpolice

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonpolice - npm Package Compare versions

Comparing version 10.0.0 to 10.0.1

10

dist/schema.js

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

case 'string':
found = typeof data === 'string';
found = typeof data === 'string' || data instanceof Date;
break;

@@ -244,2 +244,4 @@ default:

patternValidator(data, spec, path, opts) {
if (data instanceof Date)
data = data.toISOString();
if (typeof data === 'string') {

@@ -256,2 +258,8 @@ if (typeof spec.pattern !== 'string') {

formatValidator(data, spec, path, opts) {
if (data instanceof Date) {
data = data.toISOString();
if (spec.format === 'date') {
data = data.substring(0, 10);
}
}
if (typeof data === 'string') {

@@ -258,0 +266,0 @@ if (typeof spec.format !== 'string') {

2

package.json
{
"name": "jsonpolice",
"version": "10.0.0",
"version": "10.0.1",
"description": "JSON Schema parser and validator",

@@ -5,0 +5,0 @@ "main": "dist/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