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

fritz-callmonitor

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fritz-callmonitor - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

3

lib/fritz-callmonitor.d.ts

@@ -7,4 +7,3 @@ /// <reference types="node" />

private readonly _socket;
constructor(host: string);
constructor(host: string, port: number);
constructor(host: string, port?: number);
connect(): void;

@@ -11,0 +10,0 @@ end(): void;

@@ -5,4 +5,4 @@ "use strict";

const net_1 = require("net");
const moment = require("moment");
const events_1 = require("events");
const datePattern = /(\d+?)\.(\d+?)\.(\d+?)\s+?(\d+?):(\d+?):(\d+?)/gi;
class CallMonitor extends events_1.EventEmitter {

@@ -17,3 +17,2 @@ constructor(host, port = 1012) {

const s = this._socket;
s.connect(this.port, this.host);
s.on("connect", () => {

@@ -29,2 +28,3 @@ const reader = byline_1.createStream(this._socket, { encoding: "utf-8" });

s.on("close", had_error => this.emit("close", had_error));
s.connect(this.port, this.host);
}

@@ -73,4 +73,11 @@ end() {

return null;
const d = moment(sp[0], "DD.MM.YY HH:mm:ss");
const date = d.isValid() ? d.toDate() : new Date();
const dateMatch = datePattern.exec(sp[0]);
let date;
if (dateMatch !== null) {
const [, dayOfMonth, month1Based, year, hours, minutes, seconds] = dateMatch;
date = new Date(Number(year), Number(month1Based) - 1, Number(dayOfMonth), Number(hours), Number(minutes), Number(seconds), 0);
}
else {
date = new Date();
}
const evt = CallMonitor.eventTypeFromString(sp[1]);

@@ -77,0 +84,0 @@ if (evt === undefined)

{
"name": "fritz-callmonitor",
"version": "3.1.1",
"description": "Provides a node.js wrapper for the call monitor api of the AVM Fritz!Box. Written in TypeScript.",
"version": "3.1.2",
"description": "Provides a TypeScript Node.js wrapper for the call monitor api of the AVM Fritz!Box.",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"repository": "nikeee/fritz-callmonitor",
"repository": {
"type": "git",
"url": "https://github.com/nikeee/fritz-callmonitor"
},
"author": {

@@ -12,17 +15,17 @@ "name": "Niklas Mollenhauer",

},
"dependencies": {
"byline": "^5.0.0"
},
"devDependencies": {
"typescript": "^2.9.1"
"@types/byline": "^4.2.31",
"rimraf": "^2.6.3",
"typescript": "^3.3.3333"
},
"scripts": {
"test": "tsc --noEmit",
"clean": "rm -rv -- lib/* || true",
"clean": "rimraf lib",
"compile": "tsc",
"prepare": "npm run compile"
"prepare": "npm run clean && npm run compile"
},
"license": "LGPL-3.0",
"dependencies": {
"@types/byline": "^4.2.31",
"byline": "^4.2.2",
"moment": "^2.22.2"
}
"license": "LGPL-3.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