UNPKG

236 BJavaScriptView Raw
1"use strict";
2
3// http://stackoverflow.com/q/617647
4module.exports = function(str) {
5 return str.replace(/[a-zA-Z]/g, function(a) {
6 return String.fromCharCode(((a = a.charCodeAt()) < 91 ? 78 : 110) > a ? a + 13 : a - 13);
7 });
8};