Timemachine (Date Mocking)

JSON →
library 0.3.2 ·javascript abandoned
verified May 27, 2026

Timemachine is a JavaScript utility designed to facilitate testing of time-dependent applications by overriding the native `Date` object. The package is currently at version 0.3.2, with its last known publication being over six years ago, indicating an abandoned status. It provides a straightforward API to configure a specific date, timestamp, or a time offset, and can optionally simulate a continuously ticking clock, which is useful for testing dynamic time displays or intervals. A key differentiator for Timemachine is its broad compatibility, supporting global namespaces, RequireJS, CommonJS, and NodeJS environments, making it suitable for older or mixed JavaScript projects. Its core functionality involves directly monkey-patching the global `Date` constructor and its prototypes, allowing for precise control over time within test scenarios where time manipulation is critical.

total hits 15
actors 6 distinct systems
last hit 1d ago MetaBot
GPTBot
5
MetaBot
4
Script
1
Search engines
2

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