Socket
Socket
Sign inDemoInstall

munge

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

munge

a tiny node module to munge any strings. useful if wou want to obfuscate email addresses to valid, numeric html entities.


Version published
Weekly downloads
19
decreased by-17.39%
Maintainers
1
Weekly downloads
 
Created
Source

munge

ummm, just a tiny node module to munge any strings. useful if wou want to obfuscate email addresses to valid, numeric html entities.

as long as spam robots are still dumb, this should significantly reduce the risk of the email address being harvested.

simple example

by default, munge() encodes each char with a random encoding, either ascii or unicode, to make it more difficult for spammers.

because of the random generator the example below does not always produce the same output:

var munge = require('munge');

console.log(munge('spacemonkey@moon.com'));

might output something like:

spacemonkey@moon.com

this is valid html code!

based on rfc1866, ftp://ftp.rfc-editor.org/in-notes/rfc1866.txt

more examples

ascii encoding only

var munge = require('munge');

console.log(munge('spacemonkey@moon.com', {encoding: 'ascii'}));

should output the string with ascii encodings like that:

spacemonkey@moon.com

utf8 encoding only

var munge = require('munge');

console.log(munge('spacemonkey@moon.com', {encoding: 'utf8'}));

outputs the same blurb but in unicode:

spacemonkey@moon.com

todo

  • express/jade integration
  • have it a piped stream instead (for larger strings; not sure if it makes sense here)

license

MIT

Keywords

FAQs

Package last updated on 04 Feb 2013

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