
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@prelude-io/core
Advanced tools
This library aims to provide easy to use run- and compiletime type-safety combined with the benefits of immutability through Prelude-ts.
Interop with Prelude-ts is a key feature of this library, but not strictly required for operation.
Prelude-IO's base unit is the Bus<I, O>
class, which provides basic functionality and abstractions around creating reversible data pipelines.
The core library also includes a few basic types to represent most data formats, found here under Presets.
Examples can be found here. Alternatively, here's an overview of some basic functionality:
import * as io from "prelude-io";
import { Predicate } from "prelude-ts";
// Conditional types
const rating = io.number.if(Predicate.of((n) => n > 0 && n <= 5));
// Complex types
const roomType = io.Complex("Room", {
name: io.string.
description: io.Optional(io.string),
rating: rating,
});
// Nesting
const hotelType = io.Complex("Hotel", {
address: io.string,
website: io.string,
rating: rating
rooms: io.Vector(Room)
});
// Deserialising
fetch("http://example.com/hotels.json")
.then(response => response.json())
// (de)serialising
.then(HotelType.deserialise)
.then(hotel => {
// Either-based error handling
if(hotel.isLeft()) {
// Built-in debugger
console.error(io.humanizeErrors(hotel.getLeft()))
} else {
LocalStorage.setItem("hotel", hotel.get())
}
});
You can read typedoc documentation here
npm install --save @prelude-io/core prelude-ts
Either
objects rather than throw exceptionschain
ed or turned into a union
fetch
for runtime type-checking@prelude-io/test
: A set of functions to run basic tests on your data typesfp-ts
.FAQs
Type-save runtime IO library based on PreludeTS
The npm package @prelude-io/core receives a total of 54 weekly downloads. As such, @prelude-io/core popularity was classified as not popular.
We found that @prelude-io/core 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.