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.
@inato/effect-fpts-interop
Advanced tools
Helper functions to interoperate between the Effect framework and the fp-ts library
Helper functions to interoperate between the Effect type and the ReaderTaskEither type.
[!NOTE] This repository acts as supporting document for this article that describe how at Inato we successfully migrated to Effect.
You can install this package via pnpm:
pnpm install @inato/effect-fpts-interop
import {
getFptsMapping,
portToEffect,
type FptsAccess,
type FptsConvertible,
} from "@inato/effect-fpts-interop";
interface MeasureString extends FptsConvertible<"measureString"> {
measure: (value: string) => ReaderTaskEither<unknown, Error, number>
}
interface MeasureStringAccess extends FptsAccess<MeasureString> { }
declare const MeasureStringFpts: {
measure: (value: string) => ReaderTaskEither<MeasureString, Error, number>
}
const Tag = Context.GenericTag<MeasureString>("MeasureString")
const MeasureString = portToEffect(
MeasureStringFpts,
getFptsMapping(Tag, "measureString")
)
MeasureString.measure("hello 👋") // Effect<number, Error, MeasureString>
import {
getFptsMapping,
portToFpts,
type FptsAccess,
type FptsConvertible,
} from "@inato/effect-fpts-interop";
interface MeasureString extends FptsConvertible<"measureString"> {
measure: (value: string) => Effect<number, Error>
}
interface MeasureStringAccess extends FptsAccess<MeasureString> { }
declare const MeasureStringFpts: {
measure: (value: string) => ReaderTaskEither<MeasureString, Error, number>
}
const Tag = Context.GenericTag<MeasureString>("MeasureString")
const MeasureString = Effect.serviceFunctions(Tag)
const MeasureStringFpts = portToFpts(
MeasureString,
getFptsMapping(Tag, "measureString")
)
MeasureStringFpts.measure("hello 👋") // ReaderTaskEither<MeasureStringAccess, Error, number>
And more.. Have a look at the example section!
FAQs
Helper functions to interoperate between the Effect framework and the fp-ts library
The npm package @inato/effect-fpts-interop receives a total of 6,085 weekly downloads. As such, @inato/effect-fpts-interop popularity was classified as popular.
We found that @inato/effect-fpts-interop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.