Comparing version 4.0.0 to 4.1.0
@@ -91,3 +91,3 @@ var utils = require('./utils'); | ||
if (arguments.length > 1) { | ||
for (var i = 1; i < arguments.length; i += 1) { | ||
for (var i = arguments.length -1; i > 0; i -= 1) { | ||
var styleName = arguments[i]; | ||
@@ -94,0 +94,0 @@ |
@@ -115,3 +115,3 @@ /*! | ||
if (arguments.length > 1) { | ||
for (var i = 1; i < arguments.length; i += 1) { | ||
for (var i = arguments.length -1; i > 0; i -= 1) { | ||
var styleName = arguments[i]; | ||
@@ -118,0 +118,0 @@ |
{ | ||
"name": "magicpen", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Styled output in both consoles and browsers", | ||
@@ -30,3 +30,3 @@ "main": "./lib/MagicPen.js", | ||
"sinon": "=1.9.1", | ||
"unexpected": "^5.0.0-beta5", | ||
"unexpected": "5.0.0-beta36", | ||
"unexpected-sinon": "^3.0.2" | ||
@@ -33,0 +33,0 @@ }, |
@@ -18,2 +18,15 @@ /*global describe, it, beforeEach*/ | ||
a.toString('html') === b.toString('html'); | ||
}, | ||
diff: function (actual, expected, output, diff, inspect) { | ||
if (actual.toString() !== expected.toString()) { | ||
return diff(actual.toString(), expected.toString()); | ||
} | ||
if (actual.toString('ansi') !== expected.toString('ansi')) { | ||
return diff(actual.toString('ansi'), expected.toString('ansi')); | ||
} | ||
if (actual.toString('html') !== expected.toString('html')) { | ||
return diff(actual.toString('html'), expected.toString('html')); | ||
} | ||
} | ||
@@ -619,3 +632,3 @@ }); | ||
'\x1B[32mworld\x1B[39m' + | ||
'\x1B[1m\x1B[31m!\x1B[39m\x1B[22m'); | ||
'\x1B[31m\x1B[1m!\x1B[22m\x1B[39m'); | ||
}); | ||
@@ -1008,9 +1021,9 @@ | ||
expect(pen.toString('ansi'), 'to equal', | ||
'\u001b[1m\u001b[34mfunction\u001b[39m\u001b[22m \u001b[1m\u001b[37mfib\u001b[39m\u001b[22m {\n' + | ||
' \u001b[1m\u001b[34mvar\u001b[39m\u001b[22m i=0, fibs = [\u001b[36m0\u001b[39m, \u001b[36m1\u001b[39m];\n' + | ||
' \u001b[1m\u001b[34mfor\u001b[39m\u001b[22m (; i < n; i += \u001b[36m1\u001b[39m) {\n' + | ||
'\u001b[34m\u001b[1mfunction\u001b[22m\u001b[39m \u001b[37m\u001b[1mfib\u001b[22m\u001b[39m {\n' + | ||
' \u001b[34m\u001b[1mvar\u001b[22m\u001b[39m i=0, fibs = [\u001b[36m0\u001b[39m, \u001b[36m1\u001b[39m];\n' + | ||
' \u001b[34m\u001b[1mfor\u001b[22m\u001b[39m (; i < n; i += \u001b[36m1\u001b[39m) {\n' + | ||
' fibs.push(fibs[\u001b[36m0\u001b[39m] + fibs[\u001b[36m1\u001b[39m]);\n' + | ||
' fibs.shift();\n' + | ||
' }\n' + | ||
' \u001b[1m\u001b[34mreturn\u001b[39m\u001b[22m fibs[\u001b[36m0\u001b[39m];\n' + | ||
' \u001b[34m\u001b[1mreturn\u001b[22m\u001b[39m fibs[\u001b[36m0\u001b[39m];\n' + | ||
'}'); | ||
@@ -1017,0 +1030,0 @@ }); |
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
482549
3076