Socket
Socket
Sign inDemoInstall

jaz-ts-utils

Package Overview
Dependencies
11
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.7.1 to 7.8.0

1

dist/load-config.d.ts

@@ -5,2 +5,3 @@ import { Static, TObject } from "@sinclair/typebox";

filePath?: string;
config?: Static<T>;
schema: T;

@@ -7,0 +8,0 @@ };

@@ -12,2 +12,3 @@ "use strict";

filePath: "config.json",
config: undefined,
};

@@ -26,4 +27,10 @@ const ajv = new ajv_1.default({

const validator = ajv.compile(finalOptions.schema);
const configFile = await fs_1.default.promises.readFile(finalOptions.filePath, { encoding: "utf-8" });
const config = JSON.parse(configFile);
let config;
if (finalOptions.config) {
config = finalOptions.config;
}
else {
const configFile = await fs_1.default.promises.readFile(finalOptions.filePath, { encoding: "utf-8" });
config = JSON.parse(configFile);
}
const isValid = validator(config);

@@ -30,0 +37,0 @@ if (!isValid) {

2

package.json
{
"name": "jaz-ts-utils",
"version": "7.7.1",
"version": "7.8.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc