Advertisement
Guest User

Untitled

a guest
Sep 28th, 2020
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. const fs = require('fs');
  2. function fsReadUrls() {
  3. let links = []
  4. const str = fs.readFileSync('urls/test.txt', 'utf8');
  5. strLength = str.split('\r\n').length;
  6. for (var i = 0; i < strLength; i++) {
  7. links.push(str.split('\r\n')[i]);
  8. }
  9. console.log(links)
  10. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement