Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eropple/is-logger

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eropple/is-logger - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

10

dist/index.spec.js

@@ -9,4 +9,8 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Bunyan = __importStar(require("bunyan"));
const bunyan_blackhole_1 = __importDefault(require("bunyan-blackhole"));
const index_1 = require("./index");

@@ -20,2 +24,5 @@ describe('isLogger', () => {

});
it('should validate bunyan-blackhole', () => {
expect(index_1.isLogger(bunyan_blackhole_1.default("test"))).toBe(true);
});
it("shouldn't validate an empty object", () => {

@@ -32,2 +39,5 @@ expect(index_1.isLogger({})).toBe(false);

});
it('should validate bunyan-blackhole', () => {
expect(index_1.isBunyan(bunyan_blackhole_1.default("test"))).toBe(true);
});
it("shouldn't validate an empty object", () => {

@@ -34,0 +44,0 @@ expect(index_1.isBunyan({})).toBe(false);

4

package.json
{
"name": "@eropple/is-logger",
"version": "0.1.0",
"version": "0.1.2",
"description": "Helper functions to determine when an object can act as a logger (and, optionally, is a Bunyan logger).",

@@ -21,4 +21,6 @@ "main": "dist",

"@types/bunyan": "^1.8.6",
"@types/bunyan-blackhole": "^0.2.2",
"@types/jest": "^24.0.13",
"bunyan": "^1.8.12",
"bunyan-blackhole": "^1.1.1",
"jest": "^24.8.0",

@@ -25,0 +27,0 @@ "ts-jest": "^24.0.2",

@@ -11,2 +11,3 @@ # `@eropple/is-logger` #

- `isBunyan(obj)`: is this a Bunyan logger? Defined similarly loosely as "does
it contain
it pass `isLogger(obj)` and also have `child`, `fatal`, and `streams` (some
of the most important methods on a Bunyan logger).
import * as Bunyan from "bunyan";
import BunyanBlackhole from "bunyan-blackhole";

@@ -17,2 +18,6 @@ import {

it('should validate bunyan-blackhole', () => {
expect(isLogger(BunyanBlackhole("test"))).toBe(true);
});
it("shouldn't validate an empty object", () => {

@@ -32,2 +37,6 @@ expect(isLogger({})).toBe(false);

it('should validate bunyan-blackhole', () => {
expect(isBunyan(BunyanBlackhole("test"))).toBe(true);
});
it("shouldn't validate an empty object", () => {

@@ -34,0 +43,0 @@ expect(isBunyan({})).toBe(false);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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