Registry / http-networking / changed-http

changed-http

JSON →
library0.0.3jsnpmunverified

Polls HTTP/HTTPS resources and fires events when the response body changes. Version 0.0.3 is the latest (and only) release as of early 2013, with no updates since. Minimalist library using Node.js http/https modules, gzip decoding, and a custom compare function. Unlike general-purpose polling libraries, it is specifically scoped to monitoring HTTP content changes. No longer maintained; consider using newer alternatives or the built-in fetch with manual polling.

npm install changed-http
INSTALL
IMPORT
SIG · CHANGED-HTTP
C
changed-http
http-networkingjavascriptv0.0.3
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

changed
✓ const changed = require('changed-http');
✗ import changed from 'changed-http';
Only CommonJS (require) is supported; no ESM exports. No default export; the require returns the module object.
Resource
✓ const { Resource } = require('changed-http');
✗ const { Resource } = require('changed-http').Resource;
Resource is a named property of the required object, but also accessible via changed.Resource.
logger
✓ changed.logger = winston;
✗ changed.logger = 'custom logger';
logger is a property on the module object itself; it expects a logger object (e.g., winston) with .info method.

Creates a Resource polling http://example.com every 5 seconds, logs 'Resource changed!' when body changes. Demonstrates event-based monitoring.

const changed = require('changed-http'); const resource = new changed.Resource('http://example.com', { compare: function(current, previous) { return current !== previous; } }); resource.on('changed', function(current, previous) { console.log('Resource changed!'); }); resource.startPolling(5000);
changed-http --version
Debug
Known issues
gotchaPackage is unmaintained; no updates since 2013. May have unresolved HTTP parsing issues or vulnerabilities.
fix
Consider using modern alternatives like node-fetch with manual polling or chokidar for file changes.
affects: 0.0.3
gotchaNo TypeScript types. No d.ts files; using with TS requires manual type declarations.
fix
Create a custom .d.ts file or use as any.
affects: 0.0.3
gotchaThe compare function overrides the default string comparison. If it returns false in a truthy check, no 'changed' event fires.
fix
Ensure compare returns a boolean: true if changed, false otherwise.
affects: 0.0.3
gotchastartPolling() only accepts one argument (interval). It does not check for valid number; passing undefined or null uses default 10000ms.
fix
Always pass a positive number.
affects: 0.0.3
Errors
Common errors & fixes
Error: Cannot find module 'changed-http'
Package not installed correctly; old package name or npm install used wrong syntax.
fix
npm install robinjmurphy/changed
TypeError: changed.Resource is not a constructor
Import as default using import statement; no default export.
fix
Use const changed = require('changed-http'); then new changed.Resource(...)
TypeError: resource.on is not a function
Missing new keyword when constructing Resource.
fix
Use new changed.Resource(url, options)
AssertionError: false == true (in compare function)
Custom compare function returns a falsy value when change is detected, or truthy when no change.
fix
Return true when content differs, false otherwise.
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
21
Amazon
1
OpenAI (training)
1
Resources
changed-http — npm install changed-http · libregistry