
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@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 817 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.