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

service_recommend

v1.1.0

Published

简介:

Readme

简介:

本模块是西安交通大学计算机学院鲍军鹏博士团队开发的服务推荐模块。 version:0.0.1 release date:2023-09-18

简介:

serviceRecommend-v0.0.1.js里定义了一个服务推荐函数:sendHttpRequest。

sendHttpRequest只有一个入参jsonObj。jsonObj是一个json串,包含 user_id,meta_version以及context。其中context为xml串,具体输入格式约定请参照接口定义文件。

输入示例:{
  user_id: "123567123",
  meta_version: "v1.0",
  context: "<trigger group=\"test\" event=\"1\" name=\"发射点发顺丰\" desc=\"微应用初始化\"><parallel-node><device-selector-action desc=\"选择设备\" filter=\"ATOM_DEV_SEL_TYPE_CAR\"><multi-action><saic-voice-playback-service-service-action desc=\"语音播放服务\" status=\"1\" content=\"欢迎女王驾到,正将车机调整到您最喜欢的模式\"></saic-voice-playback-service-service-action><saic-ac-condition-service-action desc=\"空调开关服务\" status=\"1\"></saic-ac-condition-service-action><saic-ac-temperature-service-action desc=\"空调温度调节服务\" position=\"2\" temperature=\"25\"></saic-ac-temperature-service-action></multi-action></device-selector-action></parallel-node></trigger>"
};

sendHttpRequest函数返回为一个json串,包含code, message以及 result。 result为一个列表。

返回示例:{
  code: 0,
  message: 'success',
  result: [
    '手机震动',
    '添加待办服务',
    '添加语言免唤醒词',
    '查询待办服务',
    '删除日程服务',
    '删除待办服务',
    '开始监听双握拳手势',
    '添加笔记服务',
    '文本识别出时间',
    '停止语言免唤醒'
  ]
}

test.js为测试文件,可以将返回结果输入在控制台。

test.html为测试前端文件,测试时请在该目录下运行本地服务器避免跨域请求问题,其次在浏览器控制台中查看结果

使用方式:

//导入函数

import {sendHttpRequest} from './serviceRecommend-v0.0.1.js';

//使用函数并返回结果

sendHttpRequest(jsonObj)

​ .then((response)