@phenomnomnominal/debug
Advanced tools
Comparing version 0.1.4 to 0.2.0
@@ -20,8 +20,5 @@ "use strict"; | ||
DebuggerΩ.prototype.shouldWrap = function (requirePath) { | ||
process.stderr.write(requirePath + "\n"); | ||
var isNodeModule = module_1.default.builtinModules.includes(requirePath) || requirePath.includes('node_modules'); | ||
var isIncludedModule = this._include.some(function (regexp) { return regexp.test(requirePath); }); | ||
var isIgnoredModule = this._ignore.some(function (regexp) { return regexp.test(requirePath); }); | ||
process.stderr.write(JSON.stringify(this._ignore.map(function (a) { return a.source; })) + "\n"); | ||
process.stderr.write(JSON.stringify(isIgnoredModule) + "\n"); | ||
var isIgnoredModule = this._ignore.some(function (ignore) { return ignore === requirePath; }); | ||
return !((isNodeModule && !isIncludedModule) || isIgnoredModule); | ||
@@ -28,0 +25,0 @@ }; |
@@ -10,3 +10,3 @@ /// <reference types="node" /> | ||
export declare type DebugIncludes = Array<RegExp>; | ||
export declare type DebugIgnores = Array<RegExp>; | ||
export declare type DebugIgnores = Array<string>; | ||
export declare type DebugLogger = (logString: string) => void; | ||
@@ -13,0 +13,0 @@ export declare type DebugOptions = { |
{ | ||
"name": "@phenomnomnominal/debug", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"description": "Very lazy tool for adding debug logging", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
22011
262