Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function incNetMap (inc) {
- inc = parseInt(inc);
- return netMap.split("\n").map((line) => {
- if (line.trim() === '') return line;
- if (line.startsWith("#")) return line;
- return line.trim().split(" ").map((dev) => {
- var d = dev.split(":");
- return (parseInt(d[0]) + inc).toString() + ":" + d[1]
- }).join(" ")
- }).join("\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement