npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gzmpken/membercard-util

v1.0.0

Published

member util

Downloads

5

Readme

Member Card Util

Member Card 工具包

使用

RsaEncrypt

加密字符串

Params{@str}
@str 需要加密的字符串

Return
加密后的字符串

parseState

解析VVmemberCardVV00001 這類型的state url

Params{@_state}
@_state 自定义路由 VVmemberCardVV00001

Return
/memberCard/00001

getLang

获取UA中语言

Return
en 或者 zh

getDeviceType

根据UA判断设备类型,Android 或者 IOS

Return
Android 或者 IOS

getQuery

获取URL中get参数

Params{@name}
@name GET参数名

Return 参数值

set

设置 sessionStorage 缓存

Params{@key,@value}
@key sessionStorage Key
@value sessionStorage Value

get

获取 sessionStorage 缓存

Params{@key}
@key sessionStorage Key

Return sessionStorage Value

remove

根据KEY删除 sessionStorage 缓存

Params{@key}
@key sessionStorage Key

clear

清空 sessionStorage缓存

isJson

判断对象是否为JSON对象

Params{@str}
@str json字符串或者json对象/array数组

Return true/false

dateFormat

日期格式化

Params{@fmt, @date}
@fmt String 日期格式 "YYYY-mm-dd HH:MM:SS"
@date Date对象

Return "2020-10-23 13:44:50"

sdkInit

JSSDK 初始化

getMpLocation

JSSDK 获取坐标 Promise化

deepCopy

对象深拷贝

Params{@_obj}

Return obj

toThousands

数字格式化 每3位加逗号

Params{@_str}
@_str String 数字

Return String 1,000

browser

浏览器类型判断

browser.version.trident  是否IE内核
browser.version.presto  是否opera内核
browser.version.webKit  是否苹果、谷歌内核
browser.version.gecko  是否火狐内核
browser.version.mobile  是否为移动终端
browser.version.ios  是否ios终端
browser.version.android  是否android终端
browser.version.iPhone  是否为iPhone或者QQHD浏览器
browser.version.iPad  是否为iPad
browser.version.webApp  是否web应该程序,没有头部与底部
browser.version.weixin  是否微信
browser.version.qq  是否QQ

browser.language 获取浏览器语言

compreJSON

比较JSON对象

Params{@obj1,@obj2}

Return true/false