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

@xybin1990/barkjs

v1.0.5

Published

bark for js

Downloads

2

Readme

@xybin1990/barkjs

安装

npm install @xybin1990/barkjs

使用

import { Bark } from '@xybin1990/barkjs';

const bark = new Bark({
  baseUrl: '', // 默认不传使用官方地址:https://api.day.app 或者可以设置自己部署的私有地址。
  key: '' // Bark 软件中生成的 Key。
})

bark.push({
  body: '' // 消息内容。 可以使用 '\n' 来达到换行的效果
})

Push data

| 字段 | 数据类型 | 是否必须 | 说明 | | :---------------: | :------: | :------: | :----------------------------------------: | | title | string | 否 | 标题 会加粗显示 | | body | string | 是 | 内容 | | category | string | 否 | 预留字段 暂时忽略 | | automaticallyCopy | boolean | 否 | 设置为 1 会自动将内容复制到剪切板 | | copy | string | 否 | 指定复制的内容 否则为实际消息 | | url | string | 否 | 点击推送跳转的 url | | isArchive | number | 否 | 是否保存推送记录 不指定则按照 APP 内的设定 | | group | string | 否 | 消息分组 | | icon | string | 否 | 指定消息图标 | | sound | string | 否 | 设定提示音 | | level | string | 否 | 设定时效性 | | badge | number | 否 | 设定 APP 角标 可以设定任意数字 |

Sound Support

enum Sound {
  alarm              = 'alarm',
  anticipate         = 'anticipate',
  bell               = 'bell',
  birdsong           = 'birdsong',
  bloom              = 'birdsong',
  calypso            = 'birdsong',
  chime              = 'chime',
  choo               = 'choo',
  descent            = 'descent',
  electronic         = 'electronic',
  fanfare            = 'fanfare',
  glass              = 'glass',
  gotosleep          = 'gotosleep',
  healthnotification = 'healthnotification',
  horn               = 'horn',
  ladder             = 'ladder',
  mailsent           = 'mailsent',
  minuet             = 'minuet',
  multiwayinvitation = 'multiwayinvitation',
  newmail            = 'newmail',
  newsflash          = 'newsflash',
  noir               = 'noir',
  paymentsuccess     = 'paymentsuccess',
  shake              = 'shake',
  sherwoodforest     = 'sherwoodforest',
  silence            = 'silence',
  spell              = 'spell',
  suspense           = 'suspense',
  telegraph          = 'telegraph',
  tiptoes            = 'tiptoes',
  typewriters        = 'typewriters',
  update             = 'update',
}

Level 时效性说明

  • active: 不设置时的默认值,系统会立即亮屏显示通知。
  • timeSensitive:时效性通知,可在专注状态下显示通知。
  • passive: 仅将通知添加到通知列表,不会亮屏提醒