Safe Monkeypatching for JavaScript

JSON →
library 1.2.1 ·javascript maintenance
verified May 27, 2026

The `shimmer` package (version 1.2.1) is a JavaScript utility designed for safe monkeypatching of functions, primarily within Node.js CommonJS environments. It provides a set of tools, including `wrap`, `massWrap`, `unwrap`, and `massUnwrap`, to intercept and augment the behavior of existing functions on objects or entire modules. The library's core philosophy is to add behavior around an original function, rather than replacing it, and includes important guidelines for maintaining function integrity (e.g., preserving return values, not altering async/sync nature). Released approximately seven years ago, its current status suggests it is in maintenance mode rather than active development. It differentiates itself by providing explicit safety mechanisms and logging for potential issues during monkeypatching, defaulting to `console.error` for non-throwing error reporting. This makes it suitable for extending or observing existing Node.js module functionality with reduced risk compared to direct function reassignment.

total hits 15
actors 7 distinct systems
last hit 4d ago MJ12bot
GPTBot
5
MetaBot
4
Script
1
ClaudeBot
1
Search engines
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇴 Norway