New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rah-emil/fake-chat

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rah-emil/fake-chat

Fake-chat.js is a handy chat emulator

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Fake-chat

npm bundle size YouTube Channel Subscribers npm GitHub GitHub issues

Introduction

Overview

JavaScript / TypeScript plugin for posting messages in your html code. It's project just for fun, for me

Features

  • posting messages with a selected delay

Installation

NPM

To install fake-chat using npm, run the following command in your project's terminal:

npm install @rah-emil/fake-chat
CDN (jsDelivr)

You can also include fake-chat directly in your HTML file using a CDN like jsDelivr:

Add the following script tag to your HTML file:

<script src="https://cdn.jsdelivr.net/npm/@rah-emil/fake-chat@3.0.1/dist/fake-chat.umd.js"></script>

Replace 3.0.1 with the version you want to use. You can find the latest version on the npm package page.

Basic Usage

The plugin has typescript support!

// or window.FakeChat, if you use UMD
import FakeChat from 'fake-chat';

// Select the container element
const chat = document.querySelector('#fake_chat');

// Define your chat options
const chatOptions = {
  // "afterbegin" | "afterend" | "beforebegin" | "beforeend" (default value)
  position: 'beforeend',
  messages: [
    { text: 'Hello!', delay: 1000 },
    { text: 'How are you?', delay: 1500 },
    // Add more messages as needed
  ],
};

// Create an instance of FakeChat and initialize it
const fakeChat = new FakeChat(chat, chatOptions);
fakeChat.init(); // async function

Keywords

FAQs

Package last updated on 28 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc