Socket
Socket
Sign inDemoInstall

figue

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figue - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

12

dist/index.d.ts

@@ -26,4 +26,14 @@ interface SchemaObjFloat extends SchemaObjBase<number> {

declare type SchemaObj = SchemaObjInteger | SchemaObjEnum | SchemaObjFloat | SchemaObjAny | SchemaObjString | SchemaObjBoolean;
interface SchemaObjCustom extends SchemaObjBase<unknown> {
format: 'custom';
validate?: (value: unknown) => boolean;
coerce?: (value: unknown) => unknown;
}
interface SchemaObjArray extends SchemaObjBase<string[]> {
format: 'array';
}
declare type SchemaObj = SchemaObjInteger | SchemaObjEnum | SchemaObjFloat | SchemaObjAny | SchemaObjString | SchemaObjBoolean | SchemaObjCustom | SchemaObjArray;
interface SchemaObjBase<T> {

@@ -30,0 +40,0 @@ doc?: string;

2

package.json
{
"name": "figue",
"version": "1.1.2",
"version": "1.2.0",
"description": "Platform agnostic configuration management library, with environmental variables and validation, like convict",

@@ -5,0 +5,0 @@ "funding": "https://github.com/sponsors/CorentinTh",

@@ -307,2 +307,22 @@ # Figue

<tr>
<td>Custom</td>
<td>You can define your own validation and coercion function</td>
<td>
```js
{
foo: {
doc: 'Array of things',
format: 'custom',
validate: (value) => _.isString(value)
coerce: (value) => value.split('-')
default: 'a-b-c',
}
}
```
</td>
</tr>
<tr>
<td>Any </td>

@@ -309,0 +329,0 @@ <td>It can be anything</td>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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