Comparing version 1.3.1 to 1.3.2
@@ -70,4 +70,8 @@ /** | ||
}, | ||
write: function(str, font, fn) { | ||
if (!str) { | ||
return fn(null, ""); | ||
} | ||
Figlet.parseFont(font, function(err) { | ||
@@ -83,3 +87,3 @@ if (err) { | ||
} | ||
for (i = 0, height = chars[0].length; i < height; i++) { | ||
for (i = 0; i < chars[0].length; i++) { | ||
for (var j = 0; j < len; j++) { | ||
@@ -86,0 +90,0 @@ result += chars[j][i]; |
@@ -16,3 +16,47 @@ var figlet = require("../figlet-node.js").Figlet; | ||
}); | ||
}, | ||
"Test render empty string": function (test) { | ||
test.expect(2); | ||
figlet.write("", "standard", function (er, text) { | ||
test.ifError(er); | ||
test.strictEqual("", text); | ||
test.done(); | ||
}); | ||
}, | ||
"Test render undefined": function (test) { | ||
test.expect(2); | ||
figlet.write(undefined, "standard", function (er, text) { | ||
test.ifError(er); | ||
test.strictEqual("", text); | ||
test.done(); | ||
}); | ||
}, | ||
"Test render null": function (test) { | ||
test.expect(2); | ||
figlet.write(null, "standard", function (er, text) { | ||
test.ifError(er); | ||
test.strictEqual("", text); | ||
test.done(); | ||
}); | ||
}, | ||
"Test render false": function (test) { | ||
test.expect(2); | ||
figlet.write(false, "standard", function (er, text) { | ||
test.ifError(er); | ||
test.strictEqual("", text); | ||
test.done(); | ||
}); | ||
} | ||
}; |
{ | ||
"name": "asciify", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Plain text awesomizer. A hybrid npm module and CLI for turning plain text into ascii art.", | ||
@@ -5,0 +5,0 @@ "main": "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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1438958
437
0