New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

kayle-spam

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kayle-spam

latest
Source
npmnpm
Version
1.2.5
Version published
Maintainers
1
Created
Source

kayle-spam

Detect spam in human-readable text.

Usage

Install the package:

npm install kayle-spam

Import the package:

import { identify } from "kayle-spam";

Use the identify function:

const thisIsntSpam = identify("Hello, world!");
console.log(thisIsntSpam); // false

const thisIsSpam = identify("💗 like 💗 this 💗 post 💗");
console.log(thisIsSpam); // true

Options

You can pass an options object to the identify function to add additional mappings:

const isSpam = identify("Hell0, w🌍rld!", {
	additionalMappings: ["🌍"],
});

console.log(isSpam); // true (it contains "🌍" which we passed in the options)

Available options:

  • additionalMappings: An array of strings to be used in the spam detection process. Defaults to [].

Tests

bun test

FAQs

Package last updated on 28 Jan 2025

Related posts