Socket
Socket
Sign inDemoInstall

baffle

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    baffle

A tiny, dependency-free utility for obfuscating and revealing text.


Version published
Weekly downloads
205
increased by91.59%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

baffle.js

baffle is a tiny (~1.6kb) javascript utility for obfuscating and revealing text in DOM elements.

Getting Started

Step 0: Install

Download the latest release or install with npm.

npm install --save baffle
Step 1: Reference

If you linked baffle directly in your HTML, you'll find baffle at window.baffle. If you're using a module bundler, you'll need to import baffle.

// CommonJS
let baffle = require('baffle');

// ES6
import baffle from 'baffle';
Step 2: Initialize

To initialize baffle, all you need to do is call it with a selector. You'll want to keep a reference to the instance.

// Attaches baffle to any DOM element with class 'baffle'.
let b = baffle('.baffle');
Step 3: Use It

Once you have a baffle instance, you have access to all of the baffle methods. Usually, you'll want to b.start() and, eventually, b.reveal().

// Start obfuscating...
b.start();
// ...and eventually reveal.
b.reveal();

FAQs

Last updated on 26 Jul 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc