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

depurar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depurar - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

scripts/upgrade-modules.coffee

60

lib/Depurar.js
// Generated by CoffeeScript 1.9.3
(function() {
console.log("Hey");
var CRC32, Debug, Depurar, appRoot, debug, path, util;
path = require("path");
util = require("util");
CRC32 = require("crc-32");
debug = require("debug")("Depurar:" + path.basename(__filename, path.extname(__filename)));
appRoot = require("app-root-path");
Debug = require("debug");
Depurar = (function() {
function Depurar(namespace) {
var basename, color, dbg, filepath, parentDir, stackError;
if (("" + namespace).indexOf(":") === -1) {
stackError = new Error;
filepath = Depurar._getCallerPathFromTrace(stackError);
basename = path.basename(filepath, path.extname(filepath));
parentDir = path.basename(appRoot);
if (namespace) {
namespace = namespace + ":" + basename;
} else {
namespace = parentDir + ":" + basename;
}
}
color = Depurar._getColorFromNamespace(namespace);
dbg = Debug(namespace);
dbg.color = color;
return dbg;
}
Depurar._getColorFromNamespace = function(namespace, colors) {
var absCrc, color, colorIndex, first, last, ref;
if (colors == null) {
colors = [6, 2, 3, 4, 5, 1];
}
ref = namespace.split(":"), first = ref[0], last = ref[ref.length - 1];
absCrc = Math.abs(CRC32.str(last));
colorIndex = absCrc % colors.length;
color = colors[colorIndex];
return color;
};
Depurar._getCallerPathFromTrace = function(stackError) {
var caller, filepath, matches;
caller = stackError.stack.split('\n')[2].trim();
matches = caller.match(/\(([^\:]+)\:/);
filepath = matches[1];
return filepath;
};
return Depurar;
})();
module.exports = Depurar;
}).call(this);
//# sourceMappingURL=Depurar.js.map

12

package.json
{
"name": "depurar",
"version": "0.0.2",
"version": "0.0.3",
"description": "Debug with added sugar",

@@ -13,5 +13,9 @@ "keywords": [

"dependencies": {
"debug": "^1.0.4"
"app-root-path": "^1.0.0",
"crc-32": "^0.3.0",
"debug": "2.2.0"
},
"devDependencies": {
"airbud": "^3.3.1",
"async": "^1.2.1",
"chai": "^3.0.0",

@@ -21,3 +25,5 @@ "coffee-script": "^1.9.3",

"mocha": "^2.2.5",
"should": "^7.0.1"
"npm-check-updates": "^1.5.1",
"should": "^7.0.1",
"underscore": "^1.8.3"
},

@@ -24,0 +30,0 @@ "repository": {

@@ -1,2 +0,5 @@

# node-depurar
Debug with added sugar
# depurar
> **depurar** (first-person singular present indicative depuro, past participle depurado)
> 1. to purify, cleanse
> 2 (computing) To debug

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