posthtml-obfuscate
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,2 +0,2 @@ | ||
{"/Users/maraisr/Sites/github/posthtml-obfuscate/lib/index.js": {"path":"/Users/maraisr/Sites/github/posthtml-obfuscate/lib/index.js","statementMap":{"1":{"start":{"line":2,"column":1},"end":{"line":4,"column":13}},"2":{"start":{"line":3,"column":2},"end":{"line":3,"column":33}},"3":{"start":{"line":7,"column":0},"end":{"line":28,"column":1}},"4":{"start":{"line":8,"column":1},"end":{"line":27,"column":2}},"5":{"start":{"line":9,"column":2},"end":{"line":26,"column":5}},"6":{"start":{"line":10,"column":3},"end":{"line":23,"column":4}},"7":{"start":{"line":11,"column":13},"end":{"line":20,"column":47}},"8":{"start":{"line":12,"column":5},"end":{"line":19,"column":6}},"9":{"start":{"line":14,"column":7},"end":{"line":14,"column":42}},"10":{"start":{"line":17,"column":7},"end":{"line":17,"column":31}},"11":{"start":{"line":22,"column":4},"end":{"line":22,"column":60}},"12":{"start":{"line":25,"column":3},"end":{"line":25,"column":15}}},"fnMap":{"1":{"name":"obfuscate","decl":{"start":{"line":1,"column":9},"end":{"line":1,"column":18}},"loc":{"start":{"line":1,"column":25},"end":{"line":5,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":2,"column":27},"end":{"line":2,"column":28}},"loc":{"start":{"line":2,"column":34},"end":{"line":4,"column":2}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":18}},"loc":{"start":{"line":7,"column":23},"end":{"line":28,"column":1}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":8,"column":8},"end":{"line":8,"column":9}},"loc":{"start":{"line":8,"column":18},"end":{"line":27,"column":2}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":9,"column":25},"end":{"line":9,"column":26}},"loc":{"start":{"line":9,"column":33},"end":{"line":26,"column":3}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":11,"column":14},"end":{"line":11,"column":15}},"loc":{"start":{"line":11,"column":25},"end":{"line":20,"column":5}}}},"branchMap":{"1":{"loc":{"start":{"line":10,"column":3},"end":{"line":23,"column":4}},"type":"if","locations":[{"start":{"line":10,"column":3},"end":{"line":23,"column":4}},{"start":{"line":10,"column":3},"end":{"line":23,"column":4}}]}},"s":{"1":2,"2":33,"3":1,"4":2,"5":2,"6":2,"7":1,"8":1,"9":1,"10":1,"11":1,"12":2},"f":{"1":2,"2":33,"3":2,"4":2,"5":2,"6":1},"b":{"1":[1,1]},"hash":"b37721b2e4cc70dd79cef88501f8bc84ea09636f"} | ||
{"/Users/maraisr/Sites/github/posthtml-obfuscate/lib/index.js": {"path":"/Users/maraisr/Sites/github/posthtml-obfuscate/lib/index.js","statementMap":{"1":{"start":{"line":3,"column":1},"end":{"line":5,"column":13}},"2":{"start":{"line":4,"column":2},"end":{"line":4,"column":33}},"3":{"start":{"line":8,"column":0},"end":{"line":37,"column":1}},"4":{"start":{"line":9,"column":1},"end":{"line":21,"column":4}},"5":{"start":{"line":10,"column":2},"end":{"line":16,"column":3}},"6":{"start":{"line":11,"column":3},"end":{"line":15,"column":4}},"7":{"start":{"line":12,"column":4},"end":{"line":14,"column":5}},"8":{"start":{"line":13,"column":5},"end":{"line":13,"column":27}},"9":{"start":{"line":18,"column":2},"end":{"line":18,"column":13}},"10":{"start":{"line":23,"column":1},"end":{"line":36,"column":2}},"11":{"start":{"line":24,"column":2},"end":{"line":35,"column":5}},"12":{"start":{"line":25,"column":3},"end":{"line":32,"column":4}},"13":{"start":{"line":26,"column":4},"end":{"line":31,"column":47}},"14":{"start":{"line":27,"column":5},"end":{"line":30,"column":7}},"15":{"start":{"line":34,"column":3},"end":{"line":34,"column":15}}},"fnMap":{"1":{"name":"obfuscate","decl":{"start":{"line":1,"column":9},"end":{"line":1,"column":18}},"loc":{"start":{"line":1,"column":25},"end":{"line":6,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":27},"end":{"line":3,"column":28}},"loc":{"start":{"line":3,"column":34},"end":{"line":5,"column":2}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":8,"column":17},"end":{"line":8,"column":18}},"loc":{"start":{"line":8,"column":29},"end":{"line":37,"column":1}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":9,"column":11},"end":{"line":9,"column":12}},"loc":{"start":{"line":9,"column":31},"end":{"line":19,"column":2}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":23,"column":8},"end":{"line":23,"column":9}},"loc":{"start":{"line":23,"column":18},"end":{"line":36,"column":2}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":24,"column":25},"end":{"line":24,"column":26}},"loc":{"start":{"line":24,"column":33},"end":{"line":35,"column":3}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":26,"column":39},"end":{"line":26,"column":40}},"loc":{"start":{"line":26,"column":48},"end":{"line":31,"column":5}}}},"branchMap":{"1":{"loc":{"start":{"line":10,"column":2},"end":{"line":16,"column":3}},"type":"if","locations":[{"start":{"line":10,"column":2},"end":{"line":16,"column":3}},{"start":{"line":10,"column":2},"end":{"line":16,"column":3}}]},"2":{"loc":{"start":{"line":12,"column":4},"end":{"line":14,"column":5}},"type":"if","locations":[{"start":{"line":12,"column":4},"end":{"line":14,"column":5}},{"start":{"line":12,"column":4},"end":{"line":14,"column":5}}]},"3":{"loc":{"start":{"line":12,"column":8},"end":{"line":12,"column":55}},"type":"binary-expr","locations":[{"start":{"line":12,"column":8},"end":{"line":12,"column":32}},{"start":{"line":12,"column":36},"end":{"line":12,"column":55}}]},"4":{"loc":{"start":{"line":25,"column":3},"end":{"line":32,"column":4}},"type":"if","locations":[{"start":{"line":25,"column":3},"end":{"line":32,"column":4}},{"start":{"line":25,"column":3},"end":{"line":32,"column":4}}]},"5":{"loc":{"start":{"line":28,"column":6},"end":{"line":28,"column":88}},"type":"cond-expr","locations":[{"start":{"line":28,"column":29},"end":{"line":28,"column":57}},{"start":{"line":28,"column":60},"end":{"line":28,"column":88}}]}},"s":{"1":4,"2":59,"3":1,"4":3,"5":3,"6":1,"7":1,"8":1,"9":3,"10":3,"11":3,"12":3,"13":2,"14":2,"15":3},"f":{"1":4,"2":59,"3":3,"4":3,"5":3,"6":3,"7":2},"b":{"1":[1,2],"2":[1,0],"3":[1,1],"4":[2,1],"5":[1,1]},"hash":"164367f42dc5f68543a8ae68c73b16e41eeb08cc"} | ||
} |
function obfuscate(data) { | ||
// TODO: Don;t charCodeAt for the first 2 characters, and then random 3,5 single chars. | ||
// TODO: Don't charCodeAt for the first 2 characters, and then random 3,5 single chars. | ||
return data.split('').map((v) => { | ||
@@ -4,0 +4,0 @@ return `&#${v.charCodeAt(0)};`; |
{ | ||
"name": "posthtml-obfuscate", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "PostHTML plugin that'll obfuscate emails etc...", | ||
@@ -26,2 +26,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"codecov": "^1.0.1", | ||
"jest": "^15.1.1", | ||
@@ -28,0 +29,0 @@ "posthtml": "^0.9.0" |
# PostHTML Obfuscate | ||
[![NPM version](https://img.shields.io/npm/v/posthtml-obfuscate.svg?style=flat-square)](https://www.npmjs.com/package/posthtml-obfuscate) | ||
[![Travis](https://img.shields.io/travis/maraisr/posthtml-obfuscate.svg?style=flat-square)](https://travis-ci.org/maraisr/posthtml-obfuscate) | ||
[![Codecov](https://img.shields.io/codecov/c/github/maraisr/posthtml-obfuscate.svg?style=flat-square)](https://codecov.io/github/maraisr/posthtml-obfuscate) | ||
Obfuscates emails to make it harder for bots to recognize emails. | ||
Obfuscates emails to make it harder for bots to recognize. | ||
@@ -7,0 +9,0 @@ ### Install |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45970
15
464
45
0
3