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

@browserspy/common

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@browserspy/common - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

index.d.ts

@@ -5,3 +5,3 @@ /// <reference types="bunyan" />

bunyan: typeof bunyan;
logger: (name: string, level: string | number) => bunyan;
logger: (name: string, level: string | number) => import("./lib/logger").ILogger;
router: (parent: import("express-serve-static-core").Express, dir: string, logger?: bunyan | undefined) => void;

@@ -8,0 +8,0 @@ };

import bunyan from 'bunyan';
export { bunyan, };
declare const _default: (name: string, level: string | number) => bunyan;
export interface IKeyValue<V> {
[key: string]: V;
}
export interface ILoggerFn {
(msg: string, obj: IKeyValue<any>, ...args: any[]): void;
}
export interface ILogger {
fatal: ILoggerFn;
error: ILoggerFn;
warn: ILoggerFn;
info: ILoggerFn;
debug: ILoggerFn;
trace: ILoggerFn;
}
declare const _default: (name: string, level: string | number) => ILogger;
export default _default;
//# sourceMappingURL=logger.d.ts.map

@@ -16,2 +16,12 @@ "use strict";

];
var factory = function (logger, level) {
return function (msg, obj) {
if (obj === void 0) { obj = {}; }
var args = [];
for (var _i = 2; _i < arguments.length; _i++) {
args[_i - 2] = arguments[_i];
}
logger[level].apply(logger, [obj, msg].concat(args));
};
};
exports.default = (function (name, level) {

@@ -21,3 +31,3 @@ if (typeof level === 'string' && !allowedLevels.includes(level)) {

}
return bunyan_1.default.createLogger({
var logger = bunyan_1.default.createLogger({
name: name,

@@ -27,3 +37,11 @@ level: level,

});
return {
fatal: factory(logger, 'fatal'),
error: factory(logger, 'error'),
warn: factory(logger, 'warn'),
info: factory(logger, 'info'),
debug: factory(logger, 'debug'),
trace: factory(logger, 'trace'),
};
});
//# sourceMappingURL=logger.js.map

@@ -193,3 +193,3 @@ "use strict";

else {
logger.info('Routes', routes.map(function (_a) {
var loggedRoutes = routes.map(function (_a) {
var url = _a.url, method = _a.method;

@@ -200,3 +200,4 @@ return ({

});
}));
});
logger.info(loggedRoutes, 'Routes');
}

@@ -203,0 +204,0 @@ parent.use(app);

{
"name": "@browserspy/common",
"version": "0.4.3",
"version": "0.4.4",
"description": "",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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