@ycryptx/tiktok-live-connector
Version:
Node.js module to receive live stream chat events like comments and gifts from TikTok LIVE
8 lines (7 loc) • 402 B
JavaScript
const fs = require('fs')
const path = require('path')
const protobufjs = require("protobufjs")
const root = protobufjs.loadSync('./src/proto/tiktokSchema.proto');
// Alternative way without loading proto string from file
// const root = protobufjs.parse('syntax = "proto3"; ...').root;
fs.writeFileSync(path.join(__dirname, './src/proto/tiktokSchema.json'),JSON.stringify(root.toJSON(), null, 4));