Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
移动端LocalStorage缓存资源方案
npm install mobot
mobot.timeout = 10000; // 请求超时10s
mobot.prefix = 'mobot-'; // LocalStorage前缀
mobot.expire = 24 * 7; // 7天的缓存时间
mobot.require([
{
url: 'https://www.xxx.xxx/static/styles.123.css',
key: 'styles',
unique: '123',
cache: true
},
{
url: 'https://www.xxx.xxx/static/vendors.456.js',
key: 'vendors',
unique: '456',
cache: true
},
{
url: 'https://www.xxx.xxx/static/app.789.js',
key: 'app',
unique: '789',
cache: true
}
], function (err, resources) {
// 所有资源均已加载并按顺序插入到了head中
});
// 获取本地缓存资源
mobot.get('app');
// {
// url: string // 资源地址
// key: string // 索引名
// unique: string // hash值
// content: string // 资源内容
// type: string // 资源类型
// stamp: number // 什么时候缓存的
// expire: number // 多久之后过期
// }
// 删除本地缓存资源
mobot.remove('vendors')
// 清空本地所有缓存资源
mobot.clear()
FAQs
cache scripts and styles in localStorage
The npm package mobot receives a total of 10 weekly downloads. As such, mobot popularity was classified as not popular.
We found that mobot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.