Socket
Socket
Sign inDemoInstall

obfuscate

Package Overview
Dependencies
13
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.7

6

package.json
{
"name": "obfuscate",
"version": "0.0.5",
"version": "0.0.7",
"description": "An intelligent function to obfuscate any contact link",

@@ -23,2 +23,3 @@ "main": "dist/obfuscate.js",

"watch": "babel -w -d dist src",
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write 'src/**/*.js'",
"test": "no tests yet!",

@@ -32,3 +33,4 @@ "preversion": "npm run clean && npm run build",

"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-es2015": "^6.24.1"
"babel-preset-es2015": "^6.24.1",
"prettier": "^1.11.1"
},

@@ -35,0 +37,0 @@ "keywords": [

@@ -33,3 +33,3 @@ # obfuscate

<p>
Email: <a href="obfuscated" style="direction: rtl; unicode-bidi: bidi-override;">looc.notsoc@olleh</a>
Email: <a href="obfuscated">looc.notsoc@olleh</a>
</p>

@@ -43,2 +43,2 @@ ```

</p>
```
```

@@ -1,6 +0,6 @@

import assert from 'assert-ok';
import array from 'cast-array';
import filter from 'object-filter';
import qs from 'query-string';
import bel from 'bel';
import assert from 'assert-ok'
import array from 'cast-array'
import filter from 'object-filter'
import qs from 'query-string'
import bel from 'bel'

@@ -15,4 +15,4 @@ export default function obfuscate(options) {

subject: options.subject,
body: options.body
};
body: options.body,
}

@@ -25,37 +25,34 @@ const styles = `

unicode-bidi: isolate-override;
`;
`
const email = mailto.email;
const email = mailto.email
mailto = filter(mailto, Boolean)
delete mailto.email
const querystring = qs.stringify(mailto);
const querystring = qs.stringify(mailto)
const link = `mailto:${email || ''}${querystring
? '?' + querystring
: ''}`;
return bel `<a dir="rtl" style=${styles} onclick="${ () => {
handleClick(event, link)}}" href="obfuscated">${reverse(email)}</a>`
};
const link = `mailto:${email || ''}${querystring ? '?' + querystring : ''}`
return bel`<a dir="rtl" style=${styles} onclick="${() => {
handleClick(event, link)
}}" href="obfuscated">${reverse(email)}</a>`
}
function addresses(e) {
return e
? array(e).join(',')
: undefined
}
function addresses(e) {
return e ? array(e).join(',') : undefined
}
function reverse(s) {
return s
.split("")
.reverse()
.join("");
}
function reverse(s) {
return s
.split('')
.reverse()
.join('')
}
function wait(e) {
e.preventDefault();
}
function wait(e) {
e.preventDefault()
}
function handleClick(e, l) {
e.preventDefault()
window.location.href = l
}
function handleClick(e, l) {
e.preventDefault()
window.location.href = l
}
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