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

configchecker

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configchecker - npm Package Compare versions

Comparing version 1.0.6 to 1.2.0

0

lib/classes/ConfigChecker.d.ts

@@ -0,0 +0,0 @@ import { IConfigSource } from '../interfaces/IConfigSource';

@@ -0,0 +0,0 @@ "use strict";

6

lib/classes/ConfigValue.d.ts

@@ -7,5 +7,5 @@ import { IConfigValueProfile } from '../interfaces/IConfigValueProfile';

constructor(value: TValue, profile: IConfigValueProfile, canBeUndefined?: boolean);
readonly about: string;
private readonly about;
required(): ConfigValue<NonNullable<TValue>>;
default(value: NonNullable<TValue>): ConfigValue<TValue>;
default(value: NonNullable<TValue>): ConfigValue<NonNullable<TValue>>;
custom<TvalueCustom>(conversionType: string, convert: (value: NonNullable<TValue>) => TvalueCustom): ConfigValue<TvalueCustom | undefined>;

@@ -15,4 +15,4 @@ readonly object: {

};
asType<TvalueCustom>(): ConfigValue<TvalueCustom>;
asType<TvalueCustom>(typeChecker?: (value: TValue) => boolean): ConfigValue<TvalueCustom>;
private checkThatValueCanBeUndefinedToPreventMultipleUsageOfRequiredOrDefault;
}

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

get: function () {
return ("\n**Key:** \"" + this.profile.key + "\"\n**Description:** \"" + this.profile.description + "\"\n").trim();
var about = this.profile.key;
if (this.profile.description) {
this.profile.description += "(" + this.profile.description.trim() + "\")";
}
return about;
},

@@ -32,3 +36,3 @@ enumerable: true,

ConfigValue.prototype.custom = function (conversionType, convert) {
if (typeof this.value === 'undefined') {
if (typeof this.value === 'undefined' || this.value === '') {
return new ConfigValue(undefined, this.profile);

@@ -55,3 +59,8 @@ }

// TODO: Strange ts-lint warning Shadowed name: 'T'
ConfigValue.prototype.asType = function () {
ConfigValue.prototype.asType = function (typeChecker) {
if (typeChecker) {
if (!typeChecker(this.value)) {
throw new Error("Value is not in expected format - rejected by type checker function. " + this.about);
}
}
return new ConfigValue(this.value, this.profile);

@@ -58,0 +67,0 @@ };

@@ -0,0 +0,0 @@ import { ConfigValue } from './ConfigValue';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ConfigChecker } from './classes/ConfigChecker';

@@ -0,0 +0,0 @@ "use strict";

export interface IConfigSource {
[key: string]: string | undefined;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -0,0 +0,0 @@ import { ConfigChecker } from '../classes/ConfigChecker';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -0,0 +0,0 @@ export declare function objectDecapitalize<T>(mixedObject: {

@@ -0,0 +0,0 @@ "use strict";

{
"name": "configchecker",
"version": "1.0.6",
"version": "1.2.0",
"description": "Awesome checker of config - fully support typescript, fluent API,...",

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

@@ -0,0 +0,0 @@ # Config Checker

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