This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function foo() { | |
setTimeout(function () { | |
console.log('foo!'); | |
}, this.timeout); | |
} | |
function secure() { | |
value = secured; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.parseCommands = function parseCommands(post, events, callback) { | |
if (typeof callback !== 'function'){ | |
throw new Error('callback must be supplied'); | |
} | |
if (!events || typeof events.emit !== 'function'){ | |
throw new Error('events must be supplied'); | |
} | |
if (!post ||!post.raw){ | |
callback(null, []); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sanitize(text) { | |
var edited = text. | |
// Normalize newlines | |
replace(/\r\n?/g, '\n'). | |
// Remove low-ASCII control chars except \t (\x09) and \n (\x0a) | |
replace(/[\x00-\x08\x0b-\x1f]/g, ''). | |
// Remove GFM-fenced code blocks |
NewerOlder