{"id":16718691,"url":"https://github.com/planeshifter/node-spam-detector","last_synced_at":"2025-04-10T08:54:06.472Z","repository":{"id":19679543,"uuid":"22933489","full_name":"Planeshifter/node-spam-detector","owner":"Planeshifter","description":"small utility app to detect spam URLs","archived":false,"fork":false,"pushed_at":"2014-08-20T21:21:14.000Z","size":156,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T18:57:24.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Planeshifter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-13T22:35:01.000Z","updated_at":"2021-01-23T14:08:54.000Z","dependencies_parsed_at":"2022-08-24T05:21:07.771Z","dependency_job_id":null,"html_url":"https://github.com/Planeshifter/node-spam-detector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-spam-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-spam-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-spam-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-spam-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Planeshifter","download_url":"https://codeload.github.com/Planeshifter/node-spam-detector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190407,"owners_count":21062277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T21:38:08.010Z","updated_at":"2025-04-10T08:54:06.452Z","avatar_url":"https://github.com/Planeshifter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/spam-detector.svg)](http://badge.fury.io/js/spam-detector)\n[![build status](https://secure.travis-ci.org/Planeshifter/node-spam-detector.png)](http://travis-ci.org/Planeshifter/node-spam-detector)\n\nnode-spam-detector\n======================\n\nThis little module exposes a single function which can be used to check whether a given URL is considered spam after consulting several major domain blacklists. Under the hood, the function first uses the `unshortener` package to \nreduce the URL to its original form in case that it was shortened. It then makes DNS calls to blacklists provided by URIBL, Spamhaus and SURBL.\n\n## Installation \u0026 Loading\n\nThe module can be easily installed via npm:\n\n``` \nnpm install spam-detector\n```\n\nTo use it in a project, require the package with the command \n\n```\nisSpam = require(\"spam-detector\");\n```\n\n## Syntax\n\n### isSpam(url, callback)\n\nThe function has two parameters: The first is the URL which has to be checked, and the second is a callback function of the form `function(err, data)`. The first argument `err` is equal to `null` if no error has occured during checking and an Error object otherwise. The second argument is a Boolean value which evaluates to `true` in case that the supplied URL is considered to be spam and `false` otherwise.\n\nExample: \n\n```\nvar isSpam = require(\"spam-detector\");\nisSpam(\"http://www.github.com\", function(err, data){\nconsole.log(data);\n});\n```\n\nOutput: \n\n```\nfalse\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaneshifter%2Fnode-spam-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplaneshifter%2Fnode-spam-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaneshifter%2Fnode-spam-detector/lists"}