@typeonly/validator
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -14,6 +14,6 @@ "use strict"; | ||
function createValidatorSync(options) { | ||
return createValidatorFromModules(loader_1.readModules(options), options); | ||
return createValidatorFromModules(loader_1.loadModules(options), options); | ||
} | ||
async function createValidatorAsync(options) { | ||
return createValidatorFromModules(await loader_1.readModules(options), options); | ||
return createValidatorFromModules(await loader_1.loadModules(options), options); | ||
} | ||
@@ -20,0 +20,0 @@ function createValidatorFromModules(modules, options) { |
{ | ||
"name": "@typeonly/validator", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "An API to validate JSON data or JavaScript objects, using TypeScript typing definitions.", | ||
@@ -18,3 +18,3 @@ "author": "Paroi", | ||
"dependencies": { | ||
"@typeonly/loader": "^0.5.0" | ||
"@typeonly/loader": "^0.5.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
@@ -1,2 +0,2 @@ | ||
import { AsyncReadModulesOptions, isSyncReadModulesOptions, Modules, readModules, SyncReadModulesOptions } from "@typeonly/loader" | ||
import { AsyncReadModulesOptions, isSyncReadModulesOptions, loadModules, Modules, SyncReadModulesOptions } from "@typeonly/loader" | ||
import Validator from "./Validator" | ||
@@ -26,7 +26,7 @@ | ||
function createValidatorSync(options: SyncReadModulesValidatorOptions): TypeOnlyValidator { | ||
return createValidatorFromModules(readModules(options), options) | ||
return createValidatorFromModules(loadModules(options), options) | ||
} | ||
async function createValidatorAsync(options: AsyncReadModulesValidatorOptions): Promise<TypeOnlyValidator> { | ||
return createValidatorFromModules(await readModules(options), options) | ||
return createValidatorFromModules(await loadModules(options), options) | ||
} | ||
@@ -33,0 +33,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { readModules } from "@typeonly/loader" | ||
import { loadModules } from "@typeonly/loader" | ||
import { createStandaloneRtoModule, parseTypeOnly } from "typeonly" | ||
@@ -12,3 +12,3 @@ import { createValidator, createValidatorFromModules } from "../src/api" | ||
` | ||
const modules = await readModules({ | ||
const modules = await loadModules({ | ||
modulePaths: ["./mod1"], | ||
@@ -205,3 +205,3 @@ rtoModuleProvider: async () => createStandaloneRtoModule({ | ||
` | ||
const modules = await readModules({ | ||
const modules = await loadModules({ | ||
modulePaths: ["./mod1"], | ||
@@ -208,0 +208,0 @@ rtoModuleProvider: async () => createStandaloneRtoModule({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Updated@typeonly/loader@^0.5.1