前端封装的sdk 优秀范例

/** * 构造函数 * @param {string} apiKey - API Key */ function MySDK(apiKey) { this.apiKey = apiKey; this.apiUrl = 'https://api.example.com'; } /...

实用的一行代码Javascript

**获取浏览器Cookie的值通过document.cookie 来查找cookie值** const cookie = name => `; ${document.cookie}`.split(`; ${name}=`).pop().split(';').shift(); co...

node-sass 编译报错问题的解决

registry=https://registry.npmmirror.com sass_binary_site=https://npmmirror.com/mirrors/node-sass/ phantomjs_cdnurl=https://npmmirror.com/mir...

Chrome 弹出 调试无限循环问题

(function anonymous( ) { debugger }) 一步步debugger,发现是chrome 插件 PositiveAnalyzer 广告病毒引起 解决方案:SpyHunter的软件清理干净吧。别无他法。手动清除太慢。