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

uxuser-sdk

v1.2.7

Published

用户中心sdk

Readme

一、快速开始

  1. 安装
npm install cmuser-sdk
  1. 在cmuser创建AKSK
  2. 使用
const cmuserSdk = require('cmuser-sdk');
const cmuser = cmuserSdk({ak: ak, sk: sk});
const user = await cmuser.user.create({username:'tuser', pwd: '123456'});

参考test.js

二、方法参数

  • 方法参数及返回值,参考cmuser API
  1. cmuserSdk(json) 声名sdk
参数,json格式:
ak  必传
sk  必传
host    非必传,可自定义cmuser服务器
  1. cmuser.user 操作用户类
.create(json)    创建用户
.update(json)    修改用户
.delete(user_id) 删除用户
.get(user_id)    用户详情
.query(json)     分页或列表
.rePwd(json)     修改密码
.sendPhone(json)     发送手机验证码
.sendRegeditMail(json)  发送邮件
.verifiedCode(json)     验证邮箱、手机验证码
  1. cumser.token 操作token类
.create(json)  获取token
.check(token)  校验token
.untion(ctx, json)  三方登录。不传ctx直接跳转三方授权页面,传ctx返回要跳转的url。授权成功后跳转到redirect_url参数页面,并返回token(base64编码后的JWT)
  1. cumser.permission 操作权限类
.create(json)    创建权限
.update(json)    修改权限
.delete(permission_id) 删除权限
.get(permission_id)    权限详情
.query(json)     分页或列表
  1. cumser.role 操作角色类
.create(json)    创建角色
.update(json)    修改角色
.delete(role_id) 删除角色
.get(role_id)    权限角色
.query(json)     分页或列表
.getByUser(user_id) 查询用户角色
.addUser(array)  关联用户,格式[{user_id:XXX,role_id:YYY}]
.delUser(array)  取消关联用户,格式[{user_id:XXX,role_id:YYY}]
.addPermission(array)  关联权限,格式[{permission_id:XXX,role_id:YYY}]
.delPermission(array)  取消关联权限,格式[{permission_id:XXX,role_id:YYY}]
  1. cumser.organization 操作组织类
.create(json)    创建组织
.delete(org_id) 删除组织
.query(json)     分页或列表