here i have developed railfence in dynamic zic zak patten. https://stackoverflow.com/questions/50864159/stuck-on-decryption-in-new-rail-fence-cipher-zig-zac-patten/50865838#50865838
const railfence = require("rail-fence-v2");
import railfence from "rail-fence-v2"
console.log(railfence.encrypt("Cipher Text")); // encrypt Cipher
console.log(railfence.decrypt(railfence.encrypt("Cipher Text"))); decrept Cipher
}