New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

circledisc

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circledisc - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "circledisc",
"version": "0.0.1",
"version": "0.0.2",
"description": "CircleCI > Discord webhook",

@@ -5,0 +5,0 @@ "main": "index.js",

# CircleDisc
CircleCI > Discord webhook
CircleCI > Discord webhook
### Usage
```js
const hook = new(require('circledisc'))('id', 'token', 8080);
```
``id`` the Webhook's ID
``token`` the Webhook's token
``port`` the port to use

@@ -17,2 +17,5 @@ const http = require("http");

/**
* Creates a new CircleCI webhook instance
*/
class CircleDisc extends EventEmitter {

@@ -25,3 +28,3 @@

if (port instanceof http.Server) {
this.server = port;
this.server = port || 8080;
} else {

@@ -66,3 +69,7 @@ this.server = http.createServer((req, res) => this._onRequest(req, res));

}
/**
* gets the result of the payload
* @param {Object} payload
* @returns {Object} the payload to be sent to Discord
*/
_getResultEmbed (payload) {

@@ -98,2 +105,6 @@

/**
* Execs a new Payload to Discord
* @param {Object} payload
*/
_execHook (payload) {

@@ -107,3 +118,3 @@ if (!payload) {

username: "CircleCI",
embeds: [this._getResultEmbed(payload)];
embeds: [this._getResultEmbed(payload)]
}

@@ -110,0 +121,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc