git404hub

what is custom-function fr?

patrickjs/custom-function — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2024-11-05

1Audience · developerComplexity · 3/5StaleSetup · easy

tl;dr

A small library that lets you create custom functions with class-like features (methods, private fields, super calls) without unsafely extending Function.

vibe map

mindmap
  root((custom-function))
    Inputs
      Plain function
      Any constructor
    Outputs
      Callable class-like object
      Extended constructors
    Use Cases
      Build callable validators
      Extend HTMLDivElement
    Tech Stack
      JavaScript
    Audience
      Developer

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Build a callable validator function that also exposes methods like .withMessage() or .optional().

VIBE 2

Give a function private fields, getters, setters, and super calls like a regular class.

VIBE 3

Use the factory export to safely extend other hard-to-extend constructors, like HTMLDivElement.

VIBE 4

Build a DSL where functions need to behave like objects with internal state.

what's the stack?

JavaScript

how it stacks up fr

patrickjs/custom-function0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScript
Last pushed2024-11-05
MaintenanceStale
Setup difficultyeasyhardeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

Aimed at framework/library authors rather than typical app developers.

License is not stated in the available content.

prompts (copy fr)

prompt 1
Show me how to use this custom-function library to make a callable validator with a .withMessage() method.
prompt 2
Explain how this library avoids calling the real Function constructor while still giving functions class features.
prompt 3
Help me use the factory export from this repo to extend HTMLDivElement safely.
prompt 4
Compare this library's approach to using Object.defineProperties for adding methods to a function.

Frequently asked questions

what is custom-function fr?

A small library that lets you create custom functions with class-like features (methods, private fields, super calls) without unsafely extending Function.

Is custom-function actively maintained?

Stale — no commits in 1-2 years (last push 2024-11-05).

What license does custom-function use?

License is not stated in the available content.

How hard is custom-function to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is custom-function for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.