New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rankish

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rankish

It is mainly used to send alarm information at the Node end, and has the following advantages:

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Documentation

It is mainly used to send alarm information at the Node end, and has the following advantages:

  • Globally unique
  • Merge to send
  • Support silence
  • Easy access
  • Supports alarm rule filtering

Install

npm -i rankish

use

  • Unlock custom robots in the dingTalk group
  • The keyword is customized. You can bring the sent content with you
  • Get access_token
  • Use the following code
import Notice from 'rankish'
const { ding } = new Notice()
const dinging = ding(
  '4e6add99ad420323a61b0ad4caa4940ec2806670a20ff00d3212300321300321',
  {isAtAll:false},
);
ding.send('begin test');
ding.error('this is error');
ding
  .rules({'userAgent': 'mpcrawler'}, {header: {'user-agent': 'jkfodsjofijmpcrawler'}})
  .error('rule111', 'jkfodsjofijmpcrawler', 'mpcrawler')
ding.warn('this is warn');
ding.log('this is log');

API

  • ding(token, {hoding, silence})

    • token: Webhook 的 access_token
    • hoding:
    • silence:
  • error(arg0, [arg1, arg2, ...])

  • warn(arg0, [arg1, arg2, ...])

  • log(arg0, [arg1, arg2, ...])

  • rules(rule, params)

other

function msg2string (msg) {
  if (msg instanceof Error) {
    return msg.stack ? msg.stack : JSON.stringify(msg);
  }

  if (typeof msg === 'object') {
    return JSON.stringify(msg);
  }

  if (typeof msg === 'function') {
    return msg.toString();
  }

  return msg;
}

FAQs

Package last updated on 05 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts