44

JS不靠谱系列: 写一个验证过期时间的函数,包含jest单元测试

 5 years ago
source link: https://juejin.im/post/5b615865f265da0faa368103
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言 我们经常用到的token还是cookie,都默认有一个过期时间 我们做鉴权的时候,很依赖这个,所以捣鼓下能不能再严谨点 因为之前都是以后台固定的格式,直接拿到值做一个简单的判断; 那,假如后台传过来的日期格式变了呢!! 有兴趣的瞧瞧,没兴趣的请勿往下走,

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK