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

wx_jishida_push

v1.0.1

Published

为及时达微信推送写的nodejs库,轻量简洁,易于使用,专注于通知这一功能。 使用前请登录官网获取通道key。

Downloads

1

Readme

Description

为及时达微信推送写的nodejs库,轻量简洁,易于使用,专注于通知这一功能。 使用前请登录官网获取通道key。

官网地址:http://push.ijingniu.cn/

Usage

Example

//在nodejs中导入此库并初始化
var Push = require("wx_jishida_push")
var push = new Push(key)
push.send("send()", "local time: " + new Date(), true)

Api

Push(arg)

推送类,使用前需初始化,有两种初始化方式。

第一种,若只需传入key(token),则直接传入即可(见上方示例)

第二种,传入arg配置对象。 如var push=new Push({key: "", }),以下介绍配置选项。

  • key 必需,也称token。请到官网获取,并妥善保管,勿泄露
  • text 可选,默认通知标题
  • desp 可选,默认通知内容
  • retries 可选,发送失败后默认重试次数,默认为3

.send(text, desc, isPlain=false)

发送推送通知,若发送失败则抛出错误,失败后不重试。

  • text:必需,为通知标题(title/head)
  • desc:可选,为通知内容(content/body)
  • isPlain:可选,参数定义传入内容是否为纯文本,若不是则当markdown处理(提示:MD换行需用"\n\n")。

.sendSilently(text, desc, isPlain)

静默发送推送通知,若发送成功返回true,若失败,则返回错误对象error,不抛出错误。

  • 参数同上。

.sendWithRetry(text, desc, isPlain, retries)

  • retries:可选,失败后重试次数,若最后一次重试后仍失败则抛出错误。若不传此参数,则使用类初始化时定义的默认值。
  • 其他参数同上。

Feedback

如发现bug,可通过以下链接反馈,并备注此库名称: https://support.qq.com/product/367583