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
addStepsAttachments(fileName, folder, callback) { | |
fileName = '12345'; | |
fs.readdir(folder, 'utf8', function(err, filesList) { | |
if (!err && filesList.length > 0) { | |
const results = []; | |
const matchingFiles = filesList | |
.filter(file => file.startsWith(fileName)) | |
.map(file => path.resolve(folder, file)); | |
// just in case there were no matching files |
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
/** | |
* Code which I test on twitter.com | |
* Both tests were runing in Chrome 35.x dev tools | |
* | |
* This test just gets all a tags from html and read their content | |
* and then write it on end of document (body element) | |
* | |
**/ | |