@zsqk/some-fn

some functions for browser


License
MIT
Install
npm install @zsqk/some-fn@0.0.1

Documentation

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

publish:

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