Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/endofunctor/src/exportable/wrap.ts>wrap

🌐 Vixeny: At the forefront of modern web development, Vixeny stands as a runtime-independent, efficiency-driven library dedicated to upholding the principles of functional purity. It's crafted to empower developers with a robust foundation for creating scalable, maintainable, and high-performance web applications.
Latest
variable wrap
import { wrap } from "https://deno.land/x/endofunctor@v0.1.30/src/exportable/wrap.ts";

wrap is a key utility function in Vixeny for safeguarding and encapsulating Petitions, particularly when they are exported, composed, mocked, or altered. This encapsulation maintains the purity of your code by ensuring that Petitions remain modular and protected from unintended modifications.

Examples

Example 1

const options = {...} // Optional<funRouterOptions>
// Exporting a standard Petition
export const root = wrap(options)()
  .stdPetition({
    path: "/",
    f: () => "helloWorld",
  })

type

<FC extends CyclePluginMap, O extends WrapOptions<FC>>(o?: O) => unknown