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

bows

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bows - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

test/color-map.html

8

bows.js

@@ -34,3 +34,4 @@ (function() {

bows = null,
debugRegex = null;
debugRegex = null,
moduleColorsMap = {};

@@ -56,3 +57,6 @@ debugRegex = debug && debug[0]==='/' && new RegExp(debug.substring(1,debug.length-1));

if (colorsSupported) {
var color = yieldColor();
if(!moduleColorsMap[str]){
moduleColorsMap[str]= yieldColor();
}
var color = moduleColorsMap[str];
msg = "%c" + msg;

@@ -59,0 +63,0 @@ colorString = "color: hsl(" + (color) + ",99%,40%); font-weight: bold";

@@ -1,7 +0,8 @@

var b = require('browserify')(),
var browserify = require('browserify'),
fs = require('fs'),
uglify = require("uglify-js");
var b = browserify({ standalone: 'bows' });
b.add('./bows.js');
b.bundle({standalone: 'bows'}, function (err, code) {
b.bundle(function (error, code) {
fs.writeFileSync('./dist/bows.js', code);

@@ -8,0 +9,0 @@

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

!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bows=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bows=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function() {

@@ -28,3 +28,3 @@ function checkColorSupport() {

debug = ls[debugKey],
logger = _dereq_('andlog'),
logger = require('andlog'),
bind = Function.prototype.bind,

@@ -36,3 +36,4 @@ hue = 0,

bows = null,
debugRegex = null;
debugRegex = null,
moduleColorsMap = {};

@@ -58,3 +59,6 @@ debugRegex = debug && debug[0]==='/' && new RegExp(debug.substring(1,debug.length-1));

if (colorsSupported) {
var color = yieldColor();
if(!moduleColorsMap[str]){
moduleColorsMap[str]= yieldColor();
}
var color = moduleColorsMap[str];
msg = "%c" + msg;

@@ -91,3 +95,3 @@ colorString = "color: hsl(" + (color) + ",99%,40%); font-weight: bold";

},{"andlog":2}],2:[function(_dereq_,module,exports){
},{"andlog":2}],2:[function(require,module,exports){
// follow @HenrikJoreteg and @andyet if you like this ;)

@@ -123,4 +127,3 @@ (function () {

},{}]},{},[1])
(1)
},{}]},{},[1])(1)
});

@@ -1,1 +0,1 @@

!function(n){if("object"==typeof exports)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.bows=n()}}(function(){return function n(e,o,r){function t(f,u){if(!o[f]){if(!e[f]){var l="function"==typeof require&&require;if(!u&&l)return l(f,!0);if(i)return i(f,!0);throw new Error("Cannot find module '"+f+"'")}var d=o[f]={exports:{}};e[f][0].call(d.exports,function(n){var o=e[f][1][n];return t(o?o:n)},d,d.exports,n,e,o,r)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<r.length;f++)t(r[f]);return t}({1:[function(n,e){!function(){function o(){var n,e=!!window.chrome,o=/firefox/i.test(navigator.userAgent);if(o){var r=navigator.userAgent.match(/Firefox\/(\d+\.\d+)/);r&&r[1]&&Number(r[1])&&(n=Number(r[1]))}return e||n>=31}var r=function(){var n=.618033988749895;return a+=n,a%=1,360*a},t="undefined"==typeof window,i=!t&&window.localStorage,f=i.andlogKey||"debug",u=i[f],l=n("andlog"),d=Function.prototype.bind,a=0,c=15,g=function(){},p=i.debugColors||o(),s=null,w=null;w=u&&"/"===u[0]&&new RegExp(u.substring(1,u.length-1));for(var v=["log","debug","warn","error","info"],h=0,b=v.length;b>h;h++)g[v[h]]=g;s=function(n){var e,o,t;if(e=n.slice(0,c),e+=Array(c+3-e.length).join(" ")+"|",w&&!n.match(w))return g;if(!d)return g;if(p){var i=r();e="%c"+e,o="color: hsl("+i+",99%,40%); font-weight: bold",t=d.call(l.log,l,e,o),v.forEach(function(n){t[n]=d.call(l[n]||t,l,e,o)})}else t=d.call(l.log,l,e),v.forEach(function(n){t[n]=d.call(l[n]||t,l,e)});return t},s.config=function(n){n.padLength&&(this.padLength=n.padLength)},"undefined"!=typeof e?e.exports=s:window.bows=s}.call()},{andlog:2}],2:[function(n,e,o){!function(){var n="undefined"==typeof window,r=!n&&window.localStorage,t={};if(n)return e.exports=console,void 0;var i=r.andlogKey||"debug";if(r&&r[i]&&window.console)t=window.console;else for(var f="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),u=f.length,l=function(){};u--;)t[f[u]]=l;"undefined"!=typeof o?e.exports=t:window.console=t}()},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.bows=e()}}(function(){return function e(n,o,r){function t(f,u){if(!o[f]){if(!n[f]){var l="function"==typeof require&&require;if(!u&&l)return l(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var a=o[f]={exports:{}};n[f][0].call(a.exports,function(e){var o=n[f][1][e];return t(o?o:e)},a,a.exports,e,n,o,r)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<r.length;f++)t(r[f]);return t}({1:[function(e,n){!function(){function o(){var e,n=!!window.chrome,o=/firefox/i.test(navigator.userAgent);if(o){var r=navigator.userAgent.match(/Firefox\/(\d+\.\d+)/);r&&r[1]&&Number(r[1])&&(e=Number(r[1]))}return n||e>=31}var r=function(){var e=.618033988749895;return a+=e,a%=1,360*a},t="undefined"==typeof window,i=!t&&window.localStorage,f=i.andlogKey||"debug",u=i[f],l=e("andlog"),d=Function.prototype.bind,a=0,c=15,g=function(){},p=i.debugColors||o(),s=null,w=null,v={};w=u&&"/"===u[0]&&new RegExp(u.substring(1,u.length-1));for(var h=["log","debug","warn","error","info"],y=0,b=h.length;b>y;y++)g[h[y]]=g;s=function(e){var n,o,t;if(n=e.slice(0,c),n+=Array(c+3-n.length).join(" ")+"|",w&&!e.match(w))return g;if(!d)return g;if(p){v[e]||(v[e]=r());var i=v[e];n="%c"+n,o="color: hsl("+i+",99%,40%); font-weight: bold",t=d.call(l.log,l,n,o),h.forEach(function(e){t[e]=d.call(l[e]||t,l,n,o)})}else t=d.call(l.log,l,n),h.forEach(function(e){t[e]=d.call(l[e]||t,l,n)});return t},s.config=function(e){e.padLength&&(this.padLength=e.padLength)},"undefined"!=typeof n?n.exports=s:window.bows=s}.call()},{andlog:2}],2:[function(e,n,o){!function(){var e="undefined"==typeof window,r=!e&&window.localStorage,t={};if(e)return n.exports=console,void 0;var i=r.andlogKey||"debug";if(r&&r[i]&&window.console)t=window.console;else for(var f="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),u=f.length,l=function(){};u--;)t[f[u]]=l;"undefined"!=typeof o?n.exports=t:window.console=t}()},{}]},{},[1])(1)});
{
"name": "bows",
"version": "1.0.0",
"version": "1.1.0",
"description": "Rainbowed console logs for chrome in development",

@@ -14,5 +14,5 @@ "main": "bows.js",

"devDependencies": {
"browserify": "",
"browserify": "^5.10.0",
"phantomjs": "^1.9.7-8",
"uglify-js": "~2.3.6"
"uglify-js": "^2.3.6"
},

@@ -19,0 +19,0 @@ "author": "Philip Roberts",

@@ -15,2 +15,25 @@ module.exports = function runTestPage(path, done) {

var customTests = page.evaluate(function () {
return !!window.customTests;
});
if (customTests) {
var customResults = page.evaluate(function (l) {
return window.customTests(l);
}, actualLogs);
customResults.forEach(function (result) {
if (!result[0]) {
console.log('✖ ', result[1]);
exit = 1;
} else {
console.log('✔', result[1]);
}
});
done(exit);
return;
}
var expectedLogs = page.evaluate(function () {

@@ -17,0 +40,0 @@ return window.expectedLogs;

@@ -8,2 +8,3 @@ var runTestPage = require('./helpers/runTestPage');

'test/regex.html',
'test/color-map.html',
];

@@ -10,0 +11,0 @@

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