zsqk / browser-fn

some functions for browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

somefn npm version node version

some functions for browser

通用 JS 功能 (浏览器环境兼容):

  • hash
    • SHA1
    • SHA256
    • SHA512
  • HMAC
    • SHA256
    • SHA512
  • Uint8Array to hex string tools
  • UA 解析
    • UA 结构整理
    • OS 识别
    • 软件识别
  • lz 压缩

使用说明

UA 识别

import { parserUA } from '@zsqk/somefn/js/ua';

const ua = parserUA(window.navigator.userAgent);
const name = `${ua.os} ${ua.softwareName}`;

dev

本仓库不直接提交新功能, 所有新功能均从上层项目中拉取.

本仓库只做 npm 适配工作.

publish:

npm run tsc && cp package*.json build && cp README.md build && npm publish ./build --access public

About

some functions for browser

License:MIT License


Languages

Language:TypeScript 100.0%