首页 > flip.js 的原理是什么?

flip.js 的原理是什么?

https://github.com/threepointone/exercises/blob/solutions/async/index.js

做题时想参考下官方答案,结果看到这样的代码

nn if you can see this, you need to run this file through flip.js

8%-.+)*o*8,(8/:8}`}*8,(8/:8b
8%-.+)*o-<+<1181}`}-<+<1181b
8%-.+)*o+<:8}`}+<:8b
7(/:)4./}*8,(8/:8u7/*t}"
}}+8)(+/}7(/:)4./u:;t}"
}}}}'<+}9<)<b
}}}}'<+}4/98%}`}mb
}}}}/8%)utb

}}}}7(/:)4./}/8%)ut}"
}}}}}}47}u4/98%}a}7/*o18/6)5t}"
}}}}}}}}7/*B4/98%rr@u7(/:)4./u8++q}>9<)<t}"
}}}}}}}}}}9<)<}`}>9<)<b
}}}}}}}}}}/8%)utb
}}}}}}}} q}9<)<t
}}}}}} }81*8}"
}}}}}}}}:;u/(11q}9<)<tb
}}}}}} 
}}}} 
}} b
 
7(/:)4./}-<+<1181u7/*t}"
}}+8)(+/}7(/:)4./u:;t}"
}}}}'<+})4:2*}`}7/*o18/6)5
}}}}'<+}+8*(1)*}`}/8&}\++<$u)4:2*tb
}}}}7/*o7.+X<:5u7(/:)4./u7/q}4t}"
}}}}}}7/u7(/:)4./u8++q}9<)<t}"
}}}}}}}}+8*(1)*B4@}`}9<)<b
}}}}}}}}47}upp)4:2*}a`}mt}"
}}}}}}}}}}:;u/(11q}+8*(1)*tb
}}}}}}}} 
}}}}}} tb
}}}} tb
}} b
 
7(/:)4./}+<:8u7/*t}"
}}+8)(+/}7(/:)4./u:;t}"
}}}}'<+}+</}`}7<1*8b
}}}}7/*o7.+X<:5u7(/:)4./u7/t}"
}}}}}}7/u7(/:)4./u8++q}9<)<t}"
}}}}}}}}47}u|+</t}"
}}}}}}}}}}+</}`})+(8b
}}}}}}}}}}:;u/(11q}9<)<tb
}}}}}}}} 
}}}}}} tb
}}}} tb
}} b

不是看到flip.js源码了吗?难道还看不懂nodejs么?

作者卖关子,故特意做了以下声明:

Please don't publicize this branch, if people really want to know how
to solve something then they'll find this themselves or ask someone
else.

作者啊!

主啊,请原谅我吧,我不能说再多了。


貌似不难,从 flip.js 源码来看,就是个简单的替换式密码而已。

// 密码表
var str = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}';

// 生成替换密码表,规则很简单,头尾字符相替换。
str.split('').forEach(function(ch, i) {
  map[str[i]] = str[str.length - 1 - i];
});
【热门文章】
【热门文章】