mathjax-node
Advanced tools
Comparing version 1.1.1 to 1.2.0-beta.0
@@ -198,2 +198,6 @@ /********************************************************************* | ||
}); | ||
MathJax.Hub.Register.MessageHook("CommonHTML Jax - unknown char",function (message) { | ||
AddError("CHTML - Unknown character: U+"+message[1].toString(16).toUpperCase()+ | ||
" in "+(message[2].fonts||["unknown"]).join(","),!undefinedChar); | ||
}); | ||
MathJax.Hub.Register.MessageHook("MathML Jax - unknown node type",function (message) { | ||
@@ -829,3 +833,5 @@ AddError("MathML - Unknown node type: "+message[1]); | ||
// | ||
exports.typeset = function (data,callback) { | ||
// callback API for compatibility with MathJax | ||
var cbTypeset = function (data, callback) { | ||
if (!callback || typeof(callback) !== "function") { | ||
@@ -846,2 +852,13 @@ if (displayErrors) console.error("Missing callback"); | ||
// main API, callback and promise compatible | ||
exports.typeset = function (data, callback) { | ||
if (callback) cbTypeset(data, callback); | ||
else return new Promise(function (resolve, reject) { | ||
cbTypeset(data, function (output, input) { | ||
if (output.errors) reject(output.errors); | ||
else resolve(output, input); | ||
}); | ||
}); | ||
}; | ||
// | ||
@@ -848,0 +865,0 @@ // Manually start MathJax (this is done automatically |
{ | ||
"name": "mathjax-node", | ||
"version": "1.1.1", | ||
"version": "1.2.0-beta.0", | ||
"description": "API's for calling MathJax from node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
91099
39
1718
1
2