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

jdc-api

v0.0.3

Published

JD Cloud Router Api

Readme

jdc-api

简介

京东云无线宝路由器的 node api,基于 ROM 版本: JDCOS-4.0.0.r4027 制作

示例

import JdcApi from 'jdc-api';

const host = 'example.com';
const password = 'password';
// config 非必填,默认端口: 80
const config = { port: 8080 };
const jdcApi = new JdcApi(host, password, config);

try {
  // 必须先调用 connect 进行密码测试及连接
  await jdcApi.connect();

  // 获取路由信息
  const getRouterInfo = await jdcApi.getRouterInfo();
  // 获取 wan 信息
  const wanInfo = await jdcApi.getWanInfo();
  // 获取 wan6 信息
  const wan6Info = await jdcApi.getWan6Info();
  // 获取 wan6 配置
  const wan6Config = await jdcApi.getWan6Config();
  // 获取当前使用的 mac 地址
  const macAddrByMacClone = await jdcApi.getMacAddrByMacClone();
  // 获取 wan 连接状态
  const wanConnectionStatus = await jdcApi.getWanConnectionStatus();
  // 获取在线设备数量
  const onlineDeviceCount = await jdcApi.getOnlineDeviceCount();
  // 获取 ipv6 配置(与 wan6Config 返回结果一致)
  const ipv6Config = await jdcApi.getIpv6Config();
  // 网络状态流量图表
  const networkFlow = await jdcApi.getNetworkFlow();
  // 获取 2.4g wifi 信息
  const wifi24gInfo = await jdcApi.get24gWifiInfo();
  // 获取 5g wifi 信息
  const wifi5gInfo = await jdcApi.get5gWifiInfo();
  // 获取访客 wifi 信息
  const guestWifiInfo = await jdcApi.getGuestWifiInfo();
  // 获取 wifi6 状态
  const wifi6Status = await jdcApi.getWifi6Status();
  // 获取 wds 配置
  const wdsConfig = await jdcApi.getWdsConfig();
  // 获取 wifi mesh 状态
  const wirelessMeshStatus = await jdcApi.getWirelessMeshStatus();
  // 获取多频合一状态
  const dualFrequencyOptimizationStatus = await jdcApi.getDualFrequencyOptimizationStatus();
  // 获取设备列表
  const deviceList = await jdcApi.getDeviceList();
  // 获取黑白名单设备信息
  const macFilterInfo = await jdcApi.getMacFilterInfo();
  // 获取 lan ip
  const lanIp = await jdcApi.getLanIp();
  // 获取 dhcp 静态 ip
  const dhcpStaticIp = await jdcApi.getDhcpStaticIp();
  // 获取端口转发
  const portForward = await jdcApi.getPortForward();
  // 获取 dmz
  const dmz = await jdcApi.getDmz();
  // 获取 upnp
  const upnp = await jdcApi.getUpnp();
  // 获取 nat 设置
  const natType = await jdcApi.getNatType();
  // 获取自定义 hosts
  const customHosts = await jdcApi.getCustomHosts();
  // 获取所有外部存储
  const allExterStorage = await jdcApi.getAllExterStorage();
  // 获取存储状态
  const storageModeInter = await jdcApi.getStorageModeInter();
  // sd 卡确认工具
  const sdCardToolsCheck = await jdcApi.sdCardToolsCheck();
  // 检查系统更新
  const upgradeVersion = await jdcApi.getUpgradeVersion();

  console.log('getRouterInfo', getRouterInfo);
  console.log('wanInfo', wanInfo);
  console.log('wan6Info', wan6Info);
  console.log('wan6Config', wan6Config);
  console.log('macAddrByMacClone', macAddrByMacClone);
  console.log('wanConnectionStatus', wanConnectionStatus);
  console.log('onlineDeviceCount', onlineDeviceCount);
  console.log('ipv6Config', ipv6Config);
  console.log('networkFlow', networkFlow);
  console.log('wifi24gInfo', wifi24gInfo);
  console.log('wifi5gInfo', wifi5gInfo);
  console.log('guestWifiInfo', guestWifiInfo);
  console.log('wifi6Status', wifi6Status);
  console.log('wdsConfig', wdsConfig);
  console.log('wirelessMeshStatus', wirelessMeshStatus);
  console.log('dualFrequencyOptimizationStatus', dualFrequencyOptimizationStatus);
  console.log('deviceList', deviceList);
  console.log('macFilterInfo', macFilterInfo);
  console.log('lanIp', lanIp);
  console.log('dhcpStaticIp', dhcpStaticIp);
  console.log('portForward', portForward);
  console.log('dmz', dmz);
  console.log('upnp', upnp);
  console.log('natType', natType);
  console.log('customHosts', customHosts);
  console.log('allExterStorage', allExterStorage);
  console.log('storageModeInter', storageModeInter);
  console.log('sdCardToolsCheck', sdCardToolsCheck);
  console.log('upgradeVersion', upgradeVersion);
} catch (e) {
  console.log(e);
}

声明

本软件包仅供学习交流,如作他用所承受的法律责任一概与作者无关(下载使用即代表你同意上述观点)