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

gamerpc

v8.0.8

Published

connector for gamecloud & gamegold

Downloads

148

Readme

游戏云连接器 gamerpc

gamerpc 是 Vallnet 项目的配套工具箱,提供如下辅助功能:

  1. 帮助第三方项目连接 Gamegold Core 对等网络,发起RPC调用,订阅推送消息
  2. 帮助第三方项目连接 Gamecloud 游戏云服务器,发起RPC调用,订阅推送消息
  3. 提供多种数据校验、智能合约解读等函数
  4. 封装常用功能,如认证令牌的生成和校验、订单支付接口等

git

git clone https://github.com/bookmansoft/gamegoldtoolkit

安装依赖包

npm i

测试 (require mocha)

npm run test

单元测试中也包含了各类场景的应用实例

打包

npm run build

上述命令会在 ./lib 目录下生成形如 'gamerpc{version}.js' 的打包文件

第三方项目直接引用 gamerpc

npm i gamerpc
//node
const toolkit = require('gamerpc')

//react
import toolkit from require('gamerpc')

第三方网页包含引用 gamerpc

<head>
	<script src="../lib/gamerpc1.7.8.js"></script>
</head>

范例参见 ./test/test.html (请在必要时手工修改页面包含文件的链接地址)

注意:如下写法无法在页面嵌套中引用到内部对象,但在NPM依赖包引入模式下没有影响

module.exports = Remote;

页面嵌入建议改成如下模式

const toolkit = exports;
toolkit.conn = Remote;
global.toolkit = toolkit;