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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tmsfe/tms-websdk

v0.0.5

Published

tms-websdk

Downloads

14

Readme

@tencent/tms-websdk

一、tms-websdk提供的API列表

tms.init()

初始化sdk

参数说明

* @param {Object} options
*  options.app 应用'sinan/mycar'
*  options.env 环境'production/test/development/predist'
*  options.openId 根据mpid和userId生成的标识
* @returns {void}

使用示例

var app = 'sinan' // 'sinan/mycar' 
var env = 'test'  // 'production/test/development/predist'
var openId = '7b8a491d5e1818302b335a8ea14ddfe4'   // '小程序传入openid'

tms.init({app,env,openId});

tms.request()

发起网络请求, 内部使用axio

参数说明

* @param {String} url 请求path
* @param {Object} data  请求参数,注意data.header标识请求头字段
* @param {String} method 请求方法
* @returns {Promise} 请求响应, data.headers为响应的header字段集合

使用示例

tms.request('/api/event/upload', { header,param }, 'post');

tms.report()

埋点上报

参数说明

 * @param {Object} params 数据,如:{ 27: 'R001', 28: 'TaiWeb'  }
 *  每条数据对应1-40个字段,1-27为公共字段,28-40位位展字段
 * @returns {Promise} 请求响应

使用示例

tms.report({ 27: 'R001', 28: 'TaiWeb'  });

二、tms-websdk需要配置白名单才能进行跨域

示例网页: https://aggretrip.map.qq.com/cros/index.html