
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@searchfe/user-agent
Advanced tools
这是一个 User Agent 检测工具。
apmjs install --save @searchfe/user-agent
var ua = require('@searchfe/user-agent')
if (ua.isIOS()) {
var version = ua.iOSVersion()
console.log('main version': version[0])
console.log('sub version': version[1])
}
import path from 'path';
export default {
//...
plugins: [{
resolveId(id) {
if (id.startsWith('@searchfe/user-agent')) {
return path.resolve(`${yourPath}/@searchfe/user-agent/index.umd.js`);
}
return null;
}
}],
//...
}
module.exports = {
//...
resolve: {
alias: {
"@searchfe/user-agent": "@searchfe/user-agent/index.umd.js"
}
}
};
本仓库使用 semantic release 自动发布 NPM,因此需要你的 commit 信息符合 Commitizen 规范。比如:
fix: 修复在 XX 情况下的 XX 问题
。feat: 支持 XX 浏览器的识别
。chore: 支持 XX 浏览器的识别
。BREAKING CHANGES
的说明,下次发版递增主版本号。FAQs
AMD package for user-agent detection.
The npm package @searchfe/user-agent receives a total of 849 weekly downloads. As such, @searchfe/user-agent popularity was classified as not popular.
We found that @searchfe/user-agent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 18 open source maintainers 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.