MCPcopy Index your code
hub / github.com/nodejs/node / mangle

Function mangle

test/fixtures/snapshot/marked.js:1420–1437  ·  view source on GitHub ↗

* mangle email addresses

(text)

Source from the content-addressed store, hash-verified

1418
1419
1420 function mangle(text) {
1421 var out = '',
1422 i,
1423 ch;
1424 var l = text.length;
1425
1426 for (i = 0; i < l; i++) {
1427 ch = text.charCodeAt(i);
1428
1429 if (Math.random() > 0.5) {
1430 ch = 'x' + ch.toString(16);
1431 }
1432
1433 out += '&#' + ch + ';';
1434 }
1435
1436 return out;
1437 }
1438 /**
1439 * Block Lexer
1440 */

Callers 1

marked.jsFile · 0.85

Calls 2

randomMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected