Socket
Socket
Sign inDemoInstall

@typeonly/validator

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typeonly/validator - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

dist/api.js

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

function createValidator(options) {
if (loader_1.isSyncReadModulesOptions(options))
if ((0, loader_1.isSyncReadModulesOptions)(options))
return createValidatorSync(options);

@@ -15,6 +15,6 @@ else

function createValidatorSync(options) {
return createValidatorFromModules(loader_1.loadModules(options), options);
return createValidatorFromModules((0, loader_1.loadModules)(options), options);
}
async function createValidatorAsync(options) {
return createValidatorFromModules(await loader_1.loadModules(options), options);
return createValidatorFromModules(await (0, loader_1.loadModules)(options), options);
}

@@ -21,0 +21,0 @@ function createValidatorFromModules(modules, options) {

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

valid: false,
error: error_message_1.makeErrorMessage(result.unmatchs)
error: (0, error_message_1.makeErrorMessage)(result.unmatchs)
};

@@ -76,3 +76,3 @@ }

if (type.group === "global") {
if (helpers_1.hasAncestor(val, type.refName))
if ((0, helpers_1.hasAncestor)(val, type.refName))
return { valid: true };

@@ -79,0 +79,0 @@ const cause = `is not a ${type.refName}`;

{
"name": "@typeonly/validator",
"version": "0.5.1",
"version": "0.5.2",
"description": "An API to validate JSON data or JavaScript objects, using TypeScript typing definitions.",

@@ -18,13 +18,13 @@ "author": "Paroi",

"dependencies": {
"@typeonly/loader": "^0.5.1"
"@typeonly/loader": "^0.5.4"
},
"devDependencies": {
"@types/jest": "^25.2.3",
"@types/node": "^12.12.47",
"jest": "^26.0.1",
"@types/jest": "^27.4.1",
"@types/node": "16",
"jest": "^27.5.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.1.0",
"ts-jest": "^27.1.4",
"tslint": "^6.1.2",
"typeonly": "^0.3.3",
"typescript": "^3.9.5"
"typeonly": "^0.4.5",
"typescript": "^4.6.3"
},

@@ -31,0 +31,0 @@ "main": "dist/api.js",

@@ -94,4 +94,4 @@ import { Type } from "@typeonly/loader"

default:
throw new Error(`Unexpected type: ${type!.kind}`)
throw new Error(`Unexpected type: ${(type as Type).kind}`)
}
}
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