New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@peopleplus/effect-form

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peopleplus/effect-form - npm Package Compare versions

Comparing version

to
0.1.1

2

dist/FormSchema.d.ts
import { Schema } from '@effect/schema';
export declare const Date: Schema.refine<Date, Schema.Schema<Date, string, never>>;
export type BooleanLiteral = typeof Boolean.Encoded;
export declare const booleanFromLiteral: (value: BooleanLiteral) => value is "true" | "on";
interface Boolean extends Schema.Schema<boolean, 'true' | 'false' | 'on' | 'off'> {

@@ -4,0 +6,0 @@ }

3

dist/FormSchema.js
import { Schema } from '@effect/schema';
export const Date = Schema.Date.annotations({ jsonSchema: { format: 'date' } });
export const booleanFromLiteral = (value) => value === 'true' || value === 'on';
export const Boolean = Schema.transform(Schema.Literal('true', 'false', 'on', 'off'), Schema.Boolean, {
encode: (value) => (value ? 'true' : 'false'),
decode: (value) => value === 'true' || value === 'on',
decode: booleanFromLiteral,
}).annotations({ identifier: 'Boolean' });
{
"name": "@peopleplus/effect-form",
"version": "0.1.0",
"version": "0.1.1",
"types": "./dist/index.d.ts",

@@ -18,7 +18,7 @@ "exports": "./dist/index.js",

"prettier": "^3.3.3",
"publint": "^0.2.10",
"publint": "^0.2.11",
"typescript": "^5.6.2"
},
"dependencies": {
"@effect/schema": "^0.72.3",
"@effect/schema": "^0.73.0",
"effect": "^3.6.6"

@@ -25,0 +25,0 @@ },