jsonpolice
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -10,3 +10,3 @@ import { SchemaOptions } from './global'; | ||
abstract schema(): Promise<any>; | ||
abstract validate(data: any, path: string): Promise<any>; | ||
abstract validate(data: any, path?: string): Promise<any>; | ||
protected init(): void; | ||
@@ -24,3 +24,3 @@ default(data?: any): any; | ||
export declare abstract class DynamicSchema extends Schema { | ||
validate(data: any, path: string): Promise<any>; | ||
validate(data: any, path?: string): Promise<any>; | ||
} | ||
@@ -27,0 +27,0 @@ export declare class UntypedSchema extends Schema { |
@@ -242,3 +242,3 @@ "use strict"; | ||
class DynamicSchema extends Schema { | ||
validate(data, path) { | ||
validate(data, path = '') { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -245,0 +245,0 @@ let raw = yield this.schema(); |
{ | ||
"name": "jsonpolice", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "JSON Schema parser and validator", | ||
@@ -14,3 +14,3 @@ "main": "dist/index.js", | ||
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100", | ||
"report-coverage": "cat ./coverage/lcov.info | codecov", | ||
"report-coverage": "cat ./coverage/lcov.info | coveralls", | ||
"watch:test": "npm t -- -w", | ||
@@ -17,0 +17,0 @@ "test": "mocha test/*.test.js", |
Sorry, the diff of this file is not supported yet
92003