Socket
Socket
Sign inDemoInstall

bmlet

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

bmlet

Encoding and decoding for bookmarklets.


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

bmlet

Encoding and decoding for bookmarklets.

Home | MIT License | v1.0.0

Bookmarklets don't need to be a mess. The key is insulating yourself from what the browser stores with an encode/decode step. That's what bmlet provides. bmlet encode transforms a normal JS file into a bookmarklet, bmlet decode recovers the original file. Your code doesn't need to deal with bookmarklet quirks like URI-encoding or the implicit document.write, and also gets its own namespace, strict mode, and automatic uncaught error display.

Setup

npm install --global bmlet

CLI

bmlet encode

Encodes stdin, outputs to stdout.

bmlet decode

Decodes stdin, outputs to stdout. Only works on bookmarklets created using this library.

API

bmlet.encode(code: string): string

Encodes code, returns the result.

bmlet.decode(bookmarklet: string): string

Decodes bookmarklet, returns the result. Only works on bookmarklets created using this library.

FAQs

Package last updated on 23 Oct 2017

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