Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
adria-parser
Advanced tools
A super simple library for parsing form data and search params. It makes it easy to narrow the type and convert the input to something useful before doing the validation.
npm i adria-parser
yarn add adria-parser
pnpm add adria-parser
import { parse } from "adria-parser";
const formData = new FormData();
// intellisense
const { username, age, profile_image, birthday interests } = parse(formData, {
username: "string",
age: "number",
profile_image: "file",
birthday: "date",
interests: "array.string",
});
// null if empty or can't be converted to defined type
// username: string | null
// age: number | null
// profile_image: File | null
// birthday: Date | null
// interests: string[]
const parse: (
input: FormData | URLSearchParams,
schema: Record<string, InputType>
) => Record<string, any>;
The result will be a FieldName:DefinedType | null
record, where it's null
if the field didn't exist or it couldn't coerce the input to the defined type.
InputType
PrimitiveType
${CompoundType}.${PrimitiveType}
PrimitiveType
string
=> string
number
=> number
boolean
=> boolean
date
=> Date
file
=> File
CompoundType
array
=> T[]
FAQs
A super simple library for parsing form data and search params
We found that adria-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.