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

bf-wchat

v0.2.8

Published

Enterprise WeWork chat archive.

Readme

BF-WCHAT

Enterprise WeWork chat archive.

Installtion

 # yarn
  yarn add bf-wchat -S --registry=https://registry.npmjs.org/

  # npm
  npm i bf-wchat -S --registry=https://registry.npmjs.org/

Using

CommonJS

const BFWchat = require('bf-wchat');

// your RSA private key
const private_key = `
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAvsFopMih+xeS6v1FMIM4i0g4KAByrVGVFWaK4gWW+tzyAslh
EfAvhcUURjYuF3M5OhoLEiOnK+Am7DzQzynq641PAl70912vR7/RRNPwwuOQR1g4
mOnX4Y2xkrh+nN3zEwVPDS5g32XG4Qlo+T2+6psLuCpaBM+B+YDzeOOxlygsb3Pb
3cT9o57yZEZIs3AZDEQLZrGhO0Y1TJRaaHWLPJxGrtc3FhBibxbOkIaY3Gl5zAJv
aVorSJeauMIjbSD0n+zFXo92YcLmuchRtQJCfumOD1jvgXkK3cvKb5TWyeoSSx18
5uaNXmymH/4AymP+rY0rg+H6YjHE7z8cjMj3DQIDAQABAoIBABXS9u/zbGTX2507
ANF+EdgNmS8qbfRaYx4hrz4QuadV4/Jhq9NrkWRSmfE2fat9KUz2cdHPdm7UpF9e
zd0FxLTSY/m3d3tdopIo5f5j6SXC91zSQRdtmZ9aoLhSl1nHIupILzUo2zhz4n8Y
noP1hoQ83OhjIA1w2EP9dt2b31OVuCmXPyAtUZwSNtcef6/LFyiFC2p+13ZgfTyj
BTlc2hlVqYZCafZbxYGHUFIpEH2B9EHHphW2iXf7kNLBxKKfm0AEUfJIIsI9ktUa
Z7DC1+NA773aeM6Q/D4R0wKBgQCB732GK/Qk9upOFrtqDHr/bpHcn5GnPZgyUTgv
O5trbwIfd57Yy9nY0knEa1W90Du57Mamn+c2NplhKKTnh1jDVsm8op7IeUy+PpJ4
u4J8Igr9xGju6QQO8+lCyx9HxTREHpq7eIUdEb7Z6o3w4mwr/CBTg9j5MvZUgqib
8ZC1RwKBgQDOyxG7BF47AO0UeJqobBoruvWzG8Aa8dAlifAm3IWglljWxbU2xZYI
tXlupHg1TZkWWQU3M3GPySCZCkJJdxLPyMdx/qPzlfr4TU2eJ0secxDgnp+n+L+Y
fOFkJ6nhtLm61i3vgrX8yQh+sVzv8jzqzpYGUbz7AjcTInYF2h0N/Q==
-----END RSA PRIVATE KEY-----
`;

// Initialize WeWork Chat SDK
const bf_wchat = new BFWchat({
  corpid: 'your corpid of Wework',
  secret: 'your secret of Wework',
  private_key
});

async function main() {
  
  // Get chat data list
  const chat_list = await bf_wchat.getChatData({
    seq: 839,
    limit: 2,
    timeout: 5
  });
  console.log(chat_list);

  // Obtain the encrypt_key through RSA decryption
  const encrypt_key = await bf_wchat.deRSAcryptChatData(chat_list['chatdata'][1]['encrypt_random_key']);
  console.log(encrypt_key);

  // Decrypt the chat content by the obtained encrypt_key
  const content = await bf_wchat.deCryptDatas(encrypt_key, chat_list['chatdata'][1]['encrypt_chat_msg']);
  console.log(content);
}

main().catch(console.log);

ESM

import BFWchat from 'bf-wchat';

// your RSA private key
const private_key = `
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAvsFopMih+xeS6v1FMIM4i0g4KAByrVGVFWaK4gWW+tzyAslh
EfAvhcUURjYuF3M5OhoLEiOnK+Am7DzQzynq641PAl70912vR7/RRNPwwuOQR1g4
mOnX4Y2xkrh+nN3zEwVPDS5g32XG4Qlo+T2+6psLuCpaBM+B+YDzeOOxlygsb3Pb
3cT9o57yZEZIs3AZDEQLZrGhO0Y1TJRaaHWLPJxGrtc3FhBibxbOkIaY3Gl5zAJv
aVorSJeauMIjbSD0n+zFXo92YcLmuchRtQJCfumOD1jvgXkK3cvKb5TWyeoSSx18
5uaNXmymH/4AymP+rY0rg+H6YjHE7z8cjMj3DQIDAQABAoIBABXS9u/zbGTX2507
ANF+EdgNmS8qbfRaYx4hrz4QuadV4/Jhq9NrkWRSmfE2fat9KUz2cdHPdm7UpF9e
zd0FxLTSY/m3d3tdopIo5f5j6SXC91zSQRdtmZ9aoLhSl1nHIupILzUo2zhz4n8Y
noP1hoQ83OhjIA1w2EP9dt2b31OVuCmXPyAtUZwSNtcef6/LFyiFC2p+13ZgfTyj
BTlc2hlVqYZCafZbxYGHUFIpEH2B9EHHphW2iXf7kNLBxKKfm0AEUfJIIsI9ktUa
Z7DC1+NA773aeM6Q/D4R0wKBgQCB732GK/Qk9upOFrtqDHr/bpHcn5GnPZgyUTgv
O5trbwIfd57Yy9nY0knEa1W90Du57Mamn+c2NplhKKTnh1jDVsm8op7IeUy+PpJ4
u4J8Igr9xGju6QQO8+lCyx9HxTREHpq7eIUdEb7Z6o3w4mwr/CBTg9j5MvZUgqib
8ZC1RwKBgQDOyxG7BF47AO0UeJqobBoruvWzG8Aa8dAlifAm3IWglljWxbU2xZYI
tXlupHg1TZkWWQU3M3GPySCZCkJJdxLPyMdx/qPzlfr4TU2eJ0secxDgnp+n+L+Y
fOFkJ6nhtLm61i3vgrX8yQh+sVzv8jzqzpYGUbz7AjcTInYF2h0N/Q==
-----END RSA PRIVATE KEY-----
`;

// Initialize WeWork Chat SDK
const bf_wchat = new BFWchat({
  corpid: 'your corpid of Wework',
  secret: 'your secret of Wework',
  private_key
});

async function main() {
  
  // Get chat data list
  const chat_list = await bf_wchat.getChatData({
    seq: 839,
    limit: 2,
    timeout: 5
  });
  console.log(chat_list);

  // Obtain the encrypt_key through RSA decryption
  const encrypt_key = await bf_wchat.deRSAcryptChatData(chat_list['chatdata'][1]['encrypt_random_key']);
  console.log(encrypt_key);

  // Decrypt the chat content by the obtained encrypt_key
  const content = await bf_wchat.deCryptDatas(encrypt_key, chat_list['chatdata'][1]['encrypt_chat_msg']);
  console.log(content);
}

main().catch(console.log);