{"library":"node-modules","title":"Node Modules CLI and Library","description":"The `node-modules` package provides both a command-line interface (CLI) tool and a Node.js module for searching `node-modules.com`. Its primary functionality involves querying the site for packages, with an option to personalize results based on GitHub follows or stars. The current stable version is 1.0.1. Given its age and reliance on `node-modules.com` (which is no longer a primary source for package discovery, superseded by npmjs.com), the package has likely ceased active development. It does not appear to follow a regular release cadence and is designed for an ecosystem context that has largely evolved, making its key differentiator (integration with `node-modules.com`) less relevant today.","language":"javascript","status":"abandoned","last_verified":"Tue Apr 21","install":{"commands":["npm install node-modules"],"cli":null},"imports":["const search = require('node-modules');","require('node-modules/cli'); // or similar for programmatic CLI access","search('query').on('data', handler);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const search = require('node-modules');\n\n// Search for 'test framework' packages\n// Replace 'mafintosh' with your GitHub username if personalizing.\nconst stream = search('test framework', { username: 'mafintosh' });\n\nconsole.log('Searching for packages...');\n\nstream.on('data', function(result) {\n  // result is an object containing package information\n  console.log(`- ${result.name} (v${result.version || 'N/A'}): ${result.description || 'No description'}`);\n});\n\nstream.on('end', function() {\n  console.log('--- Search complete. No more results. ---');\n});\n\nstream.on('error', function(err) {\n  console.error('An error occurred during search:', err.message);\n  if (err.message.includes('ECONNREFUSED') || err.message.includes('ENOTFOUND')) {\n    console.error('This might be due to node-modules.com being unavailable or unreachable.');\n  }\n});","lang":"javascript","description":"Demonstrates how to use the `node-modules` library to perform a search and process the streamed results, including basic error handling.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}