Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

package.json
{
"name": "munge",
"version": "0.1.0",
"description": "a tiny node module to munge any strings. useful if wou want to obfuscate email addresses to valid, numeric html entities.",
"version": "0.1.1",
"description": "a tiny node module to munge any strings. useful if you want to obfuscate email addresses to valid, numeric html entities.",
"main": "munge.js",

@@ -6,0 +6,0 @@ "author": "Michael Heuberger <michael.heuberger@binarykitchen.com> (http://binarykitchen.com)",

@@ -7,3 +7,3 @@ # munge

## simple example
## basic example

@@ -17,3 +17,2 @@ by default, munge() encodes each letter by random - either ascii or unicode - to make it more difficult for spammers.

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

@@ -33,11 +32,10 @@ ```

### ascii encoding only
### ascii
``` js
var munge = require('munge');
console.log(munge('spacemonkey@moon.com', {encoding: 'ascii'}));
```
should output the string with ascii encodings like that:
should encode the string with ascii like that:
```

@@ -47,11 +45,10 @@ &#115;&#112;&#97;&#99;&#101;&#109;&#111;&#110;&#107;&#101;&#121;&#64;&#109;&#111;&#111;&#110;&#46;&#99;&#111;&#109;

### utf8 encoding only
### utf8
``` js
var munge = require('munge');
console.log(munge('spacemonkey@moon.com', {encoding: 'utf8'}));
```
outputs the same blurb but in unicode:
encodes the same blurb but in unicode:
```

@@ -61,3 +58,3 @@ &#x0073;&#x0070;&#x0061;&#x0063;&#x0065;&#x006D;&#x006F;&#x006E;&#x006B;&#x0065;&#x0079;&#x0040;&#x006D;&#x006F;&#x006F;&#x006E;&#x002E;&#x0063;&#x006F;&#x006D;

## jade integration
### jade integration

@@ -73,5 +70,5 @@ good idea. you will want to protect your email address on your contact page.

res.render('contact',
{
emailContact: munge('spacemonkey@moon.com')
}
{
emailContact: munge('spacemonkey@moon.com')
}
);

@@ -78,0 +75,0 @@ };

Sorry, the diff of this file is not supported yet

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