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

xiaoneng-js

v1.0.1

Published

s

Downloads

4

Readme

小能脚本

安装脚本

$ npm i xiaoneng-js
or
$ yarn add xiaoneng-js
引用插件--
import { loadXN, xnIM } from 'xiaoneng-js'
初始化加载脚本:
loadXN({ siteid: 'kf_00000' })
or
loadXN({ siteid: 'kf_00000' }).then((resolve, reject) => {
  // 初始化配置参数(无需配置可跳过)
  xnIM('setCustomerInfo', {
    uid: '000000',
    uname: '小能测试',
    userlevel: '1',
    itemid: '10000000',
    orderid:'1234',
    orderprice:'124.00',
    exterinfo: {
      erpparam: '北京站',
    }
  })
  // 初始化后打开脚本
  xnIM('openChat', 'kf_xxxxxx_template_9999')
})
打开脚本:
xnIM('openChat', 'kf_xxxxxx_template_9999')
参数说明:
初始化加载配置参数
loadXN({
  siteid: '企业ID',
  host: '默认会主动获取当前页面的host,也可以填入脚本域',
  scriptId: '脚本ID,用于销毁',
  lan: '加载语言,默认简中',
  type: '最小化预制模板,可设置属性min'
})
更多配置参考: https://docs.xiaoneng.cn/jssdk/%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3.html