Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function incNetMap (inc) {
  2. inc = parseInt(inc);
  3. return netMap.split("\n").map((line) => {
  4. if (line.trim() === '') return line;
  5. if (line.startsWith("#")) return line;
  6. return line.trim().split(" ").map((dev) => {
  7. var d = dev.split(":");
  8. return (parseInt(d[0]) + inc).toString() + ":" + d[1]
  9. }).join(" ")
  10. }).join("\n");
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement