route-decode.js 277 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 const crypto = global.yoho.crypto; const _ = require('lodash'); const decode = _.memoize(function(r) { return crypto.decrypt(null, r); }); module.exports = function(r) { try { let s = decode(r); return s; } catch (e) { return r; } };