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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@giantapp/tcb-js-sdk

v1.3.2

Published

js sdk for tcb

Downloads

1

Readme

Tencent Cloud Base(TCB) JavaScript SDK npm (tag)

介绍

TCB 提供开发应用所需服务和基础设施。TCB JS SDK 让你可以在网页端使用 JavaScript 代码服务访问 TCB 的的服务。你可以使用该 SDK 构建自己的公众号页面或者独立的网站等 Web 服务。

安装

TCB JS SDK 可以通过 tcb-js-sdk 来访问:

npm install --save tcb-js-sdk@latest

要在你的模块式使用模块可以

const tcb = require('tcb-js-sdk');

import * as tcb from 'tcb-js-sdk';

或者使用官方的代码包

<script src="//imgcache.qq.com/qcloud/tcbjs/1.3.1/tcb.js">

快速上手

初始化

// 引用官方 JS CDN 文件直接使用
const app = tcb.init({
  env: '你的环境 Id'
});
// 模块化开发
const tcb = require('tcb-js-sdk');
const app = tcb.init({
  env: '你的环境 Id'
});

授权

// 获取 auth 对象
const auth = app.auth({
  persistence: 'local'
});

// 微信登录
await auth
  .weixinAuthProvider({
    appid: '微信 appId',
    scope: 'snsapi_base'
  })
  .signIn(function() {});

使用

// 调用云函数
const res = await app.callFunction({
  name: 'test',
  data: {
    str: base64
  }
});

文档

更新日志

查看 更新日志

注意

1.0.1 版本后,为了提高文件上传性能,文件上传方式修改为直接上传到对象存储,为了防止在使用过程中出现 CORS 报错,需要到 Web 控制台 / 用户管理 / 登录设置选项中设置安全域名。如果已有域名出现 CORS 报错,请删除安全域名,重新添加。

开发

安装依赖

npm install

或者

yarn

单元测试

npm test unit

E2E 测试

依赖 puppeteer,在部分 linux 系统下跑不起来

npm run e2e