@eropple/is-logger
Advanced tools
Comparing version 0.1.0 to 0.1.2
@@ -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); |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163487
153
13
9